:root {
    --primary-color: #00f2fe;
    --secondary-color: #4facfe;
    --accent-color: #a78bfa;
    --accent-2: #f97316;
    --background-dark: #060c1a;
    --background-mid: #0d1b38;
    --background-card: rgba(13, 27, 56, 0.75);
    --text-main: #f0f6ff;
    --text-muted: #8b9fc7;
    --glass-border: rgba(100, 160, 255, 0.15);
    --glass-glow: rgba(0, 242, 254, 0.08);
    --font-main: 'Outfit', sans-serif;
    --transition-speed: 0.3s;
    --card-radius: 20px;
}

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

html {
    scroll-behavior: smooth;
}

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

/* ═══════════════════════════════════════
   ANIMATED BACKGROUND
═══════════════════════════════════════ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(0, 242, 254, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(79, 172, 254, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(167, 139, 250, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ═══════════════════════════════════════
   GLASSMORPHISM UTILITIES
═══════════════════════════════════════ */
.glass-card {
    background: var(--background-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
}

.glass-nav {
    background: rgba(6, 12, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ═══════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.15;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    text-align: center;
    margin-bottom: 2.5rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

/* ═══════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo img {
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.5));
}

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

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.25s;
}

.nav-links a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ═══════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════ */
.hero {
    padding: 9rem 5% 5rem;
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.3);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(0, 242, 254, 0);
    }
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 1.5rem auto 2.5rem;
    line-height: 1.8;
}

/* Floating Math Symbols */
.hero-floats {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.float-sym {
    position: absolute;
    font-size: 1.4rem;
    color: rgba(0, 242, 254, 0.12);
    font-weight: 700;
    animation: float-drift 8s ease-in-out infinite;
    font-family: 'Outfit', serif;
}

.float-sym:nth-child(1) {
    top: 15%;
    left: 8%;
    animation-delay: 0s;
    font-size: 2rem;
}

.float-sym:nth-child(2) {
    top: 60%;
    left: 5%;
    animation-delay: 1.5s;
}

.float-sym:nth-child(3) {
    top: 25%;
    right: 8%;
    animation-delay: 0.7s;
    font-size: 1.8rem;
}

.float-sym:nth-child(4) {
    top: 70%;
    right: 10%;
    animation-delay: 2s;
}

.float-sym:nth-child(5) {
    top: 45%;
    left: 3%;
    animation-delay: 3s;
    font-size: 1rem;
}

.float-sym:nth-child(6) {
    top: 80%;
    right: 5%;
    animation-delay: 1s;
    font-size: 1.1rem;
}

@keyframes float-drift {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.12;
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
        opacity: 0.22;
    }
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--glass-border);
}

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

.stat-item .stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-item .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════
   CTA BUTTONS
═══════════════════════════════════════ */
.cta-buttons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #060c1a;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
    border: none;
    cursor: pointer;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 242, 254, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════
   SECTION HEADERS (with gradient underline)
═══════════════════════════════════════ */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header .tag {
    display: inline-block;
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: var(--accent-color);
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
}

.section-header h2 {
    margin-bottom: 0.6rem;
}

.section-header p {
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ═══════════════════════════════════════
   FEATURES GRID
═══════════════════════════════════════ */
.features {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

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

.feature-card {
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, -10%), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: var(--card-radius);
    pointer-events: none;
    z-index: 1;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* ═══════════════════════════════════════
   ADSENSE WRAPPER
═══════════════════════════════════════ */
.ad-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 5%;
    text-align: center;
}

.ad-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════
   TOPICS / CHAPTER GRID
═══════════════════════════════════════ */
.topics {
    padding: 2rem 5% 5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.topic-card {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(13, 27, 56, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    overflow: hidden;
    position: relative;
}

.topic-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, -10%), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: var(--card-radius);
    pointer-events: none;
    z-index: 1;
}

.topic-card:hover::before {
    opacity: 1;
}

.topic-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    border-radius: 0 0 var(--card-radius) var(--card-radius);
}

.topic-card:hover::after {
    transform: scaleX(1);
}

.topic-card:hover {
    background: rgba(0, 242, 254, 0.06);
    transform: translateY(-6px);
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 242, 254, 0.1);
}

.topic-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(79, 172, 254, 0.1));
    border: 1px solid rgba(0, 242, 254, 0.2);
    padding: 0.5rem;
    border-radius: 14px;
    width: 54px;
    height: 54px;
    min-width: 54px;
    max-width: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    align-self: center;
    word-break: break-all;
    text-overflow: clip;
    white-space: nowrap;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 242, 254, 0.15);
}

.topic-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0;
    line-height: 1.3;
}

.topic-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ═══════════════════════════════════════
   HOW IT WORKS SECTION
═══════════════════════════════════════ */
.how-it-works {
    padding: 5rem 5%;
    max-width: 1000px;
    margin: 0 auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    position: relative;
}

.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.step-number {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #060c1a;
    font-weight: 700;
    font-size: 1.3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.35);
}

/* ═══════════════════════════════════════
   QUIZ INTERFACE
═══════════════════════════════════════ */
.quiz-container {
    padding: 6rem 5% 4rem;
    max-width: 800px;
    margin: 0 auto;
    min-height: 80vh;
}

.quiz-header {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.question-card {
    padding: 2rem;
    margin-bottom: 2rem;
    animation: slide-up 0.35s ease;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.75rem;
    line-height: 1.65;
    color: var(--text-main);
}

.options-grid {
    display: grid;
    gap: 0.85rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.25rem;
    border-radius: 14px;
    text-align: left;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.98rem;
    font-family: var(--font-main);
    width: 100%;
}

.option-btn:hover {
    background: rgba(0, 242, 254, 0.07);
    border-color: rgba(0, 242, 254, 0.3);
    transform: translateX(4px);
}

.option-btn.correct {
    background: rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.option-btn.wrong {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
}

.score-display {
    text-align: center;
    padding: 3rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto 2rem;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.1), transparent);
    box-shadow: 0 0 40px rgba(0, 242, 254, 0.2);
    animation: score-reveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes score-reveal {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    background: rgba(6, 12, 26, 0.6);
}

.footer-links {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0;
}

.footer-network {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.footer-network h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.network-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}

.network-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color 0.2s;
}

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

/* ═══════════════════════════════════════
   REVEAL ANIMATION
═══════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════
   MOBILE RESPONSIVE
═══════════════════════════════════════ */
.menu-toggle {
    display: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 7rem 5% 3rem;
    }

    .navbar {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 5%;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .stats-bar {
        gap: 2rem;
    }

    .feature-grid,
    .topic-grid {
        grid-template-columns: 1fr 1fr;
    }

    .menu-toggle {
        display: block;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {

    .feature-grid,
    .topic-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .stats-bar {
        gap: 1.5rem;
    }
}