/* ═══════════════════════════════════════════════
   AI EDUCATION PLATFORM - Global Styles
   India's First AI Content Integration Partner
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ─── CSS Variables ─── */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #0f0f2e;
    --bg-card: rgba(20, 20, 50, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --accent-primary: #6c5ce7;
    --accent-secondary: #a29bfe;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --gradient-primary: linear-gradient(135deg, #6c5ce7, #a29bfe, #74b9ff);
    --gradient-accent: linear-gradient(135deg, #fd79a8, #e17055, #fdcb6e);
    --gradient-success: linear-gradient(135deg, #00b894, #55efc4);
    --gradient-card: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(162, 155, 254, 0.05));
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(108, 92, 231, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', -apple-system, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 3px; }

/* ─── Navigation ─── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 1rem 2rem;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}
.navbar.scrolled { padding: 0.6rem 2rem; background: rgba(10, 10, 26, 0.95); }

.nav-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.nav-logo-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.nav-logo-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.nav-logo-text {
    font-size: 1.3rem; font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
    text-decoration: none; color: var(--text-secondary);
    font-weight: 500; font-size: 0.9rem;
    transition: var(--transition-fast); position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-smooth);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    padding: 0.6rem 1.5rem !important;
    background: var(--gradient-primary) !important;
    border-radius: var(--radius-xl) !important;
    color: white !important; font-weight: 600 !important;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.nav-cta:hover { transform: translateY(-2px); }
.nav-cta::after { display: none !important; }

.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* ─── Hero ─── */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 6rem 2rem 4rem; overflow: hidden;
}
#hero-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 900px; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    font-size: 0.85rem; color: var(--accent-secondary); font-weight: 500;
    margin-bottom: 1.5rem; backdrop-filter: blur(10px);
    animation: fadeInDown 0.8s ease;
}
.hero-badge .pulse-dot {
    width: 8px; height: 8px; background: #00b894;
    border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.5; } }

.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; animation: fadeInUp 0.8s ease 0.2s both; }
.hero h1 .gradient-text, .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { font-size: 1.15rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 2rem; animation: fadeInUp 0.8s ease 0.4s both; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; animation: fadeInUp 0.8s ease 0.6s both; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 2rem; border-radius: var(--radius-xl);
    font-family: var(--font-primary); font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: var(--transition-smooth);
    text-decoration: none; border: none;
}
.btn-primary { background: var(--gradient-primary); color: white; box-shadow: 0 4px 20px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-secondary { background: var(--bg-glass); color: var(--text-primary); border: 1px solid var(--border-glass); backdrop-filter: blur(10px); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-3px); }
.btn-icon { font-size: 1.1rem; }

/* ─── Stats Bar ─── */
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; max-width: 1100px; margin: 0 auto; padding: 3rem 2rem; }
.stat-item { text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.3rem; }

/* ─── Section Headers ─── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
    display: inline-block; padding: 0.3rem 1rem;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    font-size: 0.8rem; color: var(--accent-secondary); font-weight: 500;
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1rem;
}
.section-header h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; margin-bottom: 1rem; }
.section-header p { color: var(--text-secondary); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ─── Subject Selector ─── */
.subject-selector { padding: 4rem 2rem; }
.details-only-card {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}
.details-only-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.subjects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; max-width: 900px; margin: 0 auto 3rem; }
.subject-card {
    padding: 1.5rem 1rem; background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: var(--radius-md); text-align: center;
    cursor: pointer; transition: var(--transition-smooth); backdrop-filter: blur(10px);
}
.subject-card:hover { transform: translateY(-5px); border-color: var(--accent-primary); box-shadow: var(--shadow-glow); }
.subject-card.active { border-color: var(--accent-primary); background: rgba(108, 92, 231, 0.15); box-shadow: var(--shadow-glow); }
.subject-card .subject-icon { font-size: 2.2rem; margin-bottom: 0.5rem; display: block; }
.subject-card .subject-name { font-weight: 600; font-size: 0.9rem; }

/* ─── Demo Preview ─── */
.demo-preview { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.demo-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; min-height: 400px; }
.demo-visual {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    background: var(--bg-glass); border: 1px solid var(--border-glass); min-height: 400px;
}
.demo-visual canvas { width: 100%; height: 100%; display: block; }
.demo-interaction { display: flex; flex-direction: column; gap: 1.5rem; }

/* ─── Glass Card ─── */
.glass-card {
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg); padding: 1.5rem;
    backdrop-filter: blur(10px); transition: var(--transition-smooth);
}
.glass-card:hover { border-color: rgba(255, 255, 255, 0.2); }
.glass-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }

/* ─── MCQ ─── */
.mcq-question { font-size: 1rem; font-weight: 500; margin-bottom: 1rem; line-height: 1.5; }
.mcq-options { display: flex; flex-direction: column; gap: 0.5rem; }
.mcq-option {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.8rem 1rem; background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass); border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition-fast); font-size: 0.9rem;
}
.mcq-option:hover { background: rgba(108, 92, 231, 0.1); border-color: var(--accent-primary); }
.mcq-option.correct { background: rgba(0, 184, 148, 0.15); border-color: #00b894; }
.mcq-option.incorrect { background: rgba(214, 48, 49, 0.15); border-color: #d63031; }

.mcq-option .option-marker {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid var(--border-glass);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.8rem; flex-shrink: 0;
}
.mcq-option.correct .option-marker { background: #00b894; border-color: #00b894; color: white; }
.mcq-option.incorrect .option-marker { background: #d63031; border-color: #d63031; color: white; }

.mcq-explanation {
    margin-top: 1rem; padding: 1rem;
    background: rgba(108, 92, 231, 0.1);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; display: none;
}
.mcq-explanation.show { display: block; animation: fadeInUp 0.3s ease; }

.mcq-score {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem; background: rgba(0, 184, 148, 0.1);
    border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.9rem;
}

.mcq-next-btn {
    margin-top: 1rem; width: 100%; padding: 0.7rem;
    background: var(--gradient-primary); border: none; border-radius: var(--radius-sm);
    color: white; font-family: var(--font-primary); font-weight: 600; font-size: 0.9rem;
    cursor: pointer; transition: var(--transition-smooth);
}
.mcq-next-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px var(--accent-glow); }

/* ─── Flashcard ─── */
.flashcard-container { perspective: 1000px; }
.flashcard {
    width: 100%; min-height: 180px; position: relative; cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d;
}
.flashcard.flipped { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back {
    position: absolute; inset: 0; backface-visibility: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 1.5rem; border-radius: var(--radius-md); text-align: center;
}
.flashcard-front { background: var(--gradient-card); border: 1px solid var(--border-glass); }
.flashcard-back { background: rgba(108, 92, 231, 0.15); border: 1px solid var(--accent-primary); transform: rotateY(180deg); }
.flashcard-front .card-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.flashcard-front h4 { font-size: 1.1rem; font-weight: 600; }
.flashcard-front .flip-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }
.flashcard-back p { font-size: 0.9rem; line-height: 1.6; color: var(--text-secondary); }
.flashcard-nav { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.flashcard-nav button {
    padding: 0.5rem 1rem; background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm); color: var(--text-primary); cursor: pointer;
    font-family: var(--font-primary); font-size: 0.8rem; transition: var(--transition-fast);
}
.flashcard-nav button:hover { background: rgba(108, 92, 231, 0.2); border-color: var(--accent-primary); }

/* ─── Controls ─── */
.control-group { margin-bottom: 0.75rem; }
.control-group label { display: block; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.3rem; font-weight: 500; }
.control-group input[type="range"] { width: 100%; -webkit-appearance: none; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; outline: none; }
.control-group input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: var(--accent-primary); border-radius: 50%; cursor: pointer; box-shadow: 0 0 10px var(--accent-glow); }
.control-group .value-display { text-align: right; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-secondary); }

/* ─── Services ─── */
.services { padding: 5rem 2rem; background: var(--bg-secondary); position: relative; overflow: hidden; }
.services::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at 30% 50%, rgba(108,92,231,0.05) 0%, transparent 50%); pointer-events: none; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; max-width: 1100px; margin: 0 auto; }
.service-card {
    padding: 2.5rem; background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg); backdrop-filter: blur(10px); transition: var(--transition-smooth); overflow: hidden; position: relative;
}
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-primary); opacity: 0; transition: var(--transition-smooth); }
.service-card:hover { transform: translateY(-8px); border-color: rgba(108,92,231,0.3); box-shadow: var(--shadow-glow); }
.service-card:hover::before { opacity: 1; }
.service-icon { width: 60px; height: 60px; background: var(--gradient-primary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.5rem; }
.service-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.75rem; }
.service-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }
.service-features { list-style: none; margin-top: 1.5rem; }
.service-features li { padding: 0.4rem 0; color: var(--text-secondary); font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.service-features li::before { content: '✓'; color: #00b894; font-weight: 700; }

/* ─── Pricing ─── */
.pricing { padding: 5rem 2rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; max-width: 1100px; margin: 0 auto; }
.pricing-card {
    padding: 2.5rem; background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg); transition: var(--transition-smooth); text-align: center; position: relative;
}
.pricing-card.featured { border-color: var(--accent-primary); background: rgba(108,92,231,0.1); transform: scale(1.05); }
.pricing-card.featured::before { content: 'MOST POPULAR'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 0.3rem 1.5rem; background: var(--gradient-primary); border-radius: var(--radius-xl); font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; }
.pricing-card:hover { transform: translateY(-5px); border-color: var(--accent-primary); }
.pricing-card.featured:hover { transform: scale(1.05) translateY(-5px); }
.pricing-name { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.pricing-price { font-size: 3rem; font-weight: 800; margin-bottom: 0.25rem; }
.pricing-price .currency { font-size: 1.5rem; vertical-align: top; }
.pricing-period { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2rem; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 2rem; }
.pricing-features li { padding: 0.5rem 0; color: var(--text-secondary); font-size: 0.9rem; display: flex; align-items: center; gap: 0.75rem; }
.pricing-features li .check { color: #00b894; font-weight: 700; }
.pricing-btn { width: 100%; }

/* ─── CTA ─── */
.cta-section { padding: 5rem 2rem; text-align: center; position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(108,92,231,0.1) 0%, transparent 70%); pointer-events: none; }
.cta-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.cta-content h2 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 800; margin-bottom: 1rem; }
.cta-content p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 2rem; }

.contact-form { max-width: 500px; margin: 0 auto; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.4rem; color: var(--text-secondary); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.7rem 1rem; background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass); border-radius: var(--radius-sm);
    color: var(--text-primary); font-family: var(--font-primary); font-size: 0.9rem;
    outline: none; transition: var(--transition-fast);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-primary); box-shadow: 0 0 10px var(--accent-glow); }
.form-group textarea { resize: vertical; min-height: 100px; }

/* ─── Footer ─── */
.footer { padding: 3rem 2rem; background: var(--bg-secondary); border-top: 1px solid var(--border-glass); }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; transition: var(--transition-fast); }
.footer-links a:hover { color: var(--text-primary); }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; }

/* ─── Demo Page ─── */
.demo-page { padding-top: 80px; min-height: 100vh; }
.demo-tabs {
    display: flex; gap: 0.5rem; padding: 1rem 2rem; overflow-x: auto;
    max-width: 1200px; margin: 0 auto; scrollbar-width: none;
}
.demo-tabs::-webkit-scrollbar { display: none; }
.demo-tab {
    padding: 0.6rem 1.2rem; background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl); color: var(--text-secondary); cursor: pointer;
    font-family: var(--font-primary); font-weight: 500; font-size: 0.85rem;
    white-space: nowrap; transition: var(--transition-fast); display: flex; align-items: center; gap: 0.4rem;
}
.demo-tab:hover { background: rgba(108,92,231,0.1); color: var(--text-primary); }
.demo-tab.active { background: var(--accent-primary); border-color: var(--accent-primary); color: white; }

.demo-panel { display: none; padding: 2rem; max-width: 1200px; margin: 0 auto; animation: fadeInUp 0.4s ease; }
.demo-panel.active { display: block; }
.demo-panel-header { text-align: center; margin-bottom: 2rem; }
.demo-panel-header h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.demo-panel-header p { color: var(--text-secondary); font-size: 0.95rem; }

.imagine-banner {
    text-align: center; padding: 1rem; margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(162,155,254,0.1));
    border: 1px solid rgba(108,92,231,0.3); border-radius: var(--radius-md);
    font-weight: 600; color: var(--accent-secondary); font-size: 1rem;
}
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }

/* ─── Chatbot ─── */
.chat-container {
    max-width: 600px; margin: 0 auto; background: var(--bg-glass);
    border: 1px solid var(--border-glass); border-radius: var(--radius-lg);
    overflow: hidden; backdrop-filter: blur(10px);
}
.chat-header {
    padding: 1rem 1.5rem; background: rgba(108,92,231,0.15);
    border-bottom: 1px solid var(--border-glass);
    display: flex; align-items: center; gap: 0.75rem;
}
.chat-avatar { width: 38px; height: 38px; background: var(--gradient-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.chat-header-info h4 { font-size: 0.95rem; font-weight: 600; }
.chat-header-info span { font-size: 0.75rem; color: #00b894; }
.chat-messages { height: 400px; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.chat-message { max-width: 85%; padding: 0.8rem 1rem; border-radius: var(--radius-md); font-size: 0.9rem; line-height: 1.6; animation: fadeInUp 0.3s ease; }
.chat-message.bot { background: rgba(108,92,231,0.15); border: 1px solid rgba(108,92,231,0.2); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-message.user { background: var(--accent-primary); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-message .msg-content { white-space: pre-line; }
.chat-input-area { display: flex; gap: 0.5rem; padding: 1rem; border-top: 1px solid var(--border-glass); }
.chat-input-area input {
    flex: 1; padding: 0.7rem 1rem; background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass); border-radius: var(--radius-xl);
    color: var(--text-primary); font-family: var(--font-primary); font-size: 0.9rem; outline: none;
}
.chat-input-area input:focus { border-color: var(--accent-primary); }
.chat-input-area button {
    padding: 0.7rem 1.2rem; background: var(--gradient-primary); border: none;
    border-radius: var(--radius-xl); color: white; cursor: pointer;
    font-family: var(--font-primary); font-weight: 600; transition: var(--transition-smooth);
}

/* ─── Graph ─── */
.graph-container { position: relative; }
.graph-canvas-wrapper { width: 100%; height: 300px; background: rgba(0,0,0,0.2); border-radius: var(--radius-md); overflow: hidden; }
.graph-canvas-wrapper canvas { width: 100%; height: 100%; }
.graph-controls { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.graph-controls input {
    flex: 1; padding: 0.6rem 1rem; background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass); border-radius: var(--radius-sm);
    color: var(--text-primary); font-family: var(--font-mono); font-size: 0.85rem; outline: none;
}
.graph-controls input:focus { border-color: var(--accent-primary); }
.graph-controls button {
    padding: 0.6rem 1rem; background: var(--gradient-primary); border: none;
    border-radius: var(--radius-sm); color: white; cursor: pointer;
    font-family: var(--font-primary); font-weight: 600; font-size: 0.85rem;
}

/* ─── Timeline ─── */
.timeline { position: relative; padding: 1rem 0; }
.timeline::before { content: ''; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: var(--gradient-primary); }
.timeline-item { position: relative; padding-left: 50px; margin-bottom: 1.5rem; animation: fadeInUp 0.4s ease both; }
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-dot { position: absolute; left: 12px; top: 0; width: 18px; height: 18px; background: var(--accent-primary); border-radius: 50%; border: 3px solid var(--bg-primary); box-shadow: 0 0 10px var(--accent-glow); }
.timeline-item h4 { font-size: 0.9rem; font-weight: 600; }
.timeline-item .timeline-year { font-size: 0.75rem; color: var(--accent-secondary); font-weight: 600; font-family: var(--font-mono); }
.timeline-item p { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* ─── Vocabulary ─── */
.vocab-card { text-align: center; padding: 2rem; }
.vocab-word { font-size: 2rem; font-weight: 800; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.5rem; }
.vocab-pronunciation { font-family: var(--font-mono); color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.vocab-type { display: inline-block; padding: 0.2rem 0.8rem; background: rgba(108,92,231,0.2); border-radius: var(--radius-xl); font-size: 0.75rem; color: var(--accent-secondary); margin-bottom: 1rem; }
.vocab-meaning { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1rem; line-height: 1.6; }
.vocab-example { font-style: italic; color: var(--text-muted); font-size: 0.85rem; padding: 0.75rem; background: rgba(255,255,255,0.03); border-radius: var(--radius-sm); }
.vocab-nav { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }

/* ─── Synonym Game ─── */
.synonym-game { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.synonym-word, .synonym-match {
    padding: 0.7rem 1rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm); text-align: center; cursor: pointer; transition: var(--transition-fast); font-size: 0.85rem;
}
.synonym-word:hover, .synonym-match:hover { background: rgba(108,92,231,0.1); border-color: var(--accent-primary); }
.synonym-word.selected, .synonym-match.selected { border-color: var(--accent-primary); background: rgba(108,92,231,0.2); }
.synonym-word.matched, .synonym-match.matched { border-color: #00b894; background: rgba(0,184,148,0.15); pointer-events: none; }

/* ─── Periodic Table ─── */
.periodic-mini { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.4rem; }
.element-card {
    padding: 0.5rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border-glass);
    border-radius: 6px; text-align: center; cursor: pointer; transition: var(--transition-fast);
}
.element-card:hover { transform: scale(1.1); border-color: var(--accent-primary); box-shadow: 0 0 15px var(--accent-glow); }
.element-card .el-number { font-size: 0.6rem; color: var(--text-muted); }
.element-card .el-symbol { font-size: 1.1rem; font-weight: 700; }
.element-card .el-name { font-size: 0.55rem; color: var(--text-secondary); }

/* ─── Fill in Blank ─── */
.fill-blank-sentence { font-size: 1.1rem; line-height: 2; margin-bottom: 1rem; }
.fill-blank-sentence .blank { display: inline-block; min-width: 100px; border-bottom: 2px solid var(--accent-primary); padding: 0 0.5rem; color: var(--accent-secondary); font-weight: 600; }
.fill-options { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.fill-option {
    padding: 0.5rem 1rem; background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl); cursor: pointer; font-family: var(--font-primary);
    font-size: 0.85rem; color: var(--text-primary); transition: var(--transition-fast);
}
.fill-option:hover { background: rgba(108,92,231,0.2); border-color: var(--accent-primary); }
.fill-option.correct { background: rgba(0,184,148,0.2); border-color: #00b894; }
.fill-option.incorrect { background: rgba(214,48,49,0.2); border-color: #d63031; }

/* ─── Concept Panel ─── */
.concept-panel { padding: 1.5rem; }
.concept-panel h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; }
.concept-panel h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--accent-secondary); }
.concept-panel p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
.concept-formula { display: inline-block; padding: 0.5rem 1rem; background: rgba(108,92,231,0.1); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 1rem; margin: 0.5rem 0; color: var(--accent-secondary); }

/* ─── Map ─── */
.map-container { position: relative; }
.map-canvas { width: 100%; height: 300px; border-radius: var(--radius-md); overflow: hidden; }

/* ─── Overlay ─── */
.demo-visual-overlay {
    position: absolute; bottom: 1rem; left: 1rem; right: 1rem;
    padding: 0.75rem 1rem; background: rgba(10,10,26,0.85);
    backdrop-filter: blur(10px); border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass); font-size: 0.8rem; color: var(--text-secondary); z-index: 5;
}
.demo-visual-overlay strong { color: var(--text-primary); }

/* ─── Spinner ─── */
.spinner { width: 30px; height: 30px; border: 3px solid var(--border-glass); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 2rem auto; }

/* ─── Toast ─── */
.toast {
    position: fixed; bottom: 2rem; right: 2rem;
    padding: 1rem 1.5rem; background: rgba(20,20,50,0.95);
    border: 1px solid var(--border-glass); border-radius: var(--radius-md);
    backdrop-filter: blur(20px); z-index: 2000; animation: fadeInUp 0.4s ease;
    display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.toast.success { border-left: 3px solid #00b894; }
.toast.error { border-left: 3px solid #d63031; }

/* ─── Animations ─── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ─── */
@media (max-width: 968px) {
    .demo-preview-grid, .demo-grid { grid-template-columns: 1fr; }
    .pricing-card.featured { transform: none; }
    .pricing-card.featured:hover { transform: translateY(-5px); }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .nav-links.open {
        display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
        background: rgba(10,10,26,0.95); backdrop-filter: blur(20px);
        padding: 1.5rem 2rem; border-bottom: 1px solid var(--border-glass);
    }
    .hero h1 { font-size: 2rem; }
    .subjects-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
    .services-grid, .pricing-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; text-align: center; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .hero-buttons { flex-direction: column; align-items: center; }
    .demo-tabs { padding: 1rem; }
    .stats-bar { grid-template-columns: 1fr; }
}
