/* =========================================================
   BLU-RAY SHOOTING – style.css
   ========================================================= */

:root {
    --bg: #050914;
    --bg2: #0a1430;
    --panel: rgba(8, 16, 38, .82);
    --cyan: #00e5ff;
    --blue: #2f7bff;
    --gold: #ffc83d;
    --green: #3dff8a;
    --red: #ff4466;
    --text: #e8f1ff;
    --muted: #8fa3c7;
}

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

html, body { min-height: 100%; }

body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(1100px 600px at 15% -10%, rgba(47, 123, 255, .22), transparent 60%),
        radial-gradient(900px 500px at 100% 110%, rgba(0, 229, 255, .14), transparent 60%),
        linear-gradient(180deg, var(--bg2), var(--bg));
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    padding: 12px;
    -webkit-tap-highlight-color: transparent;
}

.game {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hud {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid rgba(0, 229, 255, .25);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: 0 0 24px rgba(0, 229, 255, .12), inset 0 0 18px rgba(47, 123, 255, .08);
}

.hud-box { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.hud-timer { align-items: center; }
.hud-right { align-items: flex-end; }

.hud-label {
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
}

.hud-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--cyan);
    text-shadow: 0 0 12px rgba(0, 229, 255, .65);
    font-variant-numeric: tabular-nums;
}

.hud-value.bump { animation: bump .25s ease-out; }

.timer {
    font-size: 3.6rem;
    font-weight: 900;
    line-height: 1;
    min-width: 2.2ch;
    text-align: center;
    color: #fff;
    text-shadow: 0 0 16px rgba(47, 123, 255, .9), 0 0 36px rgba(0, 229, 255, .45);
    font-variant-numeric: tabular-nums;
}

.timer.pulse {
    color: var(--red);
    text-shadow: 0 0 18px rgba(255, 68, 102, .95), 0 0 40px rgba(255, 68, 102, .5);
    animation: pulse 1s ease-in-out infinite;
}

.mute-btn {
    margin-top: 4px;
    font: inherit;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    background: transparent;
    border: 1px solid rgba(143, 163, 199, .4);
    border-radius: 999px;
    padding: 3px 10px;
    cursor: pointer;
}
.mute-btn:hover, .mute-btn:focus-visible { color: var(--cyan); border-color: var(--cyan); outline: none; }

.progress {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(143, 163, 199, .16);
    border: 1px solid rgba(0, 229, 255, .2);
}

.progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left center;
    transform: scaleX(1);
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    box-shadow: 0 0 14px rgba(0, 229, 255, .8);
}
.progress.low .progress-bar {
    background: linear-gradient(90deg, #ff7a45, var(--red));
    box-shadow: 0 0 14px rgba(255, 68, 102, .9);
}

.arena {
    position: relative;
    width: 100%;
    height: clamp(420px, 70vh, 720px);
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(0, 229, 255, .28);
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    background:
        radial-gradient(circle at 50% 50%, rgba(47, 123, 255, .10), transparent 65%),
        repeating-linear-gradient(0deg, rgba(0, 229, 255, .04) 0 1px, transparent 1px 44px),
        repeating-linear-gradient(90deg, rgba(0, 229, 255, .04) 0 1px, transparent 1px 44px),
        #040815;
    box-shadow: 0 0 40px rgba(47, 123, 255, .18), inset 0 0 60px rgba(0, 0, 0, .6);
}
.arena.danger { animation: danger 1s ease-in-out infinite; }
.arena.shake { animation: shake .3s ease-in-out; }

.site-footer {
    padding: 2px 0 4px;
    text-align: center;
    font-size: .75rem;
    letter-spacing: .12em;
    color: var(--muted);
    opacity: .8;
}

.layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.disc {
    --s: 70px;
    position: absolute;
    left: 0;
    top: 0;
    width: var(--s);
    height: var(--s);
    pointer-events: none;
    will-change: transform;
}

.disc-fx {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    animation: appear .25s ease-out;
}

.disc-fx::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 16px 2px var(--glow, rgba(255, 255, 255, .4));
}

.disc-fx::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(120deg, transparent 38%, rgba(255, 255, 255, .38) 50%, transparent 62%);
    -webkit-mask: radial-gradient(circle at center, transparent 0 8%, #000 8.5%);
            mask: radial-gradient(circle at center, transparent 0 8%, #000 8.5%);
}

.disc-body {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), inset 0 0 0 5px rgba(0, 0, 0, .12);
    -webkit-mask: radial-gradient(circle at center, transparent 0 8%, #000 8.5%);
            mask: radial-gradient(circle at center, transparent 0 8%, #000 8.5%);
    animation: spin 2.4s linear infinite;
}

.disc-label {
    position: absolute;
    left: 50%;
    top: 24%;
    transform: translateX(-50%);
    font-size: calc(var(--s) * .12);
    font-weight: 800;
    letter-spacing: .04em;
    white-space: nowrap;
    color: rgba(5, 9, 20, .78);
    text-shadow: 0 0 3px rgba(255, 255, 255, .55);
}

.disc.dvd { --glow: rgba(255, 190, 240, .45); }
.disc.dvd .disc-body {
    background:
        radial-gradient(circle, transparent 0 9%, rgba(255, 255, 255, .72) 9.5% 21%, rgba(255, 255, 255, 0) 21.5%),
        repeating-radial-gradient(circle, rgba(0, 0, 0, .07) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
        conic-gradient(#e8ebf2, #ff8fd0, #8fd4ff, #fff7a8, #9dffc8, #e8ebf2, #c0a0ff, #ffd2a0, #e8ebf2);
}

.disc.bluray { --glow: rgba(47, 123, 255, .8); }
.disc.bluray .disc-body {
    background:
        radial-gradient(circle, transparent 0 9%, rgba(190, 225, 255, .65) 9.5% 21%, rgba(190, 225, 255, 0) 21.5%),
        repeating-radial-gradient(circle, rgba(0, 0, 0, .12) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
        conic-gradient(#0a3cff, #5fb4ff, #0a2a9a, #7cc8ff, #0b3fd8, #0a1f7a, #4aa3ff, #0a2a9a, #0a3cff);
}
.disc.bluray .disc-label { color: #eaf4ff; text-shadow: 0 0 4px rgba(0, 20, 120, .9); }

.disc.uhd { --glow: rgba(255, 200, 61, .85); }
.disc.uhd .disc-body {
    background:
        radial-gradient(circle, transparent 0 9%, rgba(255, 244, 190, .75) 9.5% 21%, rgba(255, 244, 190, 0) 21.5%),
        repeating-radial-gradient(circle, rgba(70, 40, 0, .14) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
        conic-gradient(#ffcc33, #fff0a0, #b8860b, #ffe27a, #d9a21b, #7a5200, #ffd95a, #b8860b, #ffcc33);
}

/* SUPER BONUS – LaserDisc (srebrno-fioletowa, większa płyta) */
.disc.ld { --glow: rgba(210, 120, 255, .95); }
.disc.ld .disc-body {
    background:
        radial-gradient(circle, transparent 0 9%, rgba(240, 225, 255, .8) 9.5% 21%, rgba(240, 225, 255, 0) 21.5%),
        repeating-radial-gradient(circle, rgba(40, 0, 70, .13) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
        conic-gradient(#f4f4fa, #c9a4ff, #8a8fa8, #ffe6ff, #b9c2dc, #7f5ad6, #f4f4fa, #a8b0c8, #e0c8ff, #f4f4fa);
}
.disc.ld .disc-label { color: #2a0a52; text-shadow: 0 0 3px rgba(255, 255, 255, .8); }
.disc.ld.super .disc-fx::before { animation: superGlow .6s ease-in-out infinite alternate; }

.disc-fx.hit { animation: pop .28s ease-out forwards; }

/* Zakładki ekranów przesuwanych – tylko na telefonie */
.pager-tabs { display: none; }

.overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    cursor: default;
    background: rgba(3, 7, 18, .84);
    -webkit-backdrop-filter: blur(3px);
            backdrop-filter: blur(3px);
}
.overlay.hidden { display: none; }

.panel {
    width: 100%;
    max-width: 640px;
    margin: auto;
    text-align: center;
}

.title {
    font-size: clamp(2rem, 7vw, 3.6rem);
    font-weight: 900;
    letter-spacing: .06em;
    color: #fff;
    text-shadow: 0 0 14px rgba(47, 123, 255, .95), 0 0 34px rgba(0, 229, 255, .5);
}
.title span { color: var(--cyan); }

.lead { margin: 12px auto 14px; max-width: 520px; line-height: 1.5; color: var(--text); }
.hint { margin: 8px 0 16px; font-size: .85rem; color: var(--muted); }
.bonus-note { color: var(--gold); text-shadow: 0 0 10px rgba(255, 200, 61, .5); }
.warn-note { color: var(--red); text-shadow: 0 0 10px rgba(255, 68, 102, .55); }
.rules-list {
    margin: 10px auto 0;
    max-width: 520px;
    text-align: left;
    font-size: .88rem;
    line-height: 1.45;
    color: var(--text);
}
.rules-list p { margin: 0 0 8px; }
.rules-list .hint { margin-top: 4px; margin-bottom: 0; }

.legend, .stats {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 26px;
    margin: 6px 0;
}
.legend li, .stats li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.legend .disc, .stats .disc { position: relative; --s: 54px; }
.legend b { font-size: 1.5rem; font-weight: 900; }
.legend em { font-style: normal; font-size: .8rem; color: var(--muted); }
.plus { color: var(--green); text-shadow: 0 0 10px rgba(61, 255, 138, .6); }
.minus { color: var(--red); text-shadow: 0 0 10px rgba(255, 68, 102, .6); }
.stats span { font-size: .95rem; color: var(--muted); }
.stats b { color: #fff; font-size: 1.15rem; }

.btn {
    margin: 6px 0 4px;
    padding: 14px 44px;
    font: inherit;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: .14em;
    color: #031022;
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 22px rgba(0, 229, 255, .6), 0 6px 18px rgba(0, 0, 0, .45);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, opacity .9s ease;
}
/* przycisk ukryty (zajmuje miejsce, ale jest niewidoczny i nieklikalny), potem płynnie się pojawia */
.btn.wait { opacity: 0; pointer-events: none; filter: none; }
.btn:hover:not(:disabled), .btn:focus-visible { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 34px rgba(0, 229, 255, .9), 0 8px 22px rgba(0, 0, 0, .5); outline: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { cursor: not-allowed; filter: grayscale(.8) brightness(.7); }

/* Link w stylu przycisku START (Poziom 2 / powrót) */
a.btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;
}
.level2-btn {
    margin-top: 10px;
}
.level2-btn.hidden { display: none; }

/* Mniejszy przycisk (np. POZIOM 1 pod START) – ok. połowa */
.btn-sm,
a.btn-sm {
    margin-top: 8px;
    padding: 7px 22px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    box-shadow: 0 0 12px rgba(0, 229, 255, .45), 0 3px 10px rgba(0, 0, 0, .35);
}
.btn-sm:hover:not(:disabled),
a.btn-sm:hover,
a.btn-sm:focus-visible {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 0 18px rgba(0, 229, 255, .7), 0 4px 12px rgba(0, 0, 0, .4);
}

.name-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 4px 0 10px;
}
.name-field label {
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}
.name-field input {
    width: min(260px, 90%);
    padding: 10px 14px;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: var(--text);
    background: rgba(8, 16, 38, .7);
    border: 1px solid rgba(0, 229, 255, .35);
    border-radius: 999px;
    outline: none;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, .35);
}
.name-field input::placeholder { color: var(--muted); opacity: .7; }
.name-field input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 14px rgba(0, 229, 255, .35), inset 0 0 12px rgba(0, 0, 0, .35);
}
.name-field input.invalid {
    border-color: var(--red);
    box-shadow: 0 0 12px rgba(255, 68, 102, .35);
}
.name-field .req { color: var(--red); }
.name-error {
    min-height: 1.2em;
    margin: 2px 0 0;
    font-size: .8rem;
    font-weight: 600;
    color: var(--red);
    text-shadow: 0 0 8px rgba(255, 68, 102, .4);
}
.name-error[hidden] { display: none; }

.gameover {
    font-size: clamp(2.2rem, 8vw, 4rem);
    font-weight: 900;
    letter-spacing: .1em;
    color: var(--red);
    text-shadow: 0 0 16px rgba(255, 68, 102, .9), 0 0 40px rgba(255, 68, 102, .5);
    animation: pulse 1.4s ease-in-out infinite;
}
.final { margin-top: 8px; font-size: 1.2rem; color: var(--muted); }
.final strong { font-size: 2.6rem; color: var(--cyan); text-shadow: 0 0 14px rgba(0, 229, 255, .7); }
.final-best { margin: 10px 0 4px; color: var(--muted); }
.final-best strong { color: var(--gold); }
.save-status { min-height: 1.4em; margin: 4px 0 8px; font-size: .9rem; color: var(--muted); }
.save-status.ok { color: var(--green); }
.save-status.err { color: var(--red); }

.sub {
    margin: 22px 0 8px;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--cyan);
}

.ranking {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    background: rgba(8, 16, 38, .6);
    border-radius: 10px;
    overflow: hidden;
}
.ranking th, .ranking td { padding: 6px 10px; text-align: center; }
.ranking th { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: rgba(47, 123, 255, .14); }
.ranking td { border-top: 1px solid rgba(143, 163, 199, .12); font-variant-numeric: tabular-nums; }
.ranking td:nth-child(2) { text-align: left; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking tr.me td { background: rgba(0, 229, 255, .14); color: #fff; font-weight: 700; }
.ranking tbody tr:nth-child(1) td:first-child { color: var(--gold); font-weight: 800; }

.flash {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, .95) 0, var(--c) 38%, transparent 70%);
    animation: flash .45s ease-out forwards;
}

.float-text {
    position: absolute;
    pointer-events: none;
    font-size: 2.1rem;
    font-weight: 900;
    white-space: nowrap;
    animation: floatUp .9s ease-out forwards;
}
.float-text.good { color: var(--green); text-shadow: 0 0 12px rgba(61, 255, 138, .85); }
.float-text.bad  { color: var(--red);   text-shadow: 0 0 12px rgba(255, 68, 102, .85); }
.float-text.bonus { color: var(--gold); font-size: 1.7rem; letter-spacing: .06em; text-shadow: 0 0 14px rgba(255, 200, 61, .95); animation-duration: 1.05s; }
.float-text.stage-msg { font-size: 2.4rem; letter-spacing: .12em; color: var(--cyan); text-shadow: 0 0 16px rgba(0, 229, 255, .95); animation-duration: 1.1s; }

.float-text.super-msg { color: #e3b8ff; text-shadow: 0 0 16px rgba(210, 120, 255, 1), 0 0 34px rgba(210, 120, 255, .6); }

.countdown {
    position: absolute;
    pointer-events: none;
    font-size: clamp(5rem, 22vw, 9rem);
    font-weight: 900;
    line-height: 1;
    color: var(--red);
    text-shadow: 0 0 24px rgba(255, 68, 102, 1), 0 0 60px rgba(255, 68, 102, .6);
    animation: countPop .95s ease-out forwards;
}
.float-text.warn-msg { color: var(--red); text-shadow: 0 0 16px rgba(255, 68, 102, 1), 0 0 34px rgba(255, 68, 102, .6); }

@keyframes countPop { 0% { transform: translate(-50%, -50%) scale(1.7); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate(-50%, -50%) scale(.8); opacity: 0; } }
@keyframes danger  { 0%, 100% { box-shadow: 0 0 40px rgba(47, 123, 255, .18), inset 0 0 60px rgba(0, 0, 0, .6); border-color: rgba(0, 229, 255, .28); } 50% { box-shadow: 0 0 40px rgba(255, 68, 102, .55), inset 0 0 70px rgba(255, 68, 102, .28); border-color: rgba(255, 68, 102, .9); } }
@keyframes superGlow { from { box-shadow: 0 0 14px 2px rgba(210, 120, 255, .6); } to { box-shadow: 0 0 34px 10px rgba(210, 120, 255, 1); } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes appear  { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pop     { 0% { transform: scale(1); opacity: 1; filter: brightness(2); } 100% { transform: scale(1.6); opacity: 0; filter: brightness(3); } }
@keyframes flash   { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } }
@keyframes floatUp { 0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; } 15% { transform: translate(-50%, -80%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -220%) scale(1); opacity: 0; } }
@keyframes bump    { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes pulse   { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.18); opacity: .8; } }
@keyframes shake   { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-6px, 3px); } 40% { transform: translate(6px, -3px); } 60% { transform: translate(-4px, -2px); } 80% { transform: translate(4px, 2px); } }

@media (max-width: 640px) {
    body { padding: 8px; }
    .hud { padding: 8px 10px; }
    .hud-value { font-size: 1.5rem; }
    .timer { font-size: 2.8rem; }
    .arena { height: clamp(380px, 66vh, 640px); }
    .legend .disc, .stats .disc { --s: 40px; }
    .btn { padding: 12px 34px; font-size: 1.1rem; }
    .float-text { font-size: 1.7rem; }
    .panel { min-width: 0; }
    .ranking { table-layout: fixed; font-size: .78rem; }
    .ranking th, .ranking td { padding: 5px 3px; overflow-wrap: anywhere; }
    .ranking th { font-size: .6rem; letter-spacing: .04em; }
    .ranking th:nth-child(1) { width: 12%; }
    .ranking th:nth-child(2) { width: 27%; }
    .ranking th:nth-child(3) { width: 15%; }
    .ranking th:nth-child(4) { width: 46%; }
    /* data + godzina + urządzenie zawsze w jednej linii (mniejsza czcionka) */
    .ranking td:nth-child(4) { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; font-size: .6rem; letter-spacing: -.02em; }
    .name-field input { padding: 9px 12px; font-size: .95rem; }
    .lead, .hint { overflow-wrap: anywhere; }

    /* ===== TELEFON: ekrany przesuwane w poziomie, bez przewijania góra-dół ===== */
    .overlay { flex-direction: column; overflow: hidden; padding: 8px; }

    .panel.pager {
        flex: 1 1 auto;
        min-height: 0;
        max-width: none;
        margin: 0;
        display: grid;
        align-content: center;
        overflow-x: auto;
        overflow-y: auto;               /* tylko awaryjnie, gdy treść się nie mieści */
        scroll-snap-type: x mandatory;
        overscroll-behavior: contain;
        touch-action: pan-x pan-y;
        scrollbar-width: none;
    }
    .pager::-webkit-scrollbar { display: none; }

    .pager-start { grid-template-columns: repeat(4, 100%); grid-template-rows: auto auto; }
    .pager-end   { grid-template-columns: repeat(2, 100%); grid-template-rows: auto; }

    .pg { min-width: 0; padding: 0 6px; align-self: center; scroll-snap-align: start; scroll-snap-stop: always; }

    /* start: [TOP] [tytuł + START] [ZASADY + płyty] [SZCZEGÓŁY] */
    .pager-start .pg-rank   { grid-column: 1; grid-row: 1 / span 2; }
    .pager-start .pg-top    { grid-column: 2; grid-row: 1; align-self: end; }
    .pager-start .pg-bottom { grid-column: 2; grid-row: 2; align-self: start; }
    .pager-start .pg-rules  { grid-column: 3; grid-row: 1 / span 2; }
    .pager-start .pg-rules2 { grid-column: 4; grid-row: 1 / span 2; }

    /* koniec gry: [TOP] [WYNIK] */
    .pager-end .pg-rank   { grid-column: 1; grid-row: 1; }
    .pager-end .pg-result { grid-column: 2; grid-row: 1; }

    .pg .title { font-size: clamp(1.7rem, 9vw, 2.4rem); }
    .pg-bottom { margin-top: 18px; }
    .pg-rank .sub { margin: 0 0 8px; }

    /* ZASADY: zwarty układ */
    .lead { margin: 0 auto 10px; font-size: .85rem; line-height: 1.35; }
    .hint { margin: 10px 0 0; font-size: .78rem; line-height: 1.35; }
    .rules-list { margin-top: 8px; font-size: .8rem; line-height: 1.35; }
    .rules-list p { margin-bottom: 6px; }
    .legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 0; text-align: left; }
    .legend li { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; min-width: 0; }
    .legend li .disc { grid-row: 1 / span 2; }
    .legend li b { grid-row: 1; align-self: end; font-size: 1.15rem; line-height: 1.1; }
    .legend li em { grid-row: 2; align-self: start; font-size: .68rem; line-height: 1.15; }

    /* SZCZEGÓŁY (osobny ekran): trochę drobniejszy tekst, żeby zmieścić wszystko */
    .pg-rules2 .sub { margin: 0 0 6px; }
    .pg-rules2 .rules-list { margin-top: 0; font-size: .78rem; line-height: 1.3; }
    .pg-rules2 .rules-list p { margin-bottom: 5px; }
    .pg-rules .legend { margin-top: 8px; }

    /* WYNIK: zwarty układ */
    .gameover { font-size: clamp(1.9rem, 10vw, 2.6rem); }
    .final { margin-top: 4px; font-size: 1rem; }
    .final strong { font-size: 2.1rem; }
    .stats { gap: 8px 14px; margin: 4px 0; }
    .stats span { font-size: .8rem; }
    .final-best { margin: 6px 0 2px; font-size: .9rem; }
    .save-status { margin: 2px 0 6px; font-size: .8rem; }

    /* zakładki */
    .pager-tabs { display: flex; justify-content: center; gap: 8px; padding-top: 8px; flex: 0 0 auto; }
    .pager-tabs button {
        font: inherit;
        font-size: .72rem;
        font-weight: 700;
        letter-spacing: .12em;
        color: var(--muted);
        background: transparent;
        border: 1px solid rgba(143, 163, 199, .4);
        border-radius: 999px;
        padding: 5px 14px;
        cursor: pointer;
    }
    .pager-tabs button.active { color: #031022; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px rgba(0, 229, 255, .6); }
}

/* =========================================================
   POZIOM 4 – plakietka aktualnego celu, poświata celu
   ========================================================= */
.target-badge {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 16px 4px 10px;
    border-radius: 999px;
    background: rgba(8, 16, 38, .8);
    border: 1px solid rgba(61, 255, 138, .6);
    box-shadow: 0 0 16px rgba(61, 255, 138, .35);
    pointer-events: none;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.target-badge.hidden { display: none; }
.target-badge .tb-label { font-size: .68rem; color: var(--muted); }
.target-badge .tb-name { font-size: .95rem; color: var(--green); text-shadow: 0 0 10px rgba(61, 255, 138, .75); }
.target-badge .disc { position: relative; --s: 30px; display: none; }
.target-badge[data-type="dvd"] .disc.dvd,
.target-badge[data-type="bluray"] .disc.bluray,
.target-badge[data-type="uhd"] .disc.uhd { display: inline-block; }
.target-badge.change { animation: badgeChange .7s ease-out; }

.disc.is-target .disc-fx::before { box-shadow: 0 0 22px 6px rgba(61, 255, 138, .85); }

@keyframes badgeChange {
    0%   { transform: translateX(-50%) scale(1.6); box-shadow: 0 0 40px rgba(61, 255, 138, 1); }
    100% { transform: translateX(-50%) scale(1);   box-shadow: 0 0 16px rgba(61, 255, 138, .35); }
}

/* =========================================================
   PRZYCISKI POZIOMÓW pod START (zielony = dostępny, czerwony = zablokowany)
   ========================================================= */
.level-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 8px;
    margin-top: 6px;
}
a.btn.lvl-btn { margin-top: 0; }
a.btn.lvl-btn.ok {
    color: #031a0d;
    background: linear-gradient(135deg, #7dffb0, #1fbf63);
    box-shadow: 0 0 12px rgba(61, 255, 138, .5), 0 3px 10px rgba(0, 0, 0, .35);
}
a.btn.lvl-btn.ok:hover, a.btn.lvl-btn.ok:focus-visible {
    box-shadow: 0 0 18px rgba(61, 255, 138, .8), 0 4px 12px rgba(0, 0, 0, .4);
}
a.btn.lvl-btn.locked {
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #ff6b85, #c4203f);
    box-shadow: 0 0 12px rgba(255, 68, 102, .45), 0 3px 10px rgba(0, 0, 0, .35);
}
a.btn.lvl-btn[aria-current="page"] { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 2px; }

/* =========================================================
   REKLAMA (ad.js) – raz na poziom, duży przycisk X
   PC: ok. 1/4 ekranu, telefon: cały ekran
   ========================================================= */
.ad-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, .86);
}
.ad-box {
    position: relative;
    width: 50vw;
    height: 50vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 229, 255, .35);
}
.ad-box .adsbygoogle { width: 100%; height: 100%; }
.ad-close {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    font: inherit;
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    background: rgba(0, 0, 0, .75);
    cursor: pointer;
}
.ad-close:hover, .ad-close:focus-visible { background: var(--red); outline: none; }
@media (max-width: 640px) {
    .ad-box { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
    .ad-close { width: 60px; height: 60px; font-size: 2.6rem; top: 10px; right: 10px; }
}

/* =========================================================
   POZIOM 5 – LATARKA: arena zaciemniona, widać tylko krąg wokół kursora
   ========================================================= */
.flashlight-dark {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: none;
    pointer-events: none;
    background: radial-gradient(circle at var(--lx, 50%) var(--ly, 50%),
        rgba(2, 4, 12, 0) 0,
        rgba(2, 4, 12, 0) calc(var(--lr, 150px) * 0.55),
        rgba(2, 4, 12, .6) calc(var(--lr, 150px) * 0.85),
        rgba(2, 4, 12, .98) var(--lr, 150px));
}
.arena.flashlight .flashlight-dark { display: block; }
/* komunikaty i punkty zawsze nad zaciemnieniem */
.layer .float-text, .layer .countdown { z-index: 3; }

/* Przycisk DEMO (pod przyciskami poziomów) */
.demo-nav { display: flex; justify-content: center; margin-top: 6px; }
a.btn.demo-link {
    margin-top: 0;
    color: #1a1000;
    background: linear-gradient(135deg, #ffe27a, #ffc83d);
    box-shadow: 0 0 12px rgba(255, 200, 61, .5), 0 3px 10px rgba(0, 0, 0, .35);
}

/* =========================================================
   CELOWNIK (crosshair.js) – tylko komputer, tylko w trakcie gry
   ========================================================= */
.game-crosshair {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    display: none;
    pointer-events: none;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, .8), inset 0 0 8px rgba(255, 255, 255, .5);
}
.game-crosshair::before,
.game-crosshair::after { content: ""; position: absolute; background: #fff; }
.game-crosshair::before { left: 50%; top: -7px; bottom: -7px; width: 2px; margin-left: -1px; }
.game-crosshair::after  { top: 50%; left: -7px; right: -7px; height: 2px; margin-top: -1px; }
.game-crosshair.fire { animation: crossFire .18s ease-out; }
.arena.crosshair-on { cursor: none; }
@keyframes crossFire { 0% { transform-origin: center; filter: brightness(2); } 100% { filter: none; } }

/* Info o poziomie nad rankingiem */
.rank-level {
    margin: -2px 0 8px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 200, 61, .45);
}
.pg-rules2 .sub { margin-top: 14px; }
@media (max-width: 640px) { .pg-rules2 .sub { margin-top: 0; } }

/* =========================================================
   LOGO "DiscShot" – jasny pastelowy niebieski, kontrastowy do ciemnego tła
   ========================================================= */
a.logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .12em;
    padding: .1em .35em .1em .1em;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1.1;
    color: #bfe3ff;
    text-shadow: 0 0 10px rgba(168, 216, 255, .75), 0 0 28px rgba(140, 200, 255, .45), 0 2px 0 rgba(10, 30, 70, .8);
}
a.logo .logo-text b { color: #ffffff; font-weight: 900; text-shadow: 0 0 12px rgba(200, 232, 255, .95), 0 0 30px rgba(168, 216, 255, .6); }
/* płyta jako element tła logo (obracająca się) */
a.logo .logo-disc {
    position: relative;
    display: inline-block;
    width: 1.05em;
    height: 1.05em;
    margin-right: .08em;
    border-radius: 50%;
    background:
        radial-gradient(circle, #050914 0 11%, rgba(255,255,255,.85) 12% 24%, transparent 25%),
        conic-gradient(#cfe8ff, #a8d8ff, #e6f4ff, #9cc9f5, #d9edff, #b5dcff, #cfe8ff);
    box-shadow: 0 0 14px rgba(168, 216, 255, .7), inset 0 0 0 2px rgba(255,255,255,.55);
    animation: spin 6s linear infinite;
}
a.logo:hover, a.logo:focus-visible { filter: brightness(1.15); outline: none; }

/* =========================================================
   PASTELOWE PRZYCISKI
   ========================================================= */
.btn {
    color: #1b2a4a;
    background: linear-gradient(135deg, #bfe3ff, #c9c2ff);
    box-shadow: 0 0 16px rgba(168, 216, 255, .45), 0 6px 18px rgba(0, 0, 0, .4);
}
.btn:hover:not(:disabled), .btn:focus-visible {
    box-shadow: 0 0 26px rgba(191, 227, 255, .75), 0 8px 22px rgba(0, 0, 0, .45);
}
.btn-sm, a.btn-sm {
    box-shadow: 0 0 10px rgba(168, 216, 255, .35), 0 3px 10px rgba(0, 0, 0, .35);
}
a.btn.lvl-btn.ok {
    color: #17402b;
    background: linear-gradient(135deg, #c8f7dc, #9fe3bd);
    box-shadow: 0 0 10px rgba(159, 227, 189, .45), 0 3px 10px rgba(0, 0, 0, .35);
}
a.btn.lvl-btn.ok:hover, a.btn.lvl-btn.ok:focus-visible {
    box-shadow: 0 0 16px rgba(159, 227, 189, .75), 0 4px 12px rgba(0, 0, 0, .4);
}
a.btn.lvl-btn.locked {
    color: #5a1d2c;
    background: linear-gradient(135deg, #ffd3dc, #f7a8bb);
    box-shadow: 0 0 10px rgba(247, 168, 187, .4), 0 3px 10px rgba(0, 0, 0, .35);
}
a.btn.demo-link {
    color: #5a4310;
    background: linear-gradient(135deg, #fff1bd, #ffdf94);
    box-shadow: 0 0 10px rgba(255, 223, 148, .45), 0 3px 10px rgba(0, 0, 0, .35);
}
.pager-tabs button.active { color: #1b2a4a; background: #bfe3ff; border-color: #bfe3ff; box-shadow: 0 0 12px rgba(191, 227, 255, .6); }
.mute-btn:hover, .mute-btn:focus-visible { color: #bfe3ff; border-color: #bfe3ff; }
