/* Dark Mode Variables (Default) */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

/* Light Mode Variables - Applied when body has .light class */
body.light {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Remove the old .dark class, use .light instead */
body:not(.light) {
    /* Dark mode is default, no class needed */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}
/* Rest of the CSS remains the same */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.nav-brand { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; }
.brand-icon { font-size: 28px; }
.brand-name { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-menu { display: flex; gap: 32px; list-style: none; }
.nav-link { color: var(--text-primary); text-decoration: none; font-weight: 500; transition: color 0.3s; cursor: pointer; }
.nav-link:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; }

/* Theme Wrapper */
.theme-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.theme-label {
    font-size: 13px;
    color: var(--text-secondary);
}
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    gap: 8px;
    transition: all 0.3s;
}
.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}
.theme-toggle i {
    font-size: 16px;
    transition: all 0.3s;
}
.theme-toggle .fa-sun { color: #f59e0b; }
.theme-toggle .fa-moon { color: #818cf8; }
body:not(.light) .theme-toggle .fa-sun { display: inline-block; }
body.light .theme-toggle .fa-moon { display: inline-block; }
body.light .theme-toggle .fa-sun { display: none; }
body:not(.light) .theme-toggle .fa-moon { display: none; }

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 60px;
    position: relative;
}
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.1);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 14px;
    margin-bottom: 24px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.hero-title { font-size: 56px; font-weight: 800; line-height: 1.2; margin-bottom: 24px; color: var(--text-primary); }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-description { font-size: 18px; color: var(--text-secondary); margin-bottom: 24px; }
.hero-quote {
    font-size: 16px;
    color: var(--primary-light);
    margin-bottom: 32px;
    padding-left: 20px;
    border-left: 3px solid var(--secondary);
    font-style: italic;
}
.hero-stats { display: flex; gap: 32px; margin: 32px 0; flex-wrap: wrap; }
.stat {
    text-align: center;
    background: var(--bg-card);
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.stat-number { font-size: 32px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Hero Visual */
.hero-visual { position: relative; height: 400px; }
.orb {
    width: 300px;
    height: 300px;
    background: var(--gradient);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(80px);
    opacity: 0.3;
}
.floating-card {
    position: absolute;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    animation: float 3s ease-in-out infinite;
    color: var(--text-primary);
}
.card-1 { top: 20%; left: 0; animation-delay: 0s; }
.card-2 { bottom: 30%; right: 0; animation-delay: 0.5s; }
.card-3 { top: 50%; right: 20%; animation-delay: 1s; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Search Section */
.search-section {
    padding: 60px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.search-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.search-container h2 { font-size: 28px; margin-bottom: 20px; color: var(--text-primary); }
.search-box { display: flex; gap: 12px; margin-bottom: 32px; }
.search-input {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
}
.search-input:focus { outline: none; border-color: var(--primary); }
.search-btn {
    padding: 16px 32px;
    background: var(--gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}
.results-list { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; max-height: 400px; overflow-y: auto; }
.result-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    text-align: left;
}
.result-item:hover { border-color: var(--primary); transform: translateX(4px); }
.result-title { font-size: 16px; font-weight: 600; color: var(--primary-light); margin-bottom: 8px; }
.result-excerpt { font-size: 13px; color: var(--text-muted); }

/* AI Section */
.ai-section {
    padding: 80px 0;
    background: var(--bg-primary);
}
.ai-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
}
.ai-header {
    padding: 20px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}
.model-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.model-selector-wrapper label {
    font-weight: 600;
    color: var(--primary-light);
}
.ai-model-select {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
}
.ai-chat-area {
    padding: 24px;
}
.ai-messages {
    height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 8px;
}
.ai-messages .message {
    margin-bottom: 16px;
}
.ai-messages .message .message-content {
    max-width: 85%;
    padding: 12px 16px;
}
.ai-input-group {
    display: flex;
    gap: 12px;
}
.ai-input {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
}
.ai-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Model Info Cards */
.model-info-cards {
    display: flex;
    gap: 24px;
    padding: 0 24px 24px 24px;
    flex-wrap: wrap;
}
.info-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}
.info-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}
.info-icon {
    font-size: 32px;
    margin-bottom: 12px;
}
.info-card h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--primary-light);
}
.info-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}
.info-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.info-tags span {
    font-size: 11px;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    color: var(--text-muted);
}

/* Pricing Section */
.pricing-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}
.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    width: 380px;
    transition: all 0.3s;
    position: relative;
}
.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.02);
}
.pricing-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--gradient);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}
.pricing-price {
    font-size: 48px;
    font-weight: 800;
    margin: 20px 0 10px;
    color: var(--text-primary);
}
.pricing-price span {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-muted);
}
.pricing-card h3 { font-size: 24px; margin-bottom: 20px; }
.pricing-features { list-style: none; margin: 20px 0; }
.pricing-features li { padding: 8px 0; display: flex; align-items: center; gap: 10px; color: var(--text-secondary); }
.pricing-features li i.fa-check { color: #10b981; }
.pricing-features li i.fa-times { color: #ef4444; }
.pricing-btn {
    width: 100%;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.pricing-btn.primary {
    background: var(--gradient);
    border: none;
    color: white;
}
.pricing-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.trial-note {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
}

/* Features */
.features { padding: 80px 0; background: var(--bg-primary); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    margin-bottom: 16px;
}
.section-title { font-size: 40px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.section-description { font-size: 18px; color: var(--text-muted); max-width: 700px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s;
}
.feature-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.feature-icon i { font-size: 32px; color: var(--primary); }
.feature-card h3 { font-size: 22px; margin-bottom: 12px; color: var(--text-primary); }
.feature-card p { color: var(--text-muted); }

/* Daily Features */
.daily-features { padding: 80px 0; background: var(--bg-secondary); }
.daily-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.daily-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
}
.daily-card h3 { font-size: 18px; color: var(--primary-light); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.daily-card p { color: var(--text-muted); font-size: 14px; }
.read-more { color: var(--secondary); text-decoration: none; font-size: 13px; display: inline-block; margin-top: 12px; }

/* Support */
.support {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    text-align: center;
}
.support h2 { font-size: 36px; margin-bottom: 16px; color: var(--text-primary); }
.support p { max-width: 600px; margin: 0 auto 32px; color: var(--text-muted); }
.support-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient);
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
}
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-muted); margin-top: 12px; font-size: 14px; }
.footer-links h4 { margin-bottom: 16px; font-size: 18px; color: var(--text-primary); }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
.footer-bottom i { color: var(--primary); }

/* Chat Button Wrapper */
.chat-button-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}
.chat-caption {
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    white-space: nowrap;
}
.chat-button {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.3s;
}
.chat-button:hover { transform: scale(1.1); }
.chat-button i { font-size: 28px; color: white; }
.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 20px;
}

/* Chat Modal */
.chat-modal {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 500px;
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
}
.chat-modal.active { display: flex; }
.chat-modal-header {
    padding: 16px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
}
.model-badge {
    background: rgba(99, 102, 241, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    color: var(--primary-light);
}
.chat-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}
.chat-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-primary);
}
.chat-modal-footer {
    padding: 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}
.chat-input-group {
    display: flex;
    gap: 8px;
}
.chat-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
}
.microphone-btn, .send-btn {
    padding: 10px 14px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--primary);
    cursor: pointer;
}
.send-btn { background: var(--gradient); color: white; border: none; }

/* Message styling */
.message { margin-bottom: 16px; display: flex; }
.message.user { justify-content: flex-end; }
.message.user .message-content { background: var(--primary); border-radius: 18px 18px 4px 18px; color: white; }
.message.assistant .message-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px 18px 18px 4px;
    color: var(--text-primary);
}
.message-content {
    max-width: 85%;
    padding: 10px 14px;
    line-height: 1.5;
    font-size: 14px;
}
.message-content ul, .message-content ol { margin: 6px 0 6px 18px; }
.message-content li { margin: 2px 0; }
.message-content p { margin: 4px 0; }

.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.typing-indicator { display: flex; gap: 4px; padding: 12px 16px; }
.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

@media (max-width: 968px) {
    .hero .container, .daily-grid, .footer-content, .pricing-grid, .model-info-cards { grid-template-columns: 1fr; flex-direction: column; }
    .hero-title { font-size: 36px; }
    .section-title { font-size: 28px; }
    .nav-menu { display: none; }
    .pricing-card.featured { transform: none; }
    .chat-modal { width: 90%; right: 5%; bottom: 80px; height: 500px; }
    .ai-header { padding: 16px; }
    .model-selector-wrapper { flex-direction: column; align-items: stretch; }
    .model-info-cards { display: flex; }
    .chat-caption { display: none; }
    .theme-label { display: none; }
}

/* Theme Toggle Icon Display - Fixed */
body.dark .theme-toggle .fa-sun { display: inline-block; }
body.dark .theme-toggle .fa-moon { display: none; }
body.light .theme-toggle .fa-moon { display: inline-block; }
body.light .theme-toggle .fa-sun { display: none; }
body:not(.dark):not(.light) .theme-toggle .fa-moon { display: none; }
body:not(.dark):not(.light) .theme-toggle .fa-sun { display: inline-block; }

/* Default (dark mode) - show sun icon for switching to light */
.theme-toggle .fa-sun { display: inline-block; }
.theme-toggle .fa-moon { display: none; }

/* When light mode is active - show moon icon for switching to dark */
body.light .theme-toggle .fa-sun { display: none; }
body.light .theme-toggle .fa-moon { display: inline-block; }

/* When dark mode is active - show sun icon for switching to light */
body.dark .theme-toggle .fa-sun { display: inline-block; }
body.dark .theme-toggle .fa-moon { display: none; }
