/* Variables CSS - Tema Claro (Default) */
:root {
    /* Color Variables - Light Theme */
    --primary-color: #1976d2;
    --primary-dark: #1565c0;
    --secondary-color: #03dac6;
    --background: #fafafa;
    --surface: #ffffff;
    --surface-light: #f5f5f5;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-muted: #9e9e9e;
    --border: #e0e0e0;
    --border-light: #f5f5f5;
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* Variables CSS - Tema Oscuro */
[data-theme="dark"] {
    /* Color Variables - Dark Theme */
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
    --secondary-color: #f093fb;
    --background: #0f0f23;
    --surface: #1a1a2e;
    --surface-light: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --border: #333;
    --border-light: #444;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth theme transitions */
*,
*::before,
*::after {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Layout Principal */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

/* Header */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: relative;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Model Selector in Header */
.model-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-light);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.model-icon {
    color: var(--primary-color);
    font-size: 1.1em;
}

.model-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.model-select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--border-radius) - 2px);
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    min-width: 140px;
    outline: none;
}

.model-select:focus {
    outline: none;
    background: var(--surface);
}

.model-select:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary-color);
}

.model-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Fix select option background for mobile */
.model-select option {
    background: var(--surface);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Material Icons Styling */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: inherit;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

/* Button Icons */
.btn-primary .material-icons,
.btn-secondary .material-icons {
    font-size: 1.1em;
    margin-right: 0.25rem;
}

/* Logo Icon */
.logo .material-icons {
    font-size: 1.4em;
    margin-right: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.logo-icon {
    font-size: 1.8rem;
    filter: none;
    -webkit-text-fill-color: initial;
}

.header-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .header-controls {
        gap: 0.5rem;
    }
    
    .header-controls .btn-secondary {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .header-controls .btn-secondary .icon {
        font-size: 0.9rem;
    }
}

/* Botones */
.btn-primary, .btn-secondary {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    border-color: var(--border-light);
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Settings Panel */
.settings-panel {
    position: absolute;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--surface);
    border-left: 1px solid var(--border);
    transition: right 0.3s ease;
    z-index: 50;
    overflow-y: auto;
}

.settings-panel.open {
    right: 0;
}

.settings-content {
    padding: 2rem;
}

.settings-content h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-range {
    width: 100%;
    margin: 0.5rem 0;
}

.settings-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
}

.hidden {
    display: none !important;
}

/* Chat Container */
.chat-container {
    flex: 1;
    padding: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0 1rem;
    scroll-behavior: smooth;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: var(--surface);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Welcome Message */
.welcome-message {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    text-align: center;
}

.welcome-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.welcome-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.feature-icon {
    font-size: 1.2rem;
}

/* Message Bubbles */
.message {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.assistant {
    align-items: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-lg);
    position: relative;
    word-wrap: break-word;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.message.user .message-content {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.message.assistant .message-content {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.message-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    padding: 0 0.5rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

/* Input Area */
.input-area {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1rem;
}

.input-container {
    max-width: 1200px;
    margin: 0 auto;
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem;
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.message-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    min-height: 24px;
    max-height: 150px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

/* Estilos para código en mensajes */
code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

pre {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.4;
    border: 1px solid var(--border);
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

.message-input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.send-btn:disabled {
    background: var(--border);
    cursor: not-allowed;
    transform: none;
}

.send-btn .material-icons {
    color: white;
    font-size: 1.2rem;
    margin: 0;
}

/* Message Actions */
.message-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.message.assistant .message-content:hover .message-actions {
    opacity: 1;
}

.copy-btn {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.copy-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.copy-btn .material-icons {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Code Blocks */
.code-block {
    margin: 1rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--surface-light);
    border: 1px solid var(--border);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.code-language {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.copy-code-btn {
    background: transparent;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.25rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-code-btn:hover {
    background: rgba(25, 118, 210, 0.1);
}

.copy-code-btn.copied {
    color: var(--success);
}

.copy-code-btn .material-icons {
    font-size: 1rem;
    color: var(--text-secondary);
}

.copy-code-btn.copied .material-icons {
    color: var(--success);
}

.code-block pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    background: var(--surface-light);
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-block code {
    color: var(--text-primary);
    background: none;
    padding: 0;
    border-radius: 0;
    font-family: inherit;
}

.inline-code {
    background: var(--surface-light);
    padding: 0.2rem 0.4rem;
    border-radius: calc(var(--border-radius) / 2);
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.input-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--error);
    transition: var(--transition);
}

.status-dot.connected {
    background: var(--success);
}

.status-dot.connecting {
    background: var(--warning);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 35, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 0.75rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .model-selector {
        order: 2;
        width: 100%;
        max-width: 280px;
    }
    
    .model-select {
        min-width: auto;
        flex: 1;
    }
    
    .header-controls {
        gap: 0.5rem;
        order: 3;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-secondary {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        flex: 1;
        min-width: auto;
    }
    
    .btn-secondary .material-icons {
        font-size: 1rem;
        margin-right: 0.2rem;
    }
    
    /* Code blocks en móvil */
    .code-block {
        margin: 0.75rem 0;
    }
    
    .code-header {
        padding: 0.4rem 0.75rem;
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .code-language {
        font-size: 0.75rem;
    }
    
    .copy-code-btn {
        padding: 0.2rem;
    }
    
    .copy-code-btn .material-icons {
        font-size: 0.9rem;
    }
    
    .code-block pre {
        padding: 0.75rem;
        font-size: 0.85rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Botones de copiar mensaje en móvil */
    .message-actions {
        position: static;
        opacity: 1;
        margin-top: 0.5rem;
        display: flex;
        justify-content: flex-end;
    }
    
    .copy-btn {
        width: 28px;
        height: 28px;
        background: rgba(102, 126, 234, 0.1);
    }
    
    .copy-btn .material-icons {
        font-size: 0.9rem;
    }
    
    .btn-secondary .icon {
        font-size: 0.9rem;
    }
    
    .settings-panel {
        width: 100%;
        right: -100%;
    }
    
    .chat-container {
        padding: 0.5rem;
    }
    
    .chat-messages {
        padding: 0 0.5rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .welcome-content h2 {
        font-size: 1.5rem;
    }
    
    .features {
        gap: 1rem;
    }
    
    .feature {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .input-area {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .message-content {
        max-width: 95%;
    }
    
    .features {
        flex-direction: column;
        align-items: center;
    }
}

/* SweetAlert2 Tema Oscuro */
.swal-dark-theme {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
}

.swal2-popup.swal-dark-theme {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
}

.swal2-title {
    color: var(--text-primary) !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
}

.swal2-progress-steps .swal2-progress-step {
    background: var(--primary-color) !important;
}

.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step {
    background: var(--primary-dark) !important;
}

.swal2-timer-progress-bar {
    background: var(--primary-color) !important;
}

/* Light/Dark theme specific SweetAlert2 styles */
[data-theme="dark"] .swal2-popup {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
}

[data-theme="light"] .swal2-popup {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
}

[data-theme="dark"] .swal2-title {
    color: var(--text-primary) !important;
}

[data-theme="light"] .swal2-title {
    color: #212121 !important;
}

[data-theme="dark"] .swal2-html-container {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .swal2-html-container {
    color: #757575 !important;
}

/* ============================================
   THEME TOGGLE STYLES
   ============================================ */

/* Theme Toggle Button Styles */
.btn-secondary.theme-active {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-secondary.theme-active .material-icons {
    color: white !important;
}

.btn-secondary.theme-active .btn-text {
    color: white !important;
}

/* Button text responsivo */
.btn-text {
    margin-left: 0.5rem;
}

/* Theme Toggle Button Specific Styles */
#themeToggleBtn .material-icons {
    transition: var(--transition);
}

#themeToggleBtn:hover .material-icons {
    transform: rotate(180deg);
}

/* ============================================
   SETUP WIZARD STYLES
   ============================================ */

.setup-wizard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.wizard-container {
    position: relative;
    background: var(--surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wizard-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.wizard-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.wizard-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 25%;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.wizard-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.wizard-step {
    display: none;
    text-align: center;
    animation: fadeInUp 0.3s ease;
}

.wizard-step.active {
    display: block;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.wizard-step h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.wizard-step p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Feature Highlights */
.feature-highlights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--surface-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.highlight .material-icons {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Provider Selection */
.provider-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.provider-card {
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.provider-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.provider-card.selected {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.provider-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.provider-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.provider-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.provider-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.provider-card li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

/* Configuration Sections */
.config-section {
    margin-bottom: 1.5rem;
    text-align: left;
}

.config-section label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.wizard-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.wizard-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.config-section small {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Status indicators */
.ollama-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--surface-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.ollama-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: var(--transition);
}

.ollama-status.connected .status-dot {
    background: var(--success);
}

.ollama-status.error .status-dot {
    background: var(--error);
}

.ollama-status.connecting .status-dot {
    background: var(--warning);
    animation: pulse 1.5s infinite;
}

/* Ollama Help */
.ollama-help {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
    text-align: left;
}

.ollama-help h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.ollama-help ol {
    color: var(--text-secondary);
    line-height: 1.6;
}

.ollama-help code {
    background: var(--surface);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* API Links */
.api-links {
    margin-top: 1.5rem;
    text-align: left;
}

.api-links h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.link-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.api-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.api-link:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.api-link .material-icons {
    font-size: 1rem;
    color: var(--primary-color);
}

/* Completion Summary */
.completion-summary {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.completion-summary h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.completion-summary .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.completion-summary .summary-item:last-child {
    border-bottom: none;
}

.completion-summary .summary-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.completion-summary .summary-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Next Steps */
.next-steps {
    text-align: left;
}

.next-steps h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.next-steps ul {
    color: var(--text-secondary);
    line-height: 1.6;
}

.next-steps li {
    margin-bottom: 0.5rem;
}

/* Wizard Footer */
.wizard-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.wizard-footer .btn-primary,
.wizard-footer .btn-secondary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wizard-container {
        width: 95%;
        margin: 1rem;
    }
    
    .wizard-header,
    .wizard-content,
    .wizard-footer {
        padding: 1.5rem;
    }
    
    .provider-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-highlights {
        max-width: none;
    }
    
    .wizard-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .wizard-footer .btn-primary,
    .wizard-footer .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .wizard-header h2 {
        font-size: 1.25rem;
    }
    
    .step-icon {
        font-size: 2.5rem;
    }
    
    .provider-icon {
        font-size: 2rem;
    }
}



.mdc-floating-label {
    color: var(--text-secondary) !important;
}

.mdc-floating-label--float-above {
    color: var(--primary-color) !important;
}

.mdc-select__dropdown-icon {
    color: var(--text-secondary) !important;
}

.mdc-menu-surface {
    background-color: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-lg) !important;
}

.mdc-list-item {
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem !important;
}

.mdc-list-item:hover {
    background-color: var(--surface-light) !important;
}

.mdc-list-item--selected {
    background-color: rgba(102, 126, 234, 0.1) !important;
    color: var(--primary-color) !important;
}

/* Material Design Text Field Overrides */
.mdc-text-field {
    --mdc-theme-primary: var(--primary-color);
    width: 100%;
}

.mdc-text-field--outlined .mdc-notched-outline__leading,
.mdc-text-field--outlined .mdc-notched-outline__notch,
.mdc-text-field--outlined .mdc-notched-outline__trailing {
    border-color: var(--border) !important;
}

.mdc-text-field--outlined:hover .mdc-notched-outline__leading,
.mdc-text-field--outlined:hover .mdc-notched-outline__notch,
.mdc-text-field--outlined:hover .mdc-notched-outline__trailing {
    border-color: var(--primary-color) !important;
}

.mdc-text-field--focused .mdc-notched-outline__leading,
.mdc-text-field--focused .mdc-notched-outline__notch,
.mdc-text-field--focused .mdc-notched-outline__trailing {
    border-color: var(--primary-color) !important;
    border-width: 2px !important;
}

.mdc-text-field__input {
    color: var(--text-primary) !important;
    background-color: var(--surface) !important;
    border-radius: var(--border-radius) !important;
}

.mdc-text-field__input::placeholder {
    color: var(--text-muted) !important;
}

/* Model Selector Specific Styles */
.model-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface-light);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.model-select-wrapper {
    flex: 1;
    min-width: 200px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .btn-text {
        display: none;
    }
    
    .material-icons {
        margin-right: 0 !important;
    }
    
    .model-select-wrapper {
        min-width: 150px;
    }
    
    .message-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Theme button specific styles for mobile */
    #themeToggleBtn {
        order: -1; /* Put theme toggle first on mobile */
    }
    
    .header-controls {
        gap: 0.25rem;
    }
}  
/* Summary styles for completion step */ 
.summary-item {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    padding: 8px 0;  
    border-bottom: 1px solid var(--color-border);  
} 
  
.summary-item:last-child {  
    border-bottom: none;  
} 
  
.summary-label {  
    font-weight: 500;  
    color: var(--color-text-secondary);  
} 
  
.summary-value {  
    font-weight: 600;  
    color: var(--color-text);  
} 
  
/* CORS Help Styles */ 
.cors-help {  
    background: #fff3cd;  
    border: 1px solid #ffeaa7;  
    border-radius: 8px;  
    padding: 16px;  
    margin-top: 12px;  
} 
  
.cors-solution {  
    margin: 12px 0;  
    padding: 12px;  
    background: rgba(255, 255, 255, 0.7);  
    border-radius: 6px;  
} 
  
.cors-help h4 {  
    color: #856404;  
    margin-bottom: 12px;  
} 
  
.cors-help h5 {  
    color: #664d03;  
    margin-bottom: 8px;  
    font-size: 14px;  
} 
  
.cors-help code {  
    background: #f8f9fa;  
    padding: 2px 6px;  
    border-radius: 4px;  
    font-family: monospace;  
    font-size: 12px;  
} 
