:root {
    --border-dark: #24466e;
    --accent: #4aa3ff;
    --accent2: #1f6fe5;

    --bg: #e6f4ff;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;

    --text: #102f4a;
    --muted: #557590;

    --line: rgba(16, 47, 74, 0.1);

    --brand: #4aa3ff;
    --brand-deep: #1f6fe5;

    --shadow: 0 24px 60px rgba(31, 111, 229, 0.14);

    --radius-xl: 32px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {

    min-height: 100vh;

    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;

    color: var(--text);

    background:
        radial-gradient(circle at top left,
            rgba(74, 163, 255, 0.18),
            transparent 28%),

        linear-gradient(180deg,
            #f7fbff 0%,
            var(--bg) 55%,
            #dcedff 100%);
}


/* =========================
   HEADER
========================= */

header {

    width: 98%;

    margin: 18px auto;

    padding: 18px 34px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    border-radius: var(--radius-lg);

    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 28px 80px rgba(31, 111, 229, 0.24);

    backdrop-filter: blur(18px);

    box-shadow: var(--shadow);
}

h1 {

    font-size: 42px;

    letter-spacing: -1px;

    background: linear-gradient(135deg, var(--accent), var(--accent2));

    background-clip: text;

    -webkit-background-clip: text;

    color: transparent;

    text-shadow:
        0 0 10px rgba(93, 48, 255, 0.2),
        0 0 20px rgba(82, 48, 255, 0.15);

    animation:
        neonGlow 2.5s ease-in-out infinite alternate,
        fadeDown 0.8s ease;
}


/* =========================
   ANIMATIONS
========================= */

@keyframes neonGlow {

    0% {
        text-shadow:
            0 0 5px rgba(155, 48, 255, 0.2),
            0 0 15px rgba(155, 48, 255, 0.15);
    }

    100% {
        text-shadow:
            0 0 12px rgba(155, 48, 255, 0.35),
            0 0 24px rgba(155, 48, 255, 0.2);
    }
}

@keyframes fadeDown {

    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================
   NAVIGATION
========================= */

#nav-links {
    position: fixed;
    top: 88px;
    right: 16px;
    width: min(320px, calc(100% - 32px));
    padding: 18px 25px;
    border-radius: 24px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(20, 33, 61, 0.08);
    box-shadow: 0 22px 42px rgba(18, 41, 96, 0.16);
    backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#nav-links.show {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
    transform: translateY(0);
}

#nav-links li {
    list-style: none;
    display: flex;
}

i {
    margin-right: 8px;
}

#nav-links li a {
    padding: 11px 16px;
    border-radius: 999px;
    color: #17456a;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

#nav-links li a:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #4aa3ff, #1f6fe5);
}


/* =========================
   HAMBURGER
========================= */

.ham-box {
    display: flex;
    font-size: 22px;
    gap: 8px;
    font-weight: 600;
    align-items: center;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.hamburger {

    width: 30px;
    height: 25px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    cursor: pointer;

    z-index: 1100;
}

.hamburger span {

    height: 4px;

    width: 100%;

    border-radius: 999px;

    background: var(--brand-deep);

    transition: 0.35s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(10px, -10px);
}


/* =========================
   QUIZ
========================= */

.quiz-wrapper {

    width: 95%;

    max-width: 850px;

    margin: 30px auto 120px;
}

.quiz-card {

    position: relative;

    overflow: hidden;

    background: var(--surface);

    backdrop-filter: blur(18px);

    border-radius: var(--radius-xl);

    padding: 42px;

    box-shadow: var(--shadow);

    text-align: center;
}

.quiz-card::before {

    content: "";

    position: absolute;

    width: 240px;
    height: 240px;

    border-radius: 50%;

    background: rgba(74, 163, 255, 0.12);

    top: -80px;
    right: -80px;

    filter: blur(10px);
}

h2 {

    font-size: 34px;
    font-style: italic;
    margin-bottom: 20px;
}

#question {
    font-size: 24px;
    margin: 24px 0;
    font-weight: 700;
    line-height: 1.5;
}

#answer-error {
    color: #ef4444;
    font-size: 18px;
    margin-top: 12px;
    font-weight: 600;
}


/* =========================
   OPTIONS
========================= */

.cards {

    width: 80%;

    margin: 14px auto;

    padding: 18px;

    border-radius: 22px;

    font-size: 18px;

    font-weight: 600;

    text-align: left;

    cursor: pointer;

    border: 1px solid rgba(18, 41, 70, 0.12);

    background: rgba(255, 255, 255, 0.65);

    transition:
        transform 0.25s ease,
        border 0.25s ease,
        box-shadow 0.25s ease;
}

.cards:hover {

    transform: translateY(-2px);

    border-color: rgba(31, 110, 229, 0.6);

    box-shadow: 0 10px 20px rgba(31, 111, 229, 0.08);
}

.cards.active {

    background: rgba(74, 163, 255, 0.08);

    border-color: var(--brand-deep);

    box-shadow: 0 0 8px rgba(31, 111, 229, 0.2);
}

.cards.correct {

    background: #dcfce7;

    border-color: green;
}

.cards.wrong {

    background: rgba(239, 68, 68, 0.08);

    border-color: red;
}

input[type="radio"] {
    display: none;
}


/* =========================
   PROGRESS
========================= */

.progress {

    width: 80%;

    height: 6px;

    margin: 0 auto 24px;

    border-radius: 999px;

    overflow: hidden;

    background: rgba(16, 47, 74, 0.1);
}

.progress-bar {

    height: 100%;

    width: 0%;

    background: linear-gradient(135deg, #38bdf8, #6366f1);

    transition: width 0.4s ease;
}


/* =========================
   BUTTON
========================= */

.quiz-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 25px;
}


/* Common button */

.quiz-buttons button {
    border: none;
    border-radius: 18px;

    padding: 12px 24px;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}

#play-again {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: white;
    border: none;
    border-radius: 16px;
    width: 40%;
    padding: 12px 24px;
    margin-top: 25px;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}


/* Submit */

#submit {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: white;
    width: 48%;
}


#submit:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}


#submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}


/* Next */

#next {
    display: none;
    background: #16a34a;
    color: white;
    width: 48%;
}


#next:hover {
    background: #15803d;
    transform: translateY(-1px);
}

/* Previous */

#prev {
    display: none;

    background: #f9cbe7;
    color: #173b5f;

    border: 1px solid #e8d5e2;
}

#prev:hover {
    background: #f3e8f9;
    transform: translateY(-1px);
}


/* =========================
   FOOTER
========================= */

footer {

    width: 100%;

    margin-top: 50px;

    padding: 22px;

    text-align: center;

    color: white;

    background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.result-box {
    font-size: 20px;
    font-weight: 700;
}

.score-message {
    margin-top: 20px;
    font-size: 25px;
}


/* =========================
   TABLET
========================= */

@media (max-width: 1024px) {

    .quiz-buttons button {
        padding: 15px 20px;
        font-size: 16px;
        border-radius: 18px;
    }

    #submit {
        width: 45%;
    }

    #prev {
        width: 43%;
    }

    header img {
        width: 200px;
    }

    h1 {
        font-size: 30px;
    }

    .quiz-card {
        padding: 32px;
    }

    .cards,
    button,
    .progress {
        width: 90%;
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .quiz-buttons button {
        padding: 10px 15px;
        font-size: 12px;
        border-radius: 14px;
    }

    #submit {
        width: 50%;
    }

    #prev {
        width: 50%;
    }

    header {
        padding: 12px;
        border-radius: 20px;
    }

    header img {
        display: none;
    }

    h1 {
        font-size: 28px;
    }

    .ham-box {
        font-size: 18px;
    }

    .hamburger {
        width: 28px;
        height: 18px;
    }

    .hamburger span {
        height: 3px;
        width: 80%;
    }

    .quiz-wrapper {

        width: 100%;

        padding: 12px;
    }

    .quiz-card {

        padding: 24px 18px;

        border-radius: 24px;
    }

    h2 {
        font-size: 26px;
    }

    #question {
        font-size: 19px;
    }

    .cards {

        width: 100%;

        padding: 16px;

        font-size: 15px;
    }

    .progress,
    button {
        width: 100%;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(3px, 3px);
    }
}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 515px) {

    h1 {
        font-size: 20px;
    }

    .ham-box {
        font-size: 16px;
        gap: 6px;
    }

    .hamburger {
        width: 26px;
        height: 16px;
    }

    .hamburger span {
        height: 3px;
        width: 70%;
    }

    #question {
        font-size: 17px;
    }

    .quiz-card {
        padding: 20px 14px;
    }

    .cards {
        font-size: 14px;
        padding: 14px;
    }

    button {
        padding: 14px;
    }

    #nav-links {
        width: 240px;
    }
}