/* ============================================================
   BATTLE OF YOUTUBERS — arcade cabinet styling
   Flow: attract screen -> character select -> VS -> fight
   ============================================================ */

:root {
    --ink: #05060f;
    --panel: rgba(6, 8, 20, 0.86);
    --red: #e01b24;
    --red-hot: #ff3b30;
    --gold: #facd09;
    --gold-soft: #ffe36e;
    --p1: #ff4b3e;
    --p2: #3aa0ff;
    --line: #ffffff;
    /* attract screen: the flat royal blue the splash art sits on */
    --arcade-blue: #00065e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Press Start 2P', cursive;
}

body {
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

/* Laid out at a fixed 1024x576 and scaled to the window by fitToViewport().
   Edge to edge -- no cabinet bezel.
   flex-shrink must stay 0: body is a flex row, so on any window narrower than
   1024px flexbox squeezes the box itself and overflow:hidden crops the arena --
   the right of the attract collage simply vanishes. The transform does the
   fitting; the layout box never changes. */
#game-container {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 1024px;
    height: 576px;
    transform-origin: center center;
    overflow: hidden;
}

canvas#gameCanvas {
    background-color: #000;
    display: block;
}

/* ---------- shared screen chrome ---------- */

.screen {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.screen[hidden] {
    display: none;
}

.scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    background: repeating-linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0px,
            rgba(0, 0, 0, 0) 2px,
            rgba(0, 0, 0, 0.28) 3px,
            rgba(0, 0, 0, 0.28) 4px);
    mix-blend-mode: multiply;
}

/* Text for crawlers and screen readers only -- the wordmark is drawn as three
   painted layers, so the <h1> carries a plain-language copy of it here. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.blink {
    animation: blink 1.05s steps(1, end) infinite;
}

@keyframes blink {

    0%,
    55% {
        opacity: 1;
    }

    56%,
    100% {
        opacity: 0.05;
    }
}

/* ============================================================
   1. ATTRACT SCREEN — the landing
   Flat royal-blue arcade splash in the Street Fighter II mould:
   a gradient plate logo on the left, the roster cut-outs collaged
   down the right and bleeding off the edges. Everything is placed
   absolutely inside the fixed 1024x576 box.

   This is the one screen with no .scanlines overlay: the CRT weave
   is fine over flat panels but multiplies into a milky haze over the
   photo cut-outs, and the softer phone portraits suffer worst.
   ============================================================ */

.attract-screen {
    display: block;
    background:
        radial-gradient(ellipse 72% 64% at 30% 42%, rgba(52, 66, 205, 0.5) 0%, rgba(0, 6, 94, 0) 68%),
        radial-gradient(ellipse 60% 50% at 78% 78%, rgba(0, 2, 46, 0.55) 0%, rgba(0, 6, 94, 0) 70%),
        var(--arcade-blue);
}

/* ---------- roster ticker, pinned across the top ---------- */

.attract-marquee {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    overflow: hidden;
    padding: 8px 0;
    background: rgba(0, 2, 42, 0.78);
    border-bottom: 2px solid rgba(250, 205, 9, 0.42);
}

.attract-marquee-track {
    display: inline-flex;
    gap: 26px;
    white-space: nowrap;
    animation: marquee 26s linear infinite;
    font-size: 9px;
    color: var(--gold-soft);
}

.attract-marquee-track span b {
    color: #fff;
    font-weight: normal;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ---------- the cut-out collage ---------- */

.attract-cast {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

/* The portraits are head-and-chest crops with a hard square bottom. The front
   row hides that off the bottom of the frame; the back row ends mid-screen, so
   buildAttractCast() gives it --fade-from/-to to dissolve the crop instead.
   Left unset (front row) the band is 100%/100%, i.e. no fade at all. */
.cast-member {
    position: absolute;
    display: block;
    height: auto;
    transform: rotate(var(--tilt, 0deg));
    -webkit-mask-image: linear-gradient(180deg,
            #000 var(--fade-from, 100%), transparent var(--fade-to, 100%));
    mask-image: linear-gradient(180deg,
            #000 var(--fade-from, 100%), transparent var(--fade-to, 100%));
    filter:
        drop-shadow(0 0 1px rgba(0, 2, 30, 0.9))
        drop-shadow(8px 12px 14px rgba(0, 1, 24, 0.6));
    animation: cast-float 7s ease-in-out infinite;
}

/* Back row: knocked back a stop so the front row reads as nearer. Contrast is
   nudged up as brightness comes down, or the softer phone portraits go milky. */
.cast-member--back {
    filter:
        brightness(0.92) contrast(1.12) saturate(1.12)
        drop-shadow(0 0 1px rgba(0, 2, 30, 0.9))
        drop-shadow(8px 12px 14px rgba(0, 1, 24, 0.6));
}

@keyframes cast-float {

    0%,
    100% {
        transform: rotate(var(--tilt, 0deg)) translateY(0);
    }

    50% {
        transform: rotate(var(--tilt, 0deg)) translateY(-6px);
    }
}

/* ---------- left column: logo plate and the start call ---------- */

.attract-inner {
    position: absolute;
    left: 52px;
    top: 72px;
    bottom: 46px;
    width: 500px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.attract-welcome {
    color: #93a8ff;
    font-size: 10px;
    font-weight: normal;
    letter-spacing: 6px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 rgba(0, 2, 30, 0.9);
}

/* One <h1> for the whole wordmark; the two painted words are spans inside it.
   Reset the heading's own font metrics or they leak into the plate. */
.attract-logo {
    font-size: 0;
    font-weight: 400;
    line-height: 0;
}

/* Three stacked layers share one skew: dark keyline and white rim on ::before,
   the gradient plate on ::after, the real text only reserving the space. */
.attract-title {
    position: relative;
    display: block;
    font-family: 'Anton', 'Press Start 2P', sans-serif;
    font-weight: 400;
    font-size: 84px;
    line-height: 0.94;
    letter-spacing: 2px;
    white-space: nowrap;
    transform: skewX(-8deg);
    transform-origin: left bottom;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: title-throb 2.8s ease-in-out infinite;
}

.attract-title::before,
.attract-title::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
}

.attract-title::before {
    z-index: 1;
    color: #fff;
    -webkit-text-fill-color: #fff;
    -webkit-text-stroke: 0.1em #fff;
    filter:
        drop-shadow(0 0 2px #05082e) drop-shadow(0 0 2px #05082e)
        drop-shadow(0 0 2px #05082e) drop-shadow(5px 6px 0 rgba(0, 1, 24, 0.85));
}

.attract-title::after {
    z-index: 2;
    color: transparent;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(180deg, #ff2a10 0%, #ff5f0e 46%, #ff9412 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Second word carries on where the first one stops, so the two read as one
   continuous red-to-yellow ramp. */
.attract-title--accent {
    font-size: 100px;
    margin-top: -4px;
    animation-delay: .14s;
}

.attract-title--accent::after {
    background-image: linear-gradient(180deg, #ff9412 0%, #ffc714 36%, #ffe81a 70%, #fff97a 100%);
}

@keyframes title-throb {

    0%,
    100% {
        transform: skewX(-8deg) scale(1);
    }

    50% {
        transform: skewX(-8deg) scale(1.018);
    }
}

.attract-sub {
    color: var(--gold-soft);
    font-size: 9px;
    letter-spacing: 3px;
    margin-top: 14px;
    text-shadow: 2px 2px 0 rgba(0, 2, 30, 0.9);
}

/* pushed to the foot of the column, the way a cabinet sits it */
.attract-cta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.start-btn {
    background: linear-gradient(180deg, #ff6a33 0%, #e01b24 52%, #99101a 100%);
    color: #fff;
    border: 4px solid #fff;
    padding: 15px 26px;
    font-size: 15px;
    letter-spacing: 2px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
    box-shadow:
        0 0 0 4px #05082e,
        7px 8px 0 rgba(0, 1, 24, 0.72),
        inset 0 2px 0 rgba(255, 255, 255, 0.34);
    animation: start-pulse 1.7s ease-in-out infinite;
    transition: transform .08s ease, filter .12s ease;
}

.start-btn:hover {
    filter: brightness(1.16);
    animation-play-state: paused;
    transform: translateY(-2px);
}

.start-btn:active {
    transform: translateY(3px);
    box-shadow:
        0 0 0 4px #05082e,
        3px 4px 0 rgba(0, 1, 24, 0.72),
        inset 0 2px 0 rgba(255, 255, 255, 0.34);
}

@keyframes start-pulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.2);
    }
}

.press-start {
    font-size: 10px;
    letter-spacing: 3px;
    color: transparent;
    -webkit-text-fill-color: transparent;
    background: linear-gradient(90deg, #ff3b30 0%, #ffa312 26%, #6ee36a 50%, #ffe81a 74%, #ff3b30 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(2px 2px 0 rgba(0, 1, 24, 0.95));
}

/* ---------- no-JS fallback ---------- */

.no-js-note {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 56px;
    text-align: center;
    background: var(--arcade-blue);
    color: #cdd8ff;
    font-size: 9px;
    line-height: 2.1;
}

.no-js-note h2 {
    color: var(--gold);
    font-size: 15px;
    letter-spacing: 3px;
}

.no-js-note p {
    max-width: 620px;
}

/* ============================================================
   2. CHARACTER SELECT  (big art either side, picker in the middle)
   ============================================================ */

.select-screen {
    background:
        linear-gradient(rgba(4, 6, 18, 0.90), rgba(9, 4, 20, 0.95)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 26px);
    padding: 0;
    justify-content: center;
}

.select-stage {
    display: grid;
    grid-template-columns: 1fr minmax(440px, 470px) 1fr;
    align-items: center;
    justify-items: center;
    width: 100%;
    height: 100%;
    padding: 10px 18px;
    gap: 8px;
    z-index: 3;
}

/* --- the two big fighters --- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.hero-art {
    width: 224px;
    height: 280px;
    background:
        radial-gradient(ellipse at 50% 88%, rgba(255, 255, 255, 0.10), transparent 65%);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75));
}

.hero-name {
    font-size: 22px;
    letter-spacing: 1px;
    margin-top: -6px;
    background: linear-gradient(180deg, #ee2418 0%, #f2571b 38%, #ffa41c 68%, #ffe23d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter:
        drop-shadow(1.5px 0 0 #1b0f08) drop-shadow(-1.5px 0 0 #1b0f08)
        drop-shadow(0 1.5px 0 #1b0f08) drop-shadow(0 -1.5px 0 #1b0f08);
}

.hero-title {
    color: var(--gold-soft);
    font-size: 8px;
    letter-spacing: 1px;
    margin-top: 4px;
}

.hero-country {
    color: #9fb4d8;
    font-size: 7px;
    letter-spacing: 1px;
    min-height: 9px;
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 6px;
    min-height: 34px;
}

.hero--p2 .hero-art {
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75));
}

.stat-row {
    display: grid;
    grid-template-columns: 50px 1fr;
    align-items: center;
    gap: 6px;
    font-size: 6px;
    color: #cfd6ff;
}

.stat-pips { display: flex; gap: 3px; }

.stat-pip {
    width: 11px;
    height: 6px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-pip.on { background: var(--gold); border-color: #fff; }

/* --- the picker in the middle --- */
.select-centre {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    width: 100%;
}

.select-title {
    color: #fff;
    font-size: 19px;
    letter-spacing: 3px;
    text-shadow: 3px 3px 0 var(--red), 0 0 20px rgba(255, 59, 48, 0.5);
}

.select-status {
    font-size: 8px;
    color: var(--gold);
    letter-spacing: 1px;
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    width: 100%;
    margin-top: 2px;
}

.roster-tile {
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.32);
    background: linear-gradient(180deg, rgba(30, 26, 60, 0.9), rgba(10, 8, 24, 0.95));
    padding: 6px 4px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
}

.roster-tile:hover { transform: translateY(-2px); border-color: #fff; }

.roster-tile canvas {
    width: 70px;
    height: 88px;
}

.tile-name {
    font-size: 8px;
    color: #fff;
    text-align: center;
    line-height: 1.3;
}

.tile-flag {
    font-size: 6px;
    line-height: 1;
    letter-spacing: 1px;
    padding: 2px 5px;
    color: #0b0b16;
    background: var(--gold);
    border: 1px solid #000;
}

.tile-flag:empty { display: none; }

.roster-tile.cursor-p1 {
    border-color: var(--p1);
    box-shadow: 0 0 0 3px rgba(255, 75, 62, .35), 0 0 18px rgba(255, 75, 62, .55);
}

.roster-tile.locked-p1::before {
    content: 'PICKED';
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 6px;
    padding: 2px 5px;
    background: var(--p1);
    color: #200;
    border: 2px solid #000;
    z-index: 2;
}

.roster-quote {
    font-size: 8px;
    color: var(--gold-soft);
    text-align: center;
    min-height: 11px;
    letter-spacing: 1px;
}

.select-hint {
    font-size: 7px;
    color: rgba(255, 255, 255, 0.62);
    letter-spacing: 1px;
}

.select-hint b { color: var(--gold); font-weight: normal; }

.arcade-btn:disabled { filter: grayscale(1) brightness(.6); cursor: not-allowed; }

/* ============================================================
   3. VS SCREEN
   ============================================================ */

.vs-screen {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 30px;
    background:
        radial-gradient(circle at 50% 50%, rgba(250, 205, 9, .22), rgba(3, 2, 10, .97) 62%),
        repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, .05) 0deg 6deg, transparent 6deg 12deg);
}

.vs-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 3;
}

.vs-side--left {
    animation: slide-from-left .5s cubic-bezier(.2, .9, .3, 1.4) both;
}

.vs-side--right {
    animation: slide-from-right .5s cubic-bezier(.2, .9, .3, 1.4) both;
}

@keyframes slide-from-left {
    from {
        transform: translateX(-420px);
        opacity: 0;
    }
}

@keyframes slide-from-right {
    from {
        transform: translateX(420px);
        opacity: 0;
    }
}

.vs-portrait {
    width: 150px;
    height: 188px;
    border: 4px solid #fff;
    background: linear-gradient(180deg, #241a3f, #0d0a1c);
    box-shadow: 0 0 0 4px #000, 0 0 30px rgba(255, 255, 255, .25);
}

.vs-name {
    color: #fff;
    font-size: 15px;
    text-shadow: 3px 3px 0 #000;
    text-align: center;
}

.vs-player {
    font-size: 8px;
    color: var(--gold);
    letter-spacing: 2px;
}

.vs-badge {
    font-size: 74px;
    color: var(--gold);
    text-shadow: -4px 0 0 var(--red), 4px 0 0 #00e5ff, 0 7px 0 #000;
    z-index: 4;
    animation: vs-slam .45s cubic-bezier(.2, 1.4, .4, 1) both;
    animation-delay: .35s;
}

@keyframes vs-slam {
    from {
        transform: scale(4) rotate(-14deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(-6deg);
        opacity: 1;
    }
}

.vs-stage {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    letter-spacing: 3px;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    z-index: 3;
}

/* ============================================================
   IN-GAME HUD
   ============================================================ */

#ui-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

#health-bars {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    width: 100%;
}

#health-bars,
#display-text,
.arcade-btn {
    pointer-events: auto;
}

.cabinet-buttons {
    position: absolute;
    bottom: 10px;
    right: 12px;
    z-index: 40;
    display: flex;
    gap: 6px;
    pointer-events: auto;
}

.cabinet-buttons .arcade-mini-btn {
    font-size: 8px;
    padding: 7px 9px;
    opacity: 0.7;
}

.cabinet-buttons .arcade-mini-btn:hover {
    opacity: 1;
}

.player-health,
.enemy-health {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: white;
    text-shadow: 2px 2px 0 #000;
}

.player-name {
    font-size: 17px;
    letter-spacing: 1px;
    padding: 0;
    background: linear-gradient(180deg, #ee2418 0%, #f2571b 38%, #ffa41c 68%, #ffe23d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* drop-shadow follows the glyph alpha, so four of them make a real outline
       around gradient-filled text -- text-shadow would bleed through it. */
    text-shadow: none;
    filter:
        drop-shadow(1.5px 0 0 #1b0f08) drop-shadow(-1.5px 0 0 #1b0f08)
        drop-shadow(0 1.5px 0 #1b0f08) drop-shadow(0 -1.5px 0 #1b0f08);
}

.center-hud {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
}

.round-indicator {
    color: #ffe36e;
    font-size: 12px;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 1px;
}

.score-label {
    font-size: 10px;
    color: #f1f1f1;
    opacity: 0.95;
}

.player-health {
    align-items: flex-start;
}

.enemy-health {
    align-items: flex-end;
}

.health-bar-container {
    width: 100%;
    height: 26px;
    background: linear-gradient(to bottom, #4a1410 0%, #2a0c08 55%, #160603 100%);
    border: 3px solid #262f32;
    position: relative;
    box-shadow: 0 0 0 2px #000, 3px 3px 0 rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Anchored so both bars drain toward the centre of the screen, the way a
   fighting game reads: the empty stretch always sits next to the timer. */
.health-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    transition: width 0.3s ease;
    background: linear-gradient(to bottom, #fffb7a 0%, #fef900 42%, #f2d000 62%, #d9a800 100%);
    box-shadow: inset 0 -3px 0 rgba(120, 80, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.enemy-health .health-fill {
    left: auto;
    right: 0;
}

/* fighters without a sheet yet: visible, dimmed, not selectable */
.roster-tile.soon {
    cursor: not-allowed;
    filter: grayscale(0.75) brightness(0.65);
}

.roster-tile.soon::after {
    content: 'SOON';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-8deg);
    font-size: 10px;
    letter-spacing: 1px;
    padding: 4px 7px;
    color: #0b0b16;
    background: var(--gold);
    border: 2px solid #000;
    pointer-events: none;
}

/* KO badge, sitting between the two bars like the arcade original */
.ko-badge {
    font-size: 15px;
    line-height: 1;
    padding: 5px 9px 4px;
    background: #fff8ff;
    border: 3px solid #2e0046;
    box-shadow: 0 0 0 2px #000;
    color: #e0202c;
    -webkit-text-stroke: 0.6px #2e0046;
    letter-spacing: 1px;
}

/* name plate + round-win stars */
.name-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 2px;
}

.name-row--right {
    flex-direction: row;
    justify-content: flex-end;
}

.win-stars {
    display: inline-flex;
    gap: 5px;
}

.win-stars i {
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.45);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
                       50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.win-stars i.on {
    background: var(--gold);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(250, 205, 9, 0.9);
    animation: star-pop 0.35s ease-out;
}

@keyframes star-pop {
    0% { transform: scale(2.2) rotate(-40deg); }
    100% { transform: scale(1) rotate(0); }
}

/* super meter: a thin strip under the health bar */
.meter-container {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.72);
    border: 2px solid rgba(255, 255, 255, 0.55);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.meter-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(to bottom, #4fd3ff 0%, #2196f3 55%, #0d47a1 100%);
    transition: width 0.18s linear;
}

.meter-container.meter-full {
    border-color: var(--gold);
    animation: meter-ready 0.5s steps(1, end) infinite;
}

.meter-container.meter-full .meter-fill {
    background: linear-gradient(to bottom, #fff6b0 0%, var(--gold) 55%, #d08c00 100%);
}

@keyframes meter-ready {
    0%, 50% { box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5), 0 0 14px rgba(250, 205, 9, 0.9); }
    51%, 100% { box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5); }
}

/* difficulty picker on the select screen */
.difficulty-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.difficulty-label {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 1px;
    margin-right: 3px;
}

.difficulty-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    padding: 8px 12px;
    color: #cfd6ff;
    background: rgba(10, 12, 28, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: transform .08s ease;
}

.difficulty-btn:hover {
    border-color: #fff;
    color: #fff;
}

.difficulty-btn.is-active {
    background: var(--red);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 12px rgba(224, 27, 36, 0.6);
}

#timer {
    background: radial-gradient(circle at 35% 30%, #ffe36e 0%, #facd09 55%, #d59d00 100%);
    color: #000;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    border: 3px solid white;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

#display-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 34px;
    text-align: center;
    text-shadow: 4px 4px 0 #000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.78);
    padding: 24px 30px;
    border: 4px solid white;
    z-index: 10;
}

.result-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.combo-announcer {
    position: absolute;
    left: 50%;
    top: 140px;
    transform: translateX(-50%);
    color: #ffcf33;
    text-shadow: 3px 3px 0 #000;
    font-size: 18px;
    min-height: 26px;
    pointer-events: none;
    z-index: 7;
    text-align: center;
    width: 100%;
}

/* ============================================================
   CONTROLS
   ============================================================ */

.arcade-input {
    border: 3px solid #fff;
    background: #151515;
    color: #fff;
    font-size: 9px;
    padding: 8px;
    outline: none;
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.arcade-input:focus {
    border-color: var(--gold);
}

.start-error {
    min-height: 11px;
    color: #ff6b6b;
    font-size: 8px;
}

.arcade-btn {
    background-color: #c00;
    color: white;
    border: 4px solid white;
    padding: 12px 30px;
    font-size: 18px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
}

.arcade-btn:hover:not(:disabled) {
    background-color: #f00;
    transform: scale(1.05);
}

.arcade-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.arcade-mini-btn {
    background-color: #0f3250;
    color: #fff;
    border: 3px solid #fff;
    padding: 9px 12px;
    font-size: 9px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}

.arcade-mini-btn:hover {
    background-color: #19507f;
}
