/* =========================================
   Class 9 Science Guide Hindi
   Theme: Saffron / Indigo / Emerald (India Education)
   ========================================= */

:root {
    --primary-color: #f97316;    /* Saffron Orange */
    --secondary-color: #6366f1;  /* Indigo */
    --accent-color: #10b981;     /* Emerald Green */
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-hover: rgba(51, 65, 85, 0.5);
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Ambient Glow */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(249, 115, 22, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

/* Glass Components */
.glass-nav {
    background: rgba(15, 23, 42, 0.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.1);
}

/* Navbar */
.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-hindi {
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: 400;
    display: block;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-main);
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero */
.hero {
    padding: 7rem 1.5rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-symbols span {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.15;
    animation: float 25s infinite linear;
    z-index: -1;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.25; }
    90% { opacity: 0.25; }
    100% { transform: translateY(-20vh) rotate(360deg); opacity: 0; }
}

.badge-pulse {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(249, 115, 22, 0.35);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    animation: pulse-saffron 2.5s infinite;
}

@keyframes pulse-saffron {
    0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
    100% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

.hero h1 {
    font-size: 3.2rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #f97316 50%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #ea580c);
    color: white;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-main);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -8px rgba(249, 115, 22, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    font-family: var(--font-main);
    cursor: pointer;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255,255,255,0.2);
}

.btn-indigo {
    background: linear-gradient(135deg, var(--secondary-color), #4338ca);
    color: white;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-main);
}

.btn-indigo:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -8px rgba(99, 102, 241, 0.5);
}

.btn-green {
    background: linear-gradient(135deg, var(--accent-color), #059669);
    color: white;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-main);
}

.btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -8px rgba(16, 185, 129, 0.5);
}

/* Stats */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.stat-item { text-align: center; }

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section */
.section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.tag-orange { background: rgba(249,115,22,0.15); color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }
.tag-indigo { background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }
.tag-green  { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.tag-blue   { background: rgba(56,189,248,0.15); color: #38bdf8; border: 1px solid rgba(56,189,248,0.3); }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.feature-card {
    text-align: center;
}

.feature-icon {
    width: 60px; height: 60px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.25rem;
}

/* Chapter List */
.chapter-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary-color);
}

.chapter-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chapter-num {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(249,115,22,0.15);
    color: var(--primary-color);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.chapter-info { flex: 1; }
.chapter-info h3 { margin: 0; font-size: 1rem; }
.chapter-info p { margin: 0.25rem 0 0; font-size: 0.8rem; color: var(--text-muted); }

.chapter-actions {
    display: none;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.chapter-actions.open { display: flex; animation: slide-down 0.3s ease; }

.action-btn {
    flex: 1;
    min-width: 130px;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    transition: 0.2s;
    font-family: var(--font-main);
    text-align: center;
}

.action-btn.notes-btn {
    background: rgba(249,115,22,0.15);
    color: #fb923c;
    border: 1px solid rgba(249,115,22,0.3);
}
.action-btn.notes-btn:hover { background: rgba(249,115,22,0.25); }

.action-btn.quiz-btn {
    background: rgba(99,102,241,0.15);
    color: #818cf8;
    border: 1px solid rgba(99,102,241,0.3);
}
.action-btn.quiz-btn:hover { background: rgba(99,102,241,0.25); }

.action-btn.revision-btn {
    background: rgba(16,185,129,0.15);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.3);
}
.action-btn.revision-btn:hover { background: rgba(16,185,129,0.25); }

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mock Test Cards */
.mock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.mock-card {
    text-align: center;
    padding: 2rem 1.5rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s;
}

.mock-card:hover {
    border-color: var(--secondary-color);
}

.mock-number {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), #4338ca);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin: 0 auto 1rem;
}

/* Quiz / Notes Overlay */
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 1rem;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.overlay-container {
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
}

.overlay-header {
    padding: 1.25rem 1.5rem;
    background: rgba(0,0,0,0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.overlay-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.overlay-close-btn:hover { color: var(--error); }

.overlay-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Progress */
.progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.08);
    width: 100%;
    flex-shrink: 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.4s ease;
}

/* Options */
.option-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.875rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.95rem;
    text-align: left;
    font-family: var(--font-main);
}

.option-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.25);
}

.option-letter {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.option-btn.correct { background: rgba(34,197,94,0.1); border-color: var(--success); }
.option-btn.correct .option-letter { background: var(--success); color: white; }
.option-btn.wrong { background: rgba(239,68,68,0.1); border-color: var(--error); }
.option-btn.wrong .option-letter { background: var(--error); color: white; }

/* Score Circle */
.score-circle {
    width: 140px; height: 140px;
    border-radius: 50%;
    border: 5px solid;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
}

/* Notes Styles */
.notes-content h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(249,115,22,0.2);
}

.notes-content h4 {
    font-size: 1rem;
    color: var(--secondary-color);
    margin: 1.25rem 0 0.5rem;
}

.notes-content ul {
    padding-left: 1.5rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
}

.notes-content li {
    margin-bottom: 0.5rem;
    line-height: 1.65;
}

.notes-content .highlight {
    background: rgba(249,115,22,0.1);
    border-left: 3px solid var(--primary-color);
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.notes-content .formula-box {
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 1rem;
    color: #a5b4fc;
    text-align: center;
}

.notes-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.notes-content th {
    background: rgba(249,115,22,0.15);
    color: var(--primary-color);
    padding: 0.6rem 1rem;
    text-align: left;
    border: 1px solid var(--glass-border);
}

.notes-content td {
    padding: 0.6rem 1rem;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.notes-content tr:nth-child(even) td {
    background: rgba(255,255,255,0.02);
}

/* Revision Card */
.revision-point {
    background: rgba(255,255,255,0.03);
    border-left: 3px solid var(--accent-color);
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* Timer */
.quiz-timer {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(16,185,129,0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(16,185,129,0.25);
}

.quiz-timer.warning { color: var(--warning); background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.25); }
.quiz-timer.danger { color: var(--error); background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.25); }

/* FAQ */
details.glass-card { padding: 0; overflow: hidden; cursor: pointer; }
details summary {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}
details summary::-webkit-details-marker { display: none; }
details summary span.plus { color: var(--primary-color); font-size: 1.3rem; }
details[open] summary span.plus { transform: rotate(45deg); display: inline-block; }
details div.faq-body {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: #0a1020;
    border-top: 1px solid var(--glass-border);
    padding: 4rem 1.5rem 2rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-links a, .footer-network a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 0.75rem;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover, .footer-network a:hover { color: var(--primary-color); }

/* Scroll Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    
    .nav-links {
        position: fixed;
        top: 68px; left: 0;
        width: 100%;
        background: #0f172a;
        padding: 1.5rem;
        flex-direction: column;
        border-bottom: 1px solid var(--glass-border);
        transform: translateY(-150%);
        transition: 0.3s;
        gap: 1.2rem;
    }
    .nav-links.open { transform: translateY(0); }
    .menu-toggle { display: flex; }
    
    .stats-bar { gap: 1.5rem; }
    .stat-item { flex: 1 1 40%; }
    
    .overlay-body { padding: 1.25rem; }
    
    .section { padding: 4rem 1rem; }
}

@media (max-width: 480px) {
    .hero { padding: 5rem 1rem 3rem; }
    .action-btn { min-width: 100%; }
}
