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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: #07111f;
    color: white;
    overflow-x: hidden;
}

.background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.22), transparent 28%),
        radial-gradient(circle at 90% 10%, rgba(168, 85, 247, 0.24), transparent 30%),
        radial-gradient(circle at 50% 90%, rgba(34, 197, 94, 0.16), transparent 25%),
        linear-gradient(135deg, #020617, #0f172a, #111827);
    background-size: 260% 260%;
    animation: bgMove 14s ease infinite;
}

@keyframes bgMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.navbar {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1150px, calc(100% - 30px));
    z-index: 100;
    padding: 14px 20px;
    border-radius: 999px;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(16px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}

.logo {
    font-weight: 900;
    color: #67e8f9;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 999px;
    transition: 0.25s;
}

.nav-links a:hover {
    background: white;
    color: #0f172a;
}

.hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 130px 20px 70px;
}

.badge {
    display: inline-block;
    margin-bottom: 22px;
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.20);
    color: #86efac;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: clamp(3.4rem, 10vw, 8.5rem);
    line-height: 0.95;
    background: linear-gradient(90deg, #67e8f9, #86efac, #fde047, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-transform: uppercase;
    letter-spacing: -3px;
}

.subtitle {
    max-width: 820px;
    margin: 26px auto 34px;
    color: #d1d5db;
    font-size: clamp(1.15rem, 2.5vw, 1.55rem);
    line-height: 1.6;
    font-weight: 700;
}

.main-btn,
#checkBtn {
    display: inline-block;
    border: none;
    text-decoration: none;
    border-radius: 999px;
    padding: 17px 28px;
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(135deg, #06b6d4, #22c55e, #eab308);
    color: #06101d;
    box-shadow: 0 18px 38px rgba(34, 197, 94, 0.25);
    transition: 0.25s;
}

.main-btn:hover,
#checkBtn:hover {
    transform: translateY(-6px) scale(1.04);
}

main {
    width: min(1180px, calc(100% - 36px));
    margin: auto;
}

.lesson,
.recap,
.quiz {
    margin: 34px auto;
    padding: clamp(26px, 4vw, 46px);
    border-radius: 34px;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(14px);
    box-shadow: 0 22px 55px rgba(0,0,0,0.35);
    position: relative;
    overflow: hidden;
}

.lesson::before,
.quiz::before,
.recap::before {
    content: "";
    position: absolute;
    inset: -60%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.18), transparent);
    transform: translateX(-90%) rotate(20deg);
    transition: 0.7s;
}

.lesson:hover::before,
.quiz:hover::before,
.recap:hover::before {
    transform: translateX(90%) rotate(20deg);
}

.lesson-icon {
    font-size: 3.5rem;
    margin-bottom: 14px;
}

.lesson h2,
.recap h2,
.quiz h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 15px;
    color: #67e8f9;
}

.lesson p,
.quiz-text {
    color: #d1d5db;
    font-size: 1.15rem;
    line-height: 1.65;
    font-weight: 700;
}

.formula {
    margin: 22px 0;
    padding: 20px;
    border-radius: 22px;
    background: #020617;
    border: 1px solid rgba(103, 232, 249, 0.35);
    color: #fde047;
    font-size: clamp(1.8rem, 4vw, 3rem);
    text-align: center;
    font-weight: 900;
    box-shadow: inset 0 0 25px rgba(103, 232, 249, 0.08);
}

.example {
    margin-top: 22px;
    padding: 22px;
    border-radius: 22px;
    background: rgba(255,255,255,0.08);
    border-left: 6px solid #22c55e;
}

.example h3 {
    margin-bottom: 10px;
    color: #86efac;
    font-size: 1.5rem;
}

.example p {
    margin-bottom: 7px;
}

.recap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.recap-grid div {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.16);
    font-weight: 800;
    color: #e5e7eb;
}

.question {
    margin-top: 25px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.65);
    border: 1px solid rgba(255,255,255,0.16);
}

.question h3 {
    color: #fde047;
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.question p {
    color: #e5e7eb;
    line-height: 1.6;
    font-weight: 700;
    margin-bottom: 18px;
}

#answer {
    width: 100%;
    padding: 17px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.18);
    outline: none;
    background: #020617;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

#answer:focus {
    border-color: #67e8f9;
    box-shadow: 0 0 0 4px rgba(103,232,249,0.12);
}

#result {
    margin-top: 18px;
    font-size: 1.3rem;
    font-weight: 900;
}

.correct {
    color: #86efac !important;
}

.wrong {
    color: #fca5a5 !important;
}

footer {
    text-align: center;
    padding: 40px 20px 50px;
    color: #cbd5e1;
    font-weight: 800;
}

.particle {
    position: fixed;
    pointer-events: none;
    z-index: 300;
    font-size: 1.5rem;
    animation: pop 0.9s ease-out forwards;
}

@keyframes pop {
    from {
        transform: translate(0,0) scale(0.2);
        opacity: 1;
    }
    to {
        transform: translate(var(--x), var(--y)) scale(1.8);
        opacity: 0;
    }
}

@media (max-width: 780px) {
    .navbar {
        border-radius: 24px;
        flex-direction: column;
        gap: 10px;
    }

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

    .hero h1 {
        letter-spacing: -1px;
    }
}
