﻿:root {
    --ink: #17324d;
    --muted: #6f8093;
    --panel: rgba(255, 255, 255, 0.94);
    --line: #dbe6ef;
    --primary: #ffb703;
    --good: #1a9b68;
    --bad: #d95858;
    --shadow: 0 18px 45px rgba(42, 72, 98, 0.14);
}

body {
    
    min-height: 100vh;
    color: var(--ink);
    font-family: Calibri, sans-serif;
    background: radial-gradient(circle at 15% 10%, rgba(255, 183, 3, 0.16), transparent 24rem), linear-gradient(135deg, #f5fbff, #fffaf0);
}

button {
    font: inherit;
}

.game-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 20px auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1;
}

.score-board {
    display: flex;
    gap: 10px;
}

.score-item {
    min-width: 92px;
    padding: 10px 16px;
    text-align: center;
    background: var(--panel);
    border: 1px solid rgba(219, 230, 239, 0.95);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(42, 72, 98, 0.08);
}

    .score-item span {
        display: block;
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
    }

    .score-item strong {
        display: block;
        margin-top: 2px;
        font-size: 22px;
    }

.question-card {
    position: relative;
    z-index: 5;
    padding: 18px 22px;
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px 22px 0 0;
    box-shadow: var(--shadow);
}

.question-label {
    color: var(--muted);
    font-size: 16pt;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.question {
    margin-top: 4px;
    font-size: clamp(31px, 5vw, 54px);
    font-weight: 900;
    letter-spacing: 0.02em;
}

.feedback {
    min-height: 25px;
    margin-top: 4px;
    font-size: 16px;
    font-weight: 800;
}

    .feedback.good {
        color: var(--good);
    }

    .feedback.bad {
        color: var(--bad);
    }

.arena {
    background: #fff;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
}

#arenaSvg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1000 / 430;
}

.archer-shadow {
    fill: rgba(53, 84, 37, 0.18);
}

.archer-face, .child-hand, .archer-ear {
    fill: #f4c29a;
}

.archer-hair {
    fill: #2a2230;
}

.child-eye {
    fill: #2a2230;
}

.child-brow, .child-nose, .child-smile {
    fill: none;
    stroke: #2a2230;
    stroke-width: 2.7;
    stroke-linecap: round;
}

.child-cheek {
    fill: #eca29e;
    opacity: 0.9;
}

.deel-body {
    fill: #2d73cb;
}

.deel-overlap {
    fill: none;
    stroke: #1d5da8;
    stroke-width: 5;
    stroke-linecap: round;
}

.deel-trim, .deel-collar {
    fill: none;
    stroke: #ffd54f;
    stroke-width: 4.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.deel-belt, .deel-knot {
    fill: #f0b326;
}

.child-leg {
    fill: none;
    stroke: #46505c;
    stroke-width: 8;
    stroke-linecap: round;
}

.child-shoe {
    fill: #5a352a;
}

.child-shoe-sole {
    fill: none;
    stroke: #2a1b16;
    stroke-width: 3.2;
    stroke-linecap: round;
}

.child-sleeve {
    fill: none;
    stroke: #2d73cb;
    stroke-width: 11;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.child-arm {
    fill: none;
    stroke: #f4c29a;
    stroke-width: 9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.quiver {
    fill: #7a4d33;
}

.quiver-arrow {
    stroke: #604536;
    stroke-width: 3.6;
    stroke-linecap: round;
}

.release-lines {
    opacity: 0;
    transform-origin: 162px 120px;
    transform-box: fill-box;
}

    .release-lines path {
        fill: none;
        stroke: rgba(255,255,255,.96);
        stroke-width: 3.5;
        stroke-linecap: round;
    }

.bow, .bow-string, .held-arrow {
    fill: none;
    stroke-linecap: round;
}

.bow {
    stroke: #9b5b2b;
    stroke-width: 7;
}

.bow-string {
    stroke: #ead8c1;
    stroke-width: 2.2;
    transform-origin: 159px 123px;
    transform-box: fill-box;
}

.held-arrow {
    stroke: #34485b;
    stroke-width: 2.2;
    transform-origin: 134px 120px;
    transform-box: fill-box;
}

.held-arrow-tip {
    fill: #34485b;
    transform-origin: 168px 120px;
    transform-box: fill-box;
}

#archerGroup.shooting {
    animation: archerKick .34s ease-out;
}

    #archerGroup.shooting .front-arm {
        animation: armRelease .34s ease-out;
    }

    #archerGroup.shooting .back-arm-group {
        animation: rearHandRelease .34s ease-out;
    }

    #archerGroup.shooting .bow-string {
        animation: stringRelease .34s ease-out;
    }

    #archerGroup.shooting .held-arrow,
    #archerGroup.shooting .held-arrow-tip {
        animation: heldArrowRelease .34s ease-out forwards;
    }

    #archerGroup.shooting .release-lines {
        animation: releaseFlash .34s ease-out forwards;
    }

@keyframes archerKick {
    0% {
        transform: translate(82px,110px) scale(1.18);
    }

    35% {
        transform: translate(80px,110px) scale(1.19);
    }

    100% {
        transform: translate(82px,110px) scale(1.18);
    }
}

@keyframes armRelease {
    0% {
        transform: translateX(0)
    }

    45% {
        transform: translateX(4px) translateY(-1px)
    }

    100% {
        transform: translateX(0)
    }
}

@keyframes rearHandRelease {
    0% {
        transform: translateX(0)
    }

    45% {
        transform: translateX(-4px) translateY(1px)
    }

    100% {
        transform: translateX(0)
    }
}

@keyframes stringRelease {
    0% {
        transform: translateX(-7px)
    }

    55% {
        transform: translateX(1px)
    }

    100% {
        transform: translateX(0)
    }
}

@keyframes heldArrowRelease {
    0% {
        opacity: 1;
        transform: translateX(0)
    }

    55% {
        opacity: .25;
        transform: translateX(14px)
    }

    100% {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes releaseFlash {
    0% {
        opacity: 0;
        transform: scale(.9)
    }

    30% {
        opacity: 1;
        transform: scale(1)
    }

    100% {
        opacity: 0;
        transform: scale(1.05)
    }
}

.target-shadow {
    fill: rgba(40, 78, 44, 0.2);
}

.stand-leg {
    stroke: #7f5539;
    stroke-width: 12;
    stroke-linecap: round;
}

.target-gloss {
    fill: none;
    stroke: rgba(255,255,255,0.18);
    stroke-width: 12;
}

.shot {
    opacity: 0;
}

    .shot .shot-trail {
        stroke: rgba(255,214,93,.9);
        stroke-width: 7;
        stroke-linecap: round;
        opacity: 0;
        filter: blur(1.5px);
    }

    .shot.flying .shot-trail {
        animation: shotTrailPulse .22s linear infinite;
    }

    .shot .shaft {
        stroke: #17324d;
        stroke-width: 2.2;
        stroke-linecap: round;
    }

    .shot .tip {
        fill: #223445;
    }

    .shot .nock {
        stroke: #2e404f;
        stroke-width: 2;
        stroke-linecap: round;
    }

    .shot .feather-main {
        fill: #f2bf34;
        opacity: .95;
    }

    .shot .feather-small {
        fill: #f4d470;
        opacity: .96;
    }

    .shot.wrong .feather-main, .shot.wrong .feather-small {
        fill: #de7c7c;
    }

@keyframes shotTrailPulse {
    0% {
        opacity: .15;
        transform: scaleX(.55);
    }

    50% {
        opacity: .95;
        transform: scaleX(1);
    }

    100% {
        opacity: .2;
        transform: scaleX(.7);
    }
}

.answers-wrap {
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 22px 22px;
    box-shadow: var(--shadow);
}

.answers-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.answer-btn {
    position: relative;
    min-height: 62px;
    padding: 12px 14px 12px 48px;
    color: var(--ink);
    font-size: clamp(19px, 2.5vw, 27px);
    font-weight: 900;
    background: #fff;
    border: 2px solid #d9e4ec;
    border-radius: 16px;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

    .answer-btn:hover:not(:disabled), .answer-btn:focus-visible:not(:disabled) {
        transform: translateY(-2px);
        border-color: var(--primary);
        box-shadow: 0 10px 20px rgba(255, 183, 3, .17);
    }

    .answer-btn:disabled {
        cursor: default;
    }

    .answer-btn .letter {
        position: absolute;
        top: 50%;
        left: 13px;
        display: grid;
        width: 28px;
        height: 28px;
        place-items: center;
        color: #fff;
        font-size: 14px;
        background: #688097;
        border-radius: 9px;
        transform: translateY(-50%);
    }

    .answer-btn.correct-choice {
        color: #0d724b;
        background: #edfff7;
        border-color: var(--good);
    }

        .answer-btn.correct-choice .letter {
            background: var(--good);
        }

    .answer-btn.wrong-choice {
        color: #a53a3a;
        background: #fff0f0;
        border-color: var(--bad);
    }

    .answer-btn.reveal-correct {
        border-color: var(--good);
        box-shadow: inset 0 0 0 2px rgba(26, 155, 104, .08);
    }

.result-panel {
    margin-top: 18px;
    padding: 28px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

    .result-panel.hidden {
        display: none;
    }

.result-icon {
    font-size: 48px;
}

.result-panel h2 {
    margin: 6px 0 4px;
    font-size: 30px;
}

.result-panel p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 18px;
    font-weight: 700;
}

.restart-btn {
    padding: 12px 24px;
    color: #4d3900;
    font-weight: 900;
    background: var(--primary);
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 9px 18px rgba(255, 183, 3, .26);
}

    .restart-btn:hover {
        background: #ffc126;
    }

@media (max-width: 760px) {
    .game-shell {
        width: min(100% - 16px, 680px);
        margin: 8px auto 18px;
    }

    .topbar {
        align-items: flex-end;
        gap: 12px;
    }

    .score-item {
        min-width: 72px;
        padding: 8px 10px;
    }

        .score-item strong {
            font-size: 18px;
        }

    .question-card {
        padding: 14px 12px;
    }

    .answers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .answer-btn {
        min-height: 57px;
        padding-left: 42px;
    }
}

@media (max-width: 430px) {
    .eyebrow {
        font-size: 10px;
    }

    .score-board {
        gap: 5px;
    }

    .score-item {
        min-width: 64px;
        border-radius: 13px;
    }

    .answers-wrap {
        padding: 10px;
    }

    .answers-grid {
        gap: 8px;
    }

    .answer-btn {
        min-height: 53px;
        border-radius: 13px;
        font-size: 17px;
    }
}


.timer-bar-frame {
    fill: rgba(255,255,255,.72);
    stroke: rgba(23,50,77,.14);
    stroke-width: 2;
}

.timer-bar-bg {
    fill: rgba(23,50,77,.12);
}

.timer-bar-fill {
    fill: #ffb703;
    transition: width .22s linear;
}

    .timer-bar-fill.timer-warning {
        fill: #e76f51;
    }

.timer-text {
    fill: #17324d;
    font-size: 9pt;
    font-weight: 900;
    pointer-events: none;
}