@charset "UTF-8";
/* CSS Document */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Tema oscuro (por defecto) */
        :root {
            --bg-primary: #262624;
            --bg-secondary: #30302e;
            --bg-tertiary: #18181b;
            --text-primary: #c2c0b6;
            --text-secondary: #9a9890;
            --text-content: #e4e4e7;
            --border-color: rgba(255, 255, 255, 0.08);
            --border-hover: rgba(255, 255, 255, 0.15);
            --accent-red: #5B94BE;
            --icon-color: rgba(255, 255, 255, 0.7);
            --overlay: rgba(0, 0, 0, 0.7);
            --input-bg: #30302e;
            --card-bg: transparent;
            --card-border: rgba(255, 255, 255, 0.1);
        }

        /* Tema claro */
        [data-theme="light"] {
            --bg-primary: #ffffff;
            --bg-secondary: #edede4;
            --bg-tertiary: #f8f8f5;
            --text-primary: #30302e;
            --text-secondary: #9a9890;
            --text-content: #30302e;
            --border-color: #dbd9d2;
            --border-hover: #c5c2b8;
            --accent-red: #eb585a;
            --icon-color: #9a9890;
            --overlay: rgba(0, 0, 0, 0.3);
            --input-bg: #edede4;
            --card-bg: transparent;
            --card-border: #dbd9d2;
        }

        body {
            font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
            background: var(--bg-primary);
            height: 100vh;
            display: flex;
            color: var(--text-content);
            overflow: hidden;
            transition: background 0.3s ease, color 0.3s ease;
        }

        /* Sidebar */
        .sidebar {
            width: 260px;
            background: var(--bg-secondary);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .sidebar.collapsed {
            width: 0;
            overflow: hidden;
        }

        .sidebar-header {
            padding: 16px;
            border-bottom: 1px solid var(--border-color);
        }

        .new-chat-btn {
            width: 100%;
            padding: 12px;
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-content);
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            transition: all 0.2s;
        }

        .new-chat-btn:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: var(--border-hover);
        }

        .chat-history {
            flex: 1;
            overflow-y: auto;
            padding: 12px;
        }

        .chat-history::-webkit-scrollbar {
            width: 4px;
        }

        .chat-history::-webkit-scrollbar-track {
            background: transparent;
        }

        .chat-history::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
        }

        .history-item {
            padding: 10px 12px;
            margin-bottom: 4px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 13px;
            color: rgba(255, 255, 255, 0.7);
            transition: all 0.2s;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        [data-theme="light"] .history-item {
            color: #9a9890;
        }

        .history-item:hover {
            background: rgba(255, 255, 255, 0.05);
            color: #e4e4e7;
        }

        [data-theme="light"] .history-item:hover {
            background: rgba(0, 0, 0, 0.03);
            color: #30302e;
        }

        .history-item.active {
            background: rgba(91, 148, 190, 0.1);
            color: #e4e4e7;
            border-left: 2px solid #5B94BE;
        }

        [data-theme="light"] .history-item.active {
            background: rgba(235, 88, 90, 0.08);
            color: #30302e;
            border-left: 2px solid #eb585a;
        }

        /* Main Container */
        .main-container {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: var(--bg-primary);
        }

        /* Header */
        .header {
            height: 56px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            background: var(--bg-secondary);
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .menu-toggle {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            background: transparent;
            border: none;
            color: #e4e4e7;
        }

        [data-theme="light"] .menu-toggle {
            color: #9a9890;
        }

        .menu-toggle:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        [data-theme="light"] .menu-toggle:hover {
            background: rgba(0, 0, 0, 0.02);
        }

        .model-selector {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            color: #e4e4e7;
            font-size: 14px;
            font-weight: 400;
        }

        [data-theme="light"] .model-selector {
            border-color: #dbd9d2;
            color: #9a9890;
        }

        [data-theme="light"] .model-selector i {
            color: #9a9890;
        }

        .model-selector:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.15);
        }

        [data-theme="light"] .model-selector:hover {
            background: rgba(0, 0, 0, 0.02);
            border-color: #c5c2b8;
        }

        .model-badge {
            background: var(--accent-red);
            color: white;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .header-actions {
            display: flex;
            gap: 8px;
        }

        .header-btn {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            background: transparent;
            border: none;
            color: var(--icon-color);
        }

        .header-btn:hover {
            background: var(--bg-primary);
            color: var(--text-content);
        }

        .theme-toggle {
            color: var(--icon-color);
        }

        .theme-toggle:hover {
            color: var(--accent-red);
            background: transparent;
        }

        /* Chat Area */
        .chat-area {
            flex: 1;
            overflow-y: auto;
            padding: 40px 20px 120px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .chat-content {
            width: 100%;
            max-width: 760px;
        }

        .chat-area::-webkit-scrollbar {
            width: 6px;
        }

        .chat-area::-webkit-scrollbar-track {
            background: transparent;
        }

        .chat-area::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
        }

        /* Messages */
        .message-group {
            margin-bottom: 32px;
            animation: fadeIn 0.4s ease-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .message {
            display: flex;
            gap: 16px;
            padding: 20px 0;
        }

        .message-avatar {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 16px;
            color: white;
        }

        .user .message-avatar {
            background: var(--accent-red);
        }

        .assistant .message-avatar {
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            color: var(--text-content);
        }

        .message-content {
            flex: 1;
            font-size: 15px;
            line-height: 1.7;
            color: var(--text-content);
        }

        .message-content p {
            margin-bottom: 12px;
        }

        .message-content p:last-child {
            margin-bottom: 0;
        }

        .message-content code {
            background: var(--bg-secondary);
            padding: 2px 6px;
            border-radius: 4px;
            font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
            font-size: 14px;
            color: var(--accent-red);
        }

        .message-content pre {
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 16px;
            margin: 12px 0;
            overflow-x: auto;
        }

        .message-content pre code {
            background: transparent;
            color: var(--text-content);
            padding: 0;
        }

        .message-content ul, .message-content ol {
            margin: 12px 0;
            padding-left: 24px;
        }

        .message-content li {
            margin-bottom: 8px;
        }

        .message-content strong {
            color: #fff;
            font-weight: 500;
        }

        /* Typing indicator */
        .typing {
            display: flex;
            gap: 16px;
            padding: 20px 0;
            animation: fadeIn 0.3s ease-out;
        }

        .typing .message-avatar {
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            color: var(--text-content);
        }

        .typing-dots {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 8px 16px;
        }

        .dot {
            width: 8px;
            height: 8px;
            background: var(--text-secondary);
            border-radius: 50%;
            animation: pulse 1.5s infinite;
        }

        .dot:nth-child(2) {
            animation-delay: 0.2s;
        }

        .dot:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes pulse {
            0%, 60%, 100% {
                opacity: 0.3;
                transform: scale(1);
            }
            30% {
                opacity: 1;
                transform: scale(1.2);
            }
        }

        /* Input Area */
        .input-area {
            position: fixed;
            bottom: 0;
            left: 260px;
            right: 0;
            background: linear-gradient(to top, var(--bg-primary) 80%, transparent);
            padding: 20px;
            transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .sidebar.collapsed ~ .main-container .input-area {
            left: 0;
        }

        .input-container {
            max-width: 760px;
            margin: 0 auto;
            background: var(--input-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 12px;
            display: flex;
            align-items: flex-end;
            gap: 12px;
            transition: all 0.2s;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .input-container:focus-within {
            border-color: var(--accent-red);
            box-shadow: 0 0 0 1px var(--accent-red), 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .attach-btn {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: none;
            color: var(--icon-color);
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s;
        }

        .attach-btn:hover {
            background: rgba(0, 0, 0, 0.05);
            color: var(--text-content);
        }

        .input-field {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-content);
            font-size: 15px;
            line-height: 1.5;
            outline: none;
            resize: none;
            min-height: 24px;
            max-height: 200px;
            font-family: inherit;
        }

        .input-field::placeholder {
            color: var(--text-secondary);
        }

        .send-btn {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--accent-red);
            border: none;
            color: white;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s;
            opacity: 1;
        }

        .send-btn:hover:not(:disabled) {
            background: var(--accent-red);
            transform: scale(1.05);
            filter: brightness(1.1);
        }

        .send-btn:active {
            transform: scale(0.95);
        }

        .send-btn:disabled {
            background: var(--accent-red);
            cursor: not-allowed;
            opacity: 0.5;
        }

        /* Welcome Screen */
        .welcome-screen {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px;
            text-align: center;
            animation: fadeIn 0.6s ease-out;
        }

        .welcome-logo {
            width: 80px;
            height: 80px;
            margin-bottom: 32px;
            background: var(--bg-secondary);
            border: 2px solid var(--border-color);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--accent-red);
            font-size: 40px;
        }

        [data-theme="light"] .welcome-logo {
            background: transparent;
            border-color: #dbd9d2;
        }

        .welcome-title {
            font-family: 'Roboto', sans-serif;
            font-size: 32px;
            font-weight: 300;
            margin-bottom: 12px;
            color: var(--text-primary);
            letter-spacing: -0.5px;
        }

        .welcome-subtitle {
            font-family: 'Roboto', sans-serif;
            font-size: 16px;
            font-weight: 300;
            color: var(--text-secondary);
            margin-bottom: 40px;
            letter-spacing: -0.2px;
        }

        .suggestions-grid {
            display: grid;
            grid-template-columns: 1fr 1fr !important;
            grid-template-rows: auto auto;
            gap: 16px;
            width: 100%;
            max-width: 800px;
            margin: 0 auto;
        }

        .suggestion-card {
            padding: 18px;
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s;
            text-align: left;
            display: flex;
            align-items: flex-start;
            gap: 14px;
            min-width: 0;
        }

        [data-theme="light"] .suggestion-card {
            border-color: #dbd9d2;
        }

        .suggestion-card:hover {
            background: var(--bg-secondary);
            border-color: var(--border-hover);
            transform: translateY(-2px);
        }

        .suggestion-icon {
            width: 56px;
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 28px;
            color: var(--icon-color);
        }

        [data-theme="light"] .suggestion-icon {
            font-size: 32px;
        }

        .suggestion-card:hover .suggestion-icon {
            color: var(--text-content);
        }

        .suggestion-content {
            flex: 1;
            min-width: 0;
        }

        .suggestion-title {
            font-size: 16px !important;
            font-weight: 300;
            color: var(--text-content);
            margin-bottom: 5px;
            line-height: 1.2;
        }

        .suggestion-desc {
            font-size: 14px;
            color: var(--text-secondary);
            line-height: 1.4;
        }

        /* Force 2 columns on desktop */
        @media (min-width: 769px) {
            .suggestions-grid {
                grid-template-columns: 1fr 1fr !important;
            }
        }

        /* Mobile Responsive */
        @media (max-width: 768px) {
            .sidebar {
                position: fixed;
                z-index: 100;
                left: 0;
                top: 0;
                bottom: 0;
                transform: translateX(-100%);
                width: 260px;
            }

            .sidebar.mobile-open {
                transform: translateX(0);
                box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
            }

            .sidebar.collapsed {
                transform: translateX(-100%);
            }

            .input-area {
                left: 0 !important;
            }

            /* Keep 2 columns even on tablets/small screens */
            .suggestions-grid {
                grid-template-columns: 1fr 1fr !important;
            }
            
            .suggestion-card {
                padding: 16px 14px;
            }
            
            .suggestion-icon {
                width: 48px;
                height: 48px;
                font-size: 24px;
            }
            
            [data-theme="light"] .suggestion-icon {
                font-size: 28px;
            }
            
            .suggestion-title {
                font-size: 15px;
            }
            
            .suggestion-desc {
                font-size: 13px;
            }
        }
        
        /* Only on very small phones switch to 1 column */
        @media (max-width: 480px) {
            .suggestions-grid {
                grid-template-columns: 1fr !important;
            }
        }

        /* Mobile Overlay for mobile */
        .mobile-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--overlay);
            z-index: 99;
        }

        .mobile-overlay.active {
            display: block;
        }