@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
* { 
    font-family: 'Inter', sans-serif; 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}
html, body { 
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    width: 100%;
    background: #f5f7fa;
    transition: background-color 0.3s ease;
}

.dark body {
    background: #0f172a;
}
/* Add to your CSS file */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.dark select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23d1d5db' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

optgroup {
    font-weight: 600;
    color: #4b5563;
}

.dark optgroup {
    color: #d1d5db;
}

optgroup option {
    font-weight: normal;
    padding-left: 1rem;
}
.app-container {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.glass-card { 
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.9);
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: all 0.3s ease;
}
.dark .glass-card {
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(51, 65, 85, 0.9);
}

.glass-card::-webkit-scrollbar { width: 0; }

.floating-shapes { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    z-index: 0; 
    pointer-events: none; 
}
.shape { 
    position: absolute; 
    border-radius: 50%; 
    opacity: 0.1;
}
.shape-1 { width: 300px; height: 300px; background: #008000; top: -100px; left: -100px; }
.shape-2 { width: 200px; height: 200px; background: #00b300; bottom: -50px; right: -50px; }
.shape-3 { width: 150px; height: 150px; background: rgba(0, 128, 0, 0.6); top: 50%; right: 10%; }
.dark .shape { opacity: 0.05; }

.input-group { position: relative; width: 100%; }
.input-field { 
    width: 100%; 
    padding: 14px 16px 14px 48px; 
    border: 2px solid #e5e7eb; 
    border-radius: 12px; 
    font-size: 15px; 
    transition: all 0.3s ease;
    background: white;
    color: #1f2937;
}
.dark .input-field {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}
.input-field:focus { 
    outline: none; 
    border-color: #008000; 
    background: #f9fffe;
}
.dark .input-field:focus {
    background: #1e293b;
}

.input-icon { 
    position: absolute; 
    left: 16px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: #9ca3af; 
    transition: all 0.3s ease; 
    pointer-events: none; 
}
.input-field:focus + .input-icon { color: #008000; }

.toggle-password { 
    position: absolute; 
    right: 16px; 
    top: 50%; 
    transform: translateY(-50%); 
    cursor: pointer; 
    color: #9ca3af; 
    transition: all 0.3s ease; 
    z-index: 10; 
}
.toggle-password:hover { color: #008000; }

.btn-primary { 
    background: #008000;
    position: relative; 
    overflow: hidden; 
    transition: all 0.3s ease;
}
.btn-primary:hover { 
    background: #006600;
    transform: translateY(-2px);
}
.btn-primary:disabled { 
    opacity: 0.7; 
    cursor: not-allowed; 
    transform: none; 
}

.logo-container { 
    width: 70px; 
    height: 70px; 
    background: #008000;
    border-radius: 20px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 auto;
}

.message-success { 
    background: #d4edda;
    color: #155724; 
    border: 2px solid #b8dcc5; 
    border-radius: 12px;
}
.dark .message-success { 
    background: #166534;
    color: #dcfce7; 
    border-color: #16a34a; 
}

.message-error { 
    background: #f8d7da;
    color: #721c24; 
    border: 2px solid #f5c6cb; 
    border-radius: 12px;
}
.dark .message-error { 
    background: #991b1b;
    color: #fecaca; 
    border-color: #ef4444; 
}

.checkbox-custom { 
    appearance: none; 
    width: 18px; 
    height: 18px; 
    border: 2px solid #d1d5db; 
    border-radius: 5px; 
    cursor: pointer; 
    position: relative; 
    transition: all 0.3s ease; 
    background: white; 
    flex-shrink: 0; 
}
.dark .checkbox-custom { 
    background: #334155; 
    border-color: #64748b; 
}
.checkbox-custom:checked { 
    background: #008000;
    border-color: #008000; 
}
.checkbox-custom:checked::after { 
    content: '✔️'; 
    position: absolute; 
    color: white; 
    font-size: 14px; 
    font-weight: bold; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
}

.link-hover { 
    position: relative; 
    display: inline-block; 
    color: #008000; 
    font-weight: 600; 
    text-decoration: none; 
}
.dark .link-hover { color: #22c55e; }
.link-hover::after { 
    content: ''; 
    position: absolute; 
    width: 0; 
    height: 2px; 
    bottom: -2px; 
    left: 0; 
    background: #008000;
    transition: width 0.3s ease; 
}
.dark .link-hover::after { background: #22c55e; }
.link-hover:hover::after { width: 100%; }

.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { 
    from { opacity: 0; transform: scale(0.95); } 
    to { opacity: 1; transform: scale(1); } 
}

.verification-input { 
    width: 45px; 
    height: 55px; 
    text-align: center; 
    font-size: 20px; 
    font-weight: bold; 
    border: 2px solid #e5e7eb; 
    border-radius: 10px; 
    transition: all 0.3s ease;
    background: white;
    color: #1f2937;
}
.dark .verification-input {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}
@media (min-width: 640px) {
    .verification-input { width: 55px; height: 65px; font-size: 24px; }
}
.verification-input:focus { 
    border-color: #008000; 
    transform: scale(1.05); 
    outline: none; 
}
.dark .verification-input:focus { 
    border-color: #22c55e;
}

.resend-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background: #6b7280; }
.btn-secondary:hover { 
    background: #4b5563;
    transform: translateY(-2px);
}

.step-indicator { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: #d1d5db; transition: all 0.3s ease; }
.dark .step-dot { background: #475569; }
.step-dot.active { background: #008000; width: 24px; border-radius: 4px; }
.dark .step-dot.active { background: #22c55e; }

.code-inputs-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: nowrap;
    max-width: 100%;
}
@media (max-width: 380px) {
    .verification-input { width: 40px; height: 50px; font-size: 18px; }
    .code-inputs-container { gap: 6px; }
}

/* Wizard Specific Styles */
.wizard-container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    max-height: 700px;
}

.wizard-progress {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 30px;
}

.wizard-progress-bar {
    height: 100%;
    background: #008000;
    transition: width 0.4s ease;
    border-radius: 2px;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

.preference-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.dark .preference-card {
    background: #334155;
    border-color: #475569;
}

.preference-card:hover {
    transform: translateY(-4px);
    border-color: #008000;
}

.dark .preference-card:hover {
    border-color: #22c55e;
}

.preference-card.selected {
    border-color: #008000;
    background: #f0fff4;
    transform: scale(1.02);
}

.dark .preference-card.selected {
    border-color: #22c55e;
    background: #1a2e1a;
}

.preference-icon {
    width: 60px;
    height: 60px;
    background: #008000;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.preference-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.learning-style-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark .learning-style-card {
    background: #334155;
    border-color: #475569;
}

.learning-style-card:hover {
    transform: translateY(-2px);
    border-color: #008000;
}

.dark .learning-style-card:hover {
    border-color: #22c55e;
}

.learning-style-card.selected {
    border-color: #008000;
    background: #f0fff4;
}

.dark .learning-style-card.selected {
    border-color: #22c55e;
    background: #1a2e1a;
}

.goal-slider {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

.dark .goal-slider {
    background: #475569;
}

.goal-slider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    background: #008000;
    border-radius: 50%;
    cursor: pointer;
}

.goal-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #008000;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.completion-celebration {
    text-align: center;
    padding: 40px 20px;
}

.celebration-icon {
    width: 100px;
    height: 100px;
    background: #008000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.celebration-icon svg {
    width: 50px;
    height: 50px;
    color: white;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.dark .theme-toggle {
    background: rgba(30, 41, 59, 0.9);
}
.theme-toggle:hover {
    transform: scale(1.1);
}
.theme-icon {
    transition: all 0.3s ease;
}
.sun-icon {
    color: #f59e0b;
}
.moon-icon {
    color: #1e293b;
}
.dark .moon-icon {
    color: #e2e8f0;
}

/* Chat container styles */
#chatContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.4s ease;
}
.dark #chatContainer {
    background: #0f172a;
}
#chatContainer.active {
    transform: translateX(0);
}
.chat-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Text colors for dark theme */
.dark .text-gray-900 { color: #f1f5f9 !important; }
.dark .text-gray-600 { color: #cbd5e1 !important; }
.dark .text-gray-700 { color: #e2e8f0 !important; }
.dark .text-green-600 { color: #4ade80 !important; }
.dark .bg-green-50 { background: rgba(21, 128, 61, 0.2) !important; }
.dark .border-green-100 { border-color: rgba(34, 197, 94, 0.3) !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .wizard-container {
        height: 95vh;
        max-height: none;
    }
    
    .preference-card {
        padding: 15px;
    }
    
    .preference-icon {
        width: 50px;
        height: 50px;
    }
    
    .preference-icon svg {
        width: 25px;
        height: 25px;
    }
}

/* Loading Spinner Styles */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #008000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.dark .loading-spinner {
    border-color: #374151;
    border-top-color: #22c55e;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 12px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.dark .loading-text {
    color: #9ca3af;
}

/* Chat Loading Overlay */
#chatLoading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.dark #chatLoading {
    background: #0f172a;
}

#chatLoading.hidden {
    display: none;
}