        * { 
            margin: 0; 
            padding: 0; 
            box-sizing: border-box; 
        }
        
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 25%, #45b7d1 50%, #96ceb4 75%, #feca57 100%);
            background-size: 400% 400%;
            animation: gradientShift 15s ease infinite;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }
        
        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        
        .chat-container { 
            width: 90%; 
            max-width: 900px; 
            height: 90vh; 
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 24px; 
            box-shadow: 
                0 32px 64px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(255, 255, 255, 0.2);
            display: flex; 
            flex-direction: column; 
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.3);
        }
        
        .chat-header { 
            background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
            color: white; 
            padding: 24px 32px; 
            position: relative;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .chat-header h1 { 
            margin: 0; 
            font-size: 1.75rem; 
            font-weight: 600;
            letter-spacing: -0.025em;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .chat-header h1::before {
            content: "🤖";
            font-size: 2rem;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        }
        
        .status { 
            position: absolute; 
            top: 20px; 
            right: 140px; 
            padding: 8px 16px; 
            border-radius: 20px; 
            font-size: 0.875rem;
            font-weight: 500;
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.3s ease;
        }
        
        .status.online { 
            background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
            box-shadow: 0 0 20px rgba(72, 187, 120, 0.4);
        }
        
        .status.offline { 
            background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
            box-shadow: 0 0 20px rgba(245, 101, 101, 0.4);
        }
        
        .chat-messages { 
            flex: 1; 
            padding: 32px; 
            overflow-y: auto; 
            background: linear-gradient(180deg, #fafafa 0%, #f7fafc 100%);
            scroll-behavior: smooth;
        }
        
        .chat-messages::-webkit-scrollbar {
            width: 6px;
        }
        
        .chat-messages::-webkit-scrollbar-track {
            background: transparent;
        }
        
        .chat-messages::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 3px;
        }
        
        .message { 
            margin-bottom: 24px; 
            animation: messageSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            opacity: 0;
            animation-fill-mode: forwards;
        }
        
        @keyframes messageSlide {
            from { 
                opacity: 0; 
                transform: translateY(20px) scale(0.95); 
            }
            to { 
                opacity: 1; 
                transform: translateY(0) scale(1); 
            }
        }
        
        .message.user { 
            text-align: right; 
        }
        
        .message.assistant { 
            text-align: left; 
        }
        
        .message-content { 
            display: inline-block; 
            max-width: 75%; 
            padding: 16px 20px; 
            border-radius: 20px; 
            margin: 0 12px; 
            word-wrap: break-word;
            font-size: 0.95rem;
            line-height: 1.6;
            position: relative;
            font-weight: 400;
        }
        
        .message.user .message-content { 
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 20px 20px 4px 20px;
            box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
        }
        
        .message.assistant .message-content { 
            background: white;
            color: #2d3748;
            border: 1px solid rgba(0, 0, 0, 0.08);
            border-radius: 20px 20px 20px 4px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
        
        .message-time { 
            font-size: 0.75rem; 
            color: #718096; 
            margin: 8px 12px 0; 
            font-family: 'JetBrains Mono', monospace;
            font-weight: 400;
        }
        
        .chat-input { 
            padding: 24px 32px 32px; 
            border-top: 1px solid rgba(0, 0, 0, 0.06); 
            background: white;
            backdrop-filter: blur(20px);
        }
        
        .input-container { 
            display: flex; 
            gap: 16px; 
            align-items: flex-end;
            background: #f7fafc;
            border-radius: 24px;
            padding: 8px;
            border: 2px solid transparent;
            transition: all 0.3s ease;
        }
        
        .input-container:focus-within {
            border-color: #667eea;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
        }
        
        .message-input { 
            flex: 1; 
            padding: 16px 20px; 
            border: none;
            border-radius: 18px; 
            outline: none; 
            font-size: 0.95rem; 
            resize: none; 
            min-height: 52px; 
            max-height: 120px; 
            font-family: 'Inter', sans-serif;
            background: transparent;
            color: #2d3748;
            line-height: 1.5;
        }
        
        .message-input::placeholder {
            color: #a0aec0;
            font-weight: 400;
        }
        
        .send-button { 
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white; 
            border: none; 
            padding: 16px 24px; 
            border-radius: 18px; 
            cursor: pointer; 
            font-size: 0.95rem; 
            font-weight: 600;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
            font-family: 'Inter', sans-serif;
        }
        
        .send-button:hover { 
            transform: translateY(-2px);
            box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
        }
        
        .send-button:active {
            transform: translateY(0);
        }
        
        .send-button:disabled { 
            opacity: 0.6; 
            cursor: not-allowed; 
            transform: none;
            box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
        }
        
        .reset-button { 
            background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
            color: white; 
            border: none; 
            padding: 10px 20px; 
            border-radius: 16px; 
            cursor: pointer; 
            font-size: 0.875rem;
            font-weight: 500;
            position: absolute;
            top: 20px;
            right: 32px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 16px rgba(245, 101, 101, 0.3);
            font-family: 'Inter', sans-serif;
        }
        
        .reset-button:hover { 
            background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
        }
        
        .typing-indicator { 
            display: none; 
            padding: 16px 32px; 
            color: #718096; 
            font-style: italic;
            font-size: 0.9rem;
            background: rgba(113, 128, 150, 0.05);
            border-top: 1px solid rgba(0, 0, 0, 0.06);
        }
        
        .typing-indicator.show { 
            display: block; 
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 0.6; }
            50% { opacity: 1; }
        }
        
        .error-message { 
            background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
            color: #c53030; 
            padding: 16px 20px; 
            border-radius: 16px; 
            margin: 16px 32px; 
            border-left: 4px solid #f56565;
            font-weight: 500;
            box-shadow: 0 4px 16px rgba(245, 101, 101, 0.2);
            animation: errorSlide 0.4s ease;
        }
        
        @keyframes errorSlide {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        /* Added styles for markdown content */
        .message-content h1,
        .message-content h2,
        .message-content h3,
        .message-content h4,
        .message-content h5,
        .message-content h6 {
            margin: 0.5em 0 0.3em 0;
            font-weight: 600;
            line-height: 1.3;
        }
        
        .message-content h1 { font-size: 1.5em; }
        .message-content h2 { font-size: 1.3em; }
        .message-content h3 { font-size: 1.1em; }
        
        .message-content p {
            margin: 0.5em 0;
            line-height: 1.6;
        }
        
        .message-content ul,
        .message-content ol {
            margin: 0.5em 0;
            padding-left: 1.5em;
        }
        
        .message-content li {
            margin: 0.2em 0;
        }
        
        .message-content code {
            background: rgba(0, 0, 0, 0.1);
            padding: 0.2em 0.4em;
            border-radius: 4px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.85em;
        }
        
        .message.user .message-content code {
            background: rgba(255, 255, 255, 0.2);
        }
        
        .message-content pre {
            background: rgba(0, 0, 0, 0.05);
            padding: 1em;
            border-radius: 8px;
            overflow-x: auto;
            margin: 0.5em 0;
            border-left: 3px solid rgba(102, 126, 234, 0.3);
        }
        
        .message.user .message-content pre {
            background: rgba(255, 255, 255, 0.15);
            border-left-color: rgba(255, 255, 255, 0.4);
        }
        
        .message-content pre code {
            background: none;
            padding: 0;
            font-size: 0.9em;
        }
        
        .message-content blockquote {
            border-left: 3px solid rgba(102, 126, 234, 0.3);
            padding-left: 1em;
            margin: 0.5em 0;
            font-style: italic;
            opacity: 0.9;
        }
        
        .message.user .message-content blockquote {
            border-left-color: rgba(255, 255, 255, 0.4);
        }
        
        .message-content strong {
            font-weight: 600;
        }
        
        .message-content em {
            font-style: italic;
        }
        
        .message-content a {
            color: #667eea;
            text-decoration: none;
            border-bottom: 1px solid rgba(102, 126, 234, 0.3);
            transition: all 0.2s ease;
        }
        
        .message.user .message-content a {
            color: rgba(255, 255, 255, 0.9);
            border-bottom-color: rgba(255, 255, 255, 0.4);
        }
        
        .message-content a:hover {
            border-bottom-color: currentColor;
        }
        
        .message-content table {
            border-collapse: collapse;
            width: 100%;
            margin: 0.5em 0;
            font-size: 0.9em;
        }
        
        .message-content th,
        .message-content td {
            border: 1px solid rgba(0, 0, 0, 0.1);
            padding: 0.5em;
            text-align: left;
        }
        
        .message-content th {
            background: rgba(0, 0, 0, 0.05);
            font-weight: 600;
        }
        
        .message.user .message-content th,
        .message.user .message-content td {
            border-color: rgba(255, 255, 255, 0.2);
        }
        
        .message.user .message-content th {
            background: rgba(255, 255, 255, 0.15);
        }
        
        @media (max-width: 768px) {
            body {
                padding: 10px;
            }
            
            .chat-container { 
                width: 100%; 
                height: 100vh;
                border-radius: 0;
            }
            
            .chat-header {
                padding: 20px 24px;
            }
            
            .chat-header h1 {
                font-size: 1.5rem;
            }
            
            .status {
                position: static;
                margin-top: 12px;
                display: inline-block;
            }
            
            .reset-button {
                position: static;
                margin-top: 12px;
                margin-left: 12px;
            }
            
            .chat-messages {
                padding: 20px;
            }
            
            .message-content { 
                max-width: 85%; 
                padding: 14px 18px;
                font-size: 0.9rem;
            }
            
            .chat-input {
                padding: 20px;
            }
            
            .input-container {
                gap: 12px;
            }
            
            .message-input {
                padding: 14px 18px;
                font-size: 0.9rem;
            }
            
            .send-button {
                padding: 14px 20px;
                font-size: 0.9rem;
            }
        }
        
        @media (max-width: 480px) {
            .chat-header h1 {
                font-size: 1.25rem;
            }
            
            .message-content {
                max-width: 90%;
                padding: 12px 16px;
            }
            
            .input-container {
                flex-direction: column;
                gap: 8px;
            }
            
            .send-button {
                width: 100%;
                padding: 16px;
            }
        }