.game-shell { position: relative; }

.hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    color: var(--text-dim);
}
.hud-item { display: flex; align-items: baseline; gap: 4px; }
.hud-item span { color: var(--text); font-size: 0.95rem; }
.hud-timer span { color: var(--accent-gold); font-variant-numeric: tabular-nums; min-width: 4.4ch; display: inline-block; }
.hud-controls { display: flex; align-items: center; gap: 2px; }
.hud-icon-btn {
    font-size: 1.15rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    touch-action: manipulation;
}
.hud-icon-btn:hover { background: rgba(255, 255, 255, 0.06); }

/* Fullscreen mode targets #game-shell specifically (not the whole page),
   so it needs its own sizing/centering while the browser's fullscreen
   element rules apply. */
#game-shell:fullscreen,
#game-shell:-webkit-full-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-deep, #05060f);
    padding: 16px;
}
#game-shell:fullscreen .arena,
#game-shell:-webkit-full-screen .arena {
    max-height: 78vh;
    height: 78vh;
}

.arena {
    position: relative;
    width: 100%;
    height: 480px;
    max-height: 65vh;
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 50% 0%, rgba(126, 249, 255, 0.08), transparent 60%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 34px),
        linear-gradient(160deg, #0a0c1e, #12102a 60%, #090a18);
    border: 1px solid rgba(126, 249, 255, 0.16);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(126, 249, 255, 0.05);
    overflow: hidden;
    touch-action: manipulation;
    transition: transform 0.12s ease;
}
.arena.pulse { animation: shellPulse 0.16s ease; }
@keyframes shellPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.005); }
    100% { transform: scale(1); }
}

@media (max-width: 640px) {
    .arena { height: 60vh; max-height: none; }
}

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

.countdown-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: rgba(5, 6, 15, 0.35);
}
#countdown-text {
    font-size: 4rem;
    font-weight: 800;
    color: var(--accent-cyan);
    text-shadow: 0 0 30px rgba(126, 249, 255, 0.6);
}
.countdown-pop { animation: countdownPop 0.38s ease; }
@keyframes countdownPop {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

/* --- The dot ------------------------------------------------------------ */
.dot {
    position: absolute;
    width: var(--size);
    height: var(--size);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: grid;
    place-items: center;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
    z-index: 3;
    animation: dotSpawn var(--spawn-dur, 200ms) cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
@keyframes dotSpawn {
    0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.dot-core {
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, var(--color) 55%, color-mix(in srgb, var(--color) 60%, #000) 100%);
    box-shadow: 0 0 18px 4px color-mix(in srgb, var(--color) 70%, transparent), 0 0 40px 10px color-mix(in srgb, var(--color) 35%, transparent);
    animation: dotBreathe 1.1s ease-in-out infinite;
}
@keyframes dotBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.dot-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--color) 55%, transparent);
    animation: dotRingSpin 2.4s linear infinite, dotRingPulse 1.1s ease-in-out infinite;
}
@keyframes dotRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes dotRingPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .dot { animation: none; opacity: 1; }
    .dot-core { animation: none; }
    .dot-ring { animation: none; }
}
