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

:root {
    --bg: #f5f5f7;
    --card: rgba(255, 255, 255, 0.76);
    --text: #17171a;
    --muted: #88888f;
    --line: rgba(0, 0, 0, 0.07);
    --accent: #242428;
    --green: #31c76a;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        Inter,
        Helvetica,
        Arial,
        sans-serif;
    background: var(--bg);
    color: var(--text);
}


/* =========================
   GENERAL
========================= */

.screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.8s ease,
        visibility 0.8s ease;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================
   INITIAL BACKGROUND
========================= */

.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -5;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(255, 255, 255, 0.95),
            transparent 32%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(220, 220, 225, 0.55),
            transparent 30%
        ),
        #f5f5f7;
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0.025;
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}


/* =========================
   QUIZ
========================= */

#quizScreen {
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.topbar {
    width: min(760px, 92vw);
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.14em;
    font-weight: 700;
}

.mini-label {
    color: #a0a0a6;
}

.progress-track {
    width: min(760px, 92vw);
    height: 4px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 22px;
}

.progress-fill {
    width: 10%;
    height: 100%;
    background: #202024;
    border-radius: inherit;
    transition: width 0.6s cubic-bezier(.22, 1, .36, 1);
}

.quiz-card {
    position: relative;
    width: min(760px, 92vw);
    min-height: 470px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;

    background: var(--card);

    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 32px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.07),
        0 3px 12px rgba(0, 0, 0, 0.025);

    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);

    transform: translateY(0);
    transition:
        transform 0.5s ease,
        opacity 0.5s ease;
}

.question-content {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 570px;
}

.question-number {
    margin-bottom: 18px;
    color: #99999f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.question-content h1 {
    max-width: 650px;
    font-size: clamp(28px, 4vw, 45px);
    line-height: 1.08;
    letter-spacing: -0.045em;
    margin-bottom: 35px;
}

.answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.answer {
    border: 1px solid rgba(0, 0, 0, 0.075);
    background: rgba(255, 255, 255, 0.65);
    border-radius: 17px;
    min-height: 58px;
    padding: 15px 18px;
    cursor: pointer;

    color: #252529;
    font-size: 15px;
    font-weight: 600;

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.answer:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.answer:active {
    transform: scale(0.97);
}

.answer.wrong {
    animation: shake 0.4s ease;
    border-color: rgba(210, 40, 40, 0.22);
}

.answer.correct {
    background: rgba(49, 199, 106, 0.1);
    border-color: rgba(49, 199, 106, 0.35);
}

.feedback {
    min-height: 25px;
    margin-top: 18px;
    font-size: 12px;
    font-weight: 700;
    color: #e23a3a;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.feedback.show {
    opacity: 1;
}

.footer-hint {
    margin-top: 17px;
    color: #aaaab0;
    font-size: 11px;
    letter-spacing: 0.06em;
}


/* =========================
   EASTER EGGS
========================= */

.decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.egg {
    position: absolute;
    opacity: 0;
    animation:
        eggAppear 1s ease forwards,
        eggFloat 5s ease-in-out infinite 1s;
    user-select: none;
}

.green-heart {
    color: #38c96d;
    font-size: 18px;
    filter: drop-shadow(0 4px 12px rgba(49, 199, 106, 0.22));
}

.dog {
    font-size: 20px;
    filter: grayscale(0.1);
}

.plane {
    font-size: 18px;
    opacity: 0.35;
}

.flower-egg {
    color: #8d83d8;
    font-size: 17px;
}

.star-egg {
    color: #b6a34b;
    font-size: 13px;
}

.sign-egg {
    color: #777;
    font-size: 11px;
    font-weight: 800;
}

@keyframes eggAppear {
    to {
        opacity: 0.35;
    }
}

@keyframes eggFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-5px) rotate(2deg);
    }
}


/* =========================
   ACHIEVEMENT
========================= */

.achievement-screen {
    background:
        radial-gradient(
            circle at center,
            #ffffff 0%,
            #f1f1f4 45%,
            #e7e7eb 100%
        );

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-wrapper {
    width: min(470px, 82vw);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.loading-text-row {
    display: flex;
    justify-content: space-between;
    color: #8c8c93;
    font-size: 10px;
    letter-spacing: 0.14em;
    font-weight: 800;
    margin-bottom: 9px;
}

.loading-track {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 100px;
    overflow: hidden;
}

#loadingBar {
    height: 100%;
    width: 0%;
    background: #1d1d20;
    border-radius: inherit;
    transition: width 0.08s linear;
}

.achievement-intro {
    text-align: center;
    margin-top: 55px;
    animation: achievementIntro 1s ease forwards;
}

.hidden {
    display: none !important;
}

.achievement-small {
    color: #99999f;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.2em;
    margin-bottom: 10px;
}

.achievement-intro h2 {
    font-size: clamp(24px, 4vw, 36px);
    letter-spacing: -0.04em;
}

.achievement-sub {
    color: #88888e;
    font-size: 14px;
    margin-top: 8px;
}

.achievement-card {
    position: relative;
    width: 250px;
    height: 295px;
    margin: 35px auto 0;
    border-radius: 28px;
    padding: 30px 20px;

    cursor: pointer;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.98),
            rgba(242,242,246,0.75)
        );

    border: 1px solid rgba(255,255,255,0.95);

    box-shadow:
        0 35px 80px rgba(0,0,0,0.12),
        inset 0 1px rgba(255,255,255,0.9);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.achievement-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow:
        0 45px 100px rgba(0,0,0,0.16),
        0 0 50px rgba(49,199,106,0.12);
}

.achievement-glow {
    position: absolute;
    inset: -30px;
    border-radius: 50px;
    background: radial-gradient(
        circle,
        rgba(49,199,106,0.2),
        transparent 65%
    );
    z-index: -1;
    animation: achievementGlow 2.2s ease-in-out infinite;
}

.achievement-art {
    position: relative;
    height: 185px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-heart {
    position: relative;
    z-index: 5;
    color: #35c86b;
    font-size: 90px;
    filter:
        drop-shadow(0 12px 18px rgba(49,199,106,0.22))
        drop-shadow(0 0 25px rgba(49,199,106,0.2));
    animation: heartBeat 1.8s ease-in-out infinite;
}

.flower {
    position: absolute;
    color: #8b7ad2;
    font-size: 45px;
    opacity: 0.7;
}

.flower-1 {
    left: 18px;
    top: 15px;
    transform: rotate(-25deg);
}

.flower-2 {
    right: 18px;
    top: 20px;
    transform: rotate(25deg);
}

.flower-3 {
    left: 35px;
    bottom: 8px;
    transform: rotate(15deg);
    font-size: 32px;
}

.flower-4 {
    right: 35px;
    bottom: 5px;
    transform: rotate(-15deg);
    font-size: 32px;
}

.achievement-bottom {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.achievement-bottom span {
    color: #99999f;
    font-size: 8px;
    letter-spacing: 0.2em;
    font-weight: 800;
}

.achievement-bottom strong {
    font-size: 15px;
    letter-spacing: 0.08em;
}

.tap-indicator {
    position: absolute;
    bottom: -39px;
    left: 0;
    right: 0;
    color: #99999f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

@keyframes achievementIntro {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes achievementGlow {
    0%, 100% {
        transform: scale(0.95);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }

    8% {
        transform: scale(1.08);
    }

    16% {
        transform: scale(0.98);
    }

    25% {
        transform: scale(1.05);
    }

    40% {
        transform: scale(1);
    }
}


/* =========================
   SHOW
========================= */

.show-screen {
    overflow: hidden;
    background:
        radial-gradient(
            circle at center,
            #202a26 0%,
            #101411 38%,
            #060807 100%
        );
    color: white;
}

.show-orb {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 15px #ffffff,
        0 0 50px rgba(255,255,255,0.6),
        0 0 120px rgba(70,255,160,0.3);

    animation: orbGrow 4s ease forwards;
}

.show-text {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(900px, 86vw);
    transform: translate(-50%, -50%);
    text-align: center;

    font-size: clamp(25px, 5vw, 62px);
    line-height: 1.05;
    font-weight: 650;
    letter-spacing: -0.045em;

    opacity: 0;
    filter: blur(8px);

    transition:
        opacity 1.2s ease,
        filter 1.2s ease,
        transform 1.2s cubic-bezier(.22,1,.36,1);
}

.show-text.visible {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(1);
}

.show-text.exit {
    opacity: 0;
    filter: blur(12px);
    transform: translate(-50%, -53%) scale(1.04);
}

.show-particles,
.petals {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.show-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    animation: particleMove linear infinite;
}

.petal {
    position: absolute;
    color: rgba(255, 160, 190, 0.75);
    font-size: 18px;
    animation: petalFall linear forwards;
}

@keyframes orbGrow {
    0% {
        width: 10px;
        height: 10px;
    }

    30% {
        width: 20px;
        height: 20px;
    }

    70% {
        width: 80px;
        height: 80px;
        opacity: 0.9;
    }

    100% {
        width: 160vw;
        height: 160vw;
        opacity: 0;
    }
}

@keyframes particleMove {
    from {
        transform: translateY(110vh) translateX(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    to {
        transform:
            translateY(-20vh)
            translateX(var(--drift));
        opacity: 0;
    }
}

@keyframes petalFall {
    from {
        transform:
            translateY(-10vh)
            rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 0.9;
    }

    to {
        transform:
            translateY(115vh)
            translateX(var(--x))
            rotate(500deg);
        opacity: 0;
    }
}


/* =========================
   FINAL PAGE
========================= */

.final-screen {
    overflow-y: auto;
    background:
        radial-gradient(
            circle at 50% 20%,
            #fff5f8,
            #f9e9ee 38%,
            #f0dfe6 100%
        );
}

.final-glow {
    position: absolute;
    width: 700px;
    height: 700px;
    left: 50%;
    top: 30%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    filter: blur(100px);
    pointer-events: none;
}

.final-content {
    position: relative;
    z-index: 5;
    width: min(760px, 88vw);
    margin: 0 auto;
    padding: 100px 0 130px;
    text-align: center;
}

.final-intro {
    color: #9b858c;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.22em;
    margin-bottom: 45px;
}

.love-letter {
    opacity: 0;
    transform: translateY(25px);
    transition:
        opacity 1.2s ease,
        transform 1.2s ease;
}

.love-letter.show {
    opacity: 1;
    transform: translateY(0);
}

.love-letter p {
    max-width: 660px;
    margin: 0 auto 30px;
    color: #41383c;
    font-size: clamp(17px, 2.3vw, 22px);
    line-height: 1.65;
    letter-spacing: -0.015em;
}

.love-letter p:first-child {
    font-size: clamp(27px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 38px;
}

.sooooo {
    margin-top: 65px;
    font-size: clamp(38px, 8vw, 90px);
    font-weight: 900;
    letter-spacing: -0.08em;
    color: #211c1e;
    opacity: 0;
    transform: scale(0.7);
}

.sooooo.show {
    animation: soooooIn 1.2s cubic-bezier(.16,1,.3,1) forwards;
}

.final-question {
    margin-top: 55px;
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition:
        opacity 1.2s ease,
        transform 1.2s cubic-bezier(.16,1,.3,1);
}

.final-question.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.question-mark {
    font-size: clamp(55px, 9vw, 100px);
    font-weight: 900;
    color: #38c96d;
    line-height: 0.8;
    margin-bottom: 18px;
    filter: drop-shadow(0 10px 20px rgba(49,199,106,0.18));
}

.final-question h1 {
    font-size: clamp(34px, 7vw, 75px);
    line-height: 0.95;
    letter-spacing: -0.065em;
    color: #211c1e;
}

.final-buttons {
    margin-top: 45px;
    display: flex;
    justify-content: center;
    gap: 14px;
}

.final-buttons button {
    border: none;
    min-width: 150px;
    height: 58px;
    border-radius: 18px;
    font-weight: 900;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.yes-button {
    background: #38c96d;
    color: white;
    box-shadow: 0 15px 35px rgba(49,199,106,0.25);
}

.yes-button span {
    margin-left: 5px;
}

.yes-button:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 20px 45px rgba(49,199,106,0.32);
}

.no-button {
    background: rgba(255,255,255,0.7);
    color: #777;
    border: 1px solid rgba(0,0,0,0.06) !important;
}

.no-button:hover {
    transform: translateY(-2px);
}

.final-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    color: #e59ab1;
    animation: finalFloat linear infinite;
}

@keyframes soooooIn {
    0% {
        opacity: 0;
        transform: scale(0.7);
        filter: blur(15px);
    }

    60% {
        opacity: 1;
        transform: scale(1.08);
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes finalFloat {
    from {
        transform: translateY(105vh) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 0.7;
    }

    to {
        transform: translateY(-15vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-7px);
    }

    40% {
        transform: translateX(7px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }
}


/* =========================
   ACHIEVEMENT CLICK EFFECT
========================= */

.achievement-card.unlocking {
    animation: achievementUnlock 1.1s cubic-bezier(.16,1,.3,1) forwards;
}

@keyframes achievementUnlock {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    35% {
        transform: scale(1.12);
    }

    55% {
        transform: scale(0.94);
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
        filter: blur(12px);
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 650px) {

    #quizScreen {
        padding: 18px;
    }

    .quiz-card {
        min-height: 520px;
        padding: 38px 23px;
        border-radius: 27px;
    }

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

    .answer {
        min-height: 54px;
    }

    .question-content h1 {
        font-size: 30px;
    }

    .achievement-card {
        width: 220px;
        height: 275px;
    }

    .achievement-heart {
        font-size: 80px;
    }

    .final-content {
        padding-top: 80px;
    }

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

    .final-buttons button {
        width: min(300px, 80vw);
    }
}