/* =============================================================================
 * CODEMASH — Styles
 * =============================================================================
 * All the visual polish for the game shell: neon terminal aesthetics, CRT
 * scanline overlay, high-score table, and the popping score animations that
 * give the HUD its juicy feel.
 *
 * Tailwind is loaded separately via CDN for layout utilities; this stylesheet
 * handles everything that Tailwind can't (custom keyframes, rainbow gradient
 * text, retro shadows).
 * =============================================================================
 */

body {
    font-family: 'Share Tech Mono', monospace;
    background-color: #020202;
    color: #00ff00;
    /* The body scrolls so the FAQ / marketing material below the game is
       reachable. The game stage itself blocks touch-drag scrolling via its
       own `touch-action: none` on .game-screen. */
    overflow-x: hidden;
    overflow-y: auto;
}

/* =============================================================================
 * Game viewport — the first screen of the page. Pinned to 100vh so the
 * canvas + HUD always fill the initial fold. Content below it is the
 * marketing / FAQ section.
 * =============================================================================
 */
.game-screen {
    /* Lock the first fold to exactly one viewport height. `min-height`
       keeps flex centering intact; `height` prevents the section from
       growing on short content and dragging the FAQ upward. */
    height: 100vh;
    min-height: 100vh;
    /* Block browser touch scrolling while the player is dragging inside
       the game stage. Scrolling into the FAQ section below still works
       because that section isn't part of this subtree. */
    touch-action: none;
}

canvas {
    image-rendering: pixelated;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2),
                inset 0 0 20px rgba(0, 255, 0, 0.1);
    background: #000;
}

/* CRT scanline overlay: thin dark stripes painted on top of the canvas to
 * fake the horizontal retrace of an old cathode-ray monitor. */
.scanlines {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
}

.neon-text {
    text-shadow: 0 0 5px #0f0, 0 0 10px #0f0;
}

/* Touch/D-pad buttons — glowing green borders that brighten on press. */
.btn-neon {
    border: 2px solid #0f0;
    box-shadow: 0 0 10px #0f0, inset 0 0 10px #0f0;
    transition: all 0.2s;
}
.btn-neon:active {
    background: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 20px #0f0, inset 0 0 20px #0f0;
}

/* =============================================================================
 * Juicy score pop — plays whenever the HUD score updates.
 * =============================================================================
 */
.juicy-pop {
    animation: juicy-pop 0.4s ease-out;
    display: inline-block;
}
@keyframes juicy-pop {
    0%   { transform: scale(1);   color: #fff; text-shadow: 0 0 5px #fff, 0 0 20px #fff, 0 0 40px #0f0; }
    40%  { transform: scale(1.6); color: #ffff66; }
    100% { transform: scale(1); }
}

/* =============================================================================
 * High-score table — elite hacker leaderboard under the game over screen.
 * =============================================================================
 */
#highscore-section { width: 100%; max-width: 28rem; }
#highscore-table {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.85rem;
}
.hs-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
    letter-spacing: 0.05em;
}
.hs-row > .hs-name { flex: 1; text-align: left; }

/* Podium colors for the top three. */
.hs-rank-1 { color: #ffd700; text-shadow: 0 0 6px #ffd700, 0 0 12px #ff8800; }
.hs-rank-2 { color: #e0e0e0; text-shadow: 0 0 6px #e0e0e0; }
.hs-rank-3 { color: #cd7f32; text-shadow: 0 0 6px #cd7f32; }

/* Highlighted row for the player's just-entered score. */
.hs-current {
    animation: hs-pulse 0.8s ease-in-out infinite;
    background: rgba(255, 255, 0, 0.08);
}
@keyframes hs-pulse {
    0%, 100% { filter: brightness(1);   transform: scale(1); }
    50%      { filter: brightness(2);   transform: scale(1.04); }
}

/* =============================================================================
 * Name entry form — shown when the player lands on the leaderboard.
 * =============================================================================
 */
.name-input {
    background: rgba(0, 20, 0, 0.6);
    border: 2px solid #0f0;
    color: #0f0;
    font-family: 'Share Tech Mono', monospace;
    padding: 0.6rem 0.75rem;
    text-align: center;
    text-transform: uppercase;
    width: 160px;
    font-size: 1.25rem;
    box-shadow: 0 0 10px #0f0, inset 0 0 10px rgba(0, 255, 0, 0.2);
    letter-spacing: 0.3em;
    outline: none;
}
.name-input:focus {
    box-shadow: 0 0 20px #0f0, inset 0 0 15px rgba(0, 255, 0, 0.3);
    animation: name-pulse 1.4s ease-in-out infinite;
}
@keyframes name-pulse {
    0%, 100% { border-color: #0f0; }
    50%      { border-color: #ffff66; }
}

/* =============================================================================
 * HUD buttons — pause / mute / settings / help.
 * =============================================================================
 * Small terminal-style chips to the right of the HUD row. Keyboard-hint
 * single-letter glyphs (P, M, CFG, ?) match the keybinds so the control
 * never needs a separate tooltip explanation.
 */
.hud-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0.25rem 0.55rem;
    color: #0f0;
    background: rgba(0, 30, 0, 0.55);
    border: 1px solid rgba(0, 255, 0, 0.55);
    border-radius: 3px;
    text-shadow: 0 0 4px #0f0;
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.2), inset 0 0 6px rgba(0, 255, 0, 0.1);
    cursor: pointer;
    transition: background 0.12s, box-shadow 0.12s, color 0.12s;
    min-width: 1.8rem;
    text-align: center;
}
.hud-btn:hover,
.hud-btn:focus {
    background: rgba(0, 60, 0, 0.8);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.5), inset 0 0 10px rgba(0, 255, 0, 0.3);
    outline: none;
}
.hud-btn.active {
    background: rgba(0, 120, 0, 0.9);
    color: #fff;
    text-shadow: 0 0 6px #fff, 0 0 12px #0f0;
}
/* Muted state — keep the button readable but clearly "off". */
.hud-btn.muted {
    color: #888;
    text-shadow: none;
    border-color: rgba(255, 255, 255, 0.2);
    text-decoration: line-through;
}

/* =============================================================================
 * HUD term tooltips — one-shot fade under each jargon word on first load.
 * =============================================================================
 */
.hud-term {
    position: relative;
}
.hud-term[data-tip]::after {
    content: '(' attr(data-tip) ')';
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 0.15rem;
    font-size: 0.65rem;
    font-weight: normal;
    color: #9f9;
    text-shadow: 0 0 3px #0f0;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
}
.hud-term.hud-term-show-tip[data-tip]::after {
    opacity: 0.85;
}
.hud-term.hud-term-fade-tip[data-tip]::after {
    opacity: 0;
}

/* =============================================================================
 * Pause overlay — DOM-rendered over the canvas so it stays pixel-sharp.
 * =============================================================================
 */
.pause-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* z-index below the HUD (z-10) so the pause/mute buttons stay clickable;
       above the canvas backdrop so the dim + blur layer reads as a real
       pause state. */
    z-index: 9;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    pointer-events: none;
}
.pause-overlay.hidden { display: none; }
.pause-overlay .pause-title {
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    color: #0f0;
    font-size: clamp(2rem, 6vw, 4rem);
    letter-spacing: 0.2em;
    text-shadow: 0 0 10px #0f0, 0 0 30px #0f0, 0 0 60px #0f0;
    animation: pause-pulse 1.4s ease-in-out infinite;
}
.pause-overlay .pause-hint {
    color: #9f9;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    text-shadow: 0 0 4px #0f0;
    letter-spacing: 0.1em;
}
@keyframes pause-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1);    }
    50%      { opacity: 1;   transform: scale(1.04); }
}

/* =============================================================================
 * In-run controls reminder (?-glyph overlay).
 * =============================================================================
 */
.help-overlay {
    position: absolute;
    right: 1rem;
    top: 3.5rem;
    z-index: 28;
    background: rgba(0, 20, 0, 0.92);
    border: 2px solid #0f0;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5), inset 0 0 10px rgba(0, 255, 0, 0.2);
    padding: 0.8rem 1rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #9f9;
    border-radius: 4px;
    text-align: left;
    max-width: 18rem;
    cursor: pointer;
}
.help-overlay.hidden { display: none; }
.help-overlay h3 {
    color: #0f0;
    font-weight: bold;
    margin-bottom: 0.5rem;
    letter-spacing: 0.15em;
    text-shadow: 0 0 6px #0f0;
}
.help-overlay div { margin-bottom: 0.25rem; }
.help-overlay .k {
    display: inline-block;
    min-width: 6.5rem;
    color: #ffff66;
    text-shadow: 0 0 4px #ff0;
    font-weight: bold;
}
.help-overlay .help-close {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.7rem;
    text-align: right;
}

/* =============================================================================
 * Settings modal.
 * =============================================================================
 */
.settings-modal {
    position: absolute;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}
.settings-modal.hidden { display: none; }
.settings-panel {
    background: rgba(0, 20, 0, 0.95);
    border: 2px solid #0f0;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.4), inset 0 0 15px rgba(0, 255, 0, 0.15);
    padding: 1.25rem 1.5rem;
    border-radius: 4px;
    max-width: 28rem;
    width: 100%;
    font-family: 'Share Tech Mono', monospace;
    color: #9f9;
}
.settings-panel h2 {
    font-size: 1.3rem;
    color: #0f0;
    text-shadow: 0 0 6px #0f0;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    text-align: center;
}
.settings-row {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    row-gap: 0.15rem;
    align-items: start;
    padding: 0.6rem 0;
    border-bottom: 1px dashed rgba(0, 255, 0, 0.2);
    cursor: pointer;
}
.settings-row input[type="checkbox"] {
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: 0.15rem;
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #0f0;
}
.settings-row .settings-label {
    color: #0f0;
    font-weight: bold;
    text-shadow: 0 0 4px #0f0;
}
.settings-row .settings-desc {
    font-size: 0.75rem;
    color: #7f7;
    line-height: 1.3;
}
#btn-settings-close {
    display: block;
    margin: 1rem auto 0;
}

/* Overlay settings entry point (gear/label on the start screen). */
.overlay-settings-btn {
    margin-top: 0.8rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #7f7;
    background: transparent;
    border: none;
    letter-spacing: 0.15em;
    cursor: pointer;
    text-shadow: 0 0 4px #0f0;
}
.overlay-settings-btn:hover { color: #0f0; }

/* =============================================================================
 * HOW TO HACK onboarding panel (start overlay).
 * =============================================================================
 */
.howto-panel {
    max-width: 32rem;
    width: calc(100% - 2rem);
    background: rgba(0, 20, 0, 0.55);
    border: 1px solid rgba(0, 255, 0, 0.35);
    border-radius: 4px;
    padding: 0.85rem 1rem 0.9rem;
    margin-bottom: 1rem;
    font-family: 'Share Tech Mono', monospace;
    color: #cfc;
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.15), inset 0 0 8px rgba(0, 255, 0, 0.05);
}
.howto-panel.hidden { display: none; }
.howto-panel .howto-title {
    font-size: 0.95rem;
    color: #ffff66;
    text-shadow: 0 0 6px #ff0;
    letter-spacing: 0.15em;
    text-align: center;
    margin-bottom: 0.6rem;
}
.howto-panel .howto-row {
    display: grid;
    grid-template-columns: 5rem 1fr;
    align-items: start;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.35;
}
.howto-panel .howto-label {
    color: #0f0;
    font-weight: bold;
    text-shadow: 0 0 4px #0f0;
    letter-spacing: 0.1em;
}
.howto-panel .howto-text b {
    color: #ffff66;
    text-shadow: 0 0 3px #ff0;
}
/* Simplified single-paragraph variant — replaces the four-row breakdown so
   the start screen only asks the player to read one sentence before
   pressing the button. Full details live in the FAQ below the fold. */
.howto-panel .howto-simple {
    font-size: 0.95rem;
    color: #cfc;
    text-align: center;
    line-height: 1.5;
    margin: 0.1rem 0 0.5rem;
    padding: 0 0.25rem;
}
.howto-panel .howto-simple b {
    color: #ffff66;
    text-shadow: 0 0 3px #ff0;
}
.howto-panel .howto-footer {
    margin-top: 0.5rem;
    padding-top: 0.35rem;
    border-top: 1px dashed rgba(0, 255, 0, 0.2);
    font-size: 0.72rem;
    color: #9c9;
    text-align: center;
}

/* =============================================================================
 * First-run FUSE ACTIVE banner.
 * =============================================================================
 */
.fuse-banner {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 27;
    padding: 0.75rem 1.25rem;
    background: rgba(60, 0, 0, 0.85);
    border: 2px solid #f33;
    color: #fff;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: 0.15em;
    text-shadow: 0 0 8px #f00, 0 0 16px #f00;
    box-shadow: 0 0 24px rgba(255, 0, 0, 0.6), inset 0 0 12px rgba(255, 0, 0, 0.3);
    border-radius: 4px;
    pointer-events: none;
    animation: fuse-banner-in 0.3s ease-out;
}
.fuse-banner.hidden { display: none; }
.fuse-banner.fade-out {
    animation: fuse-banner-in 0.3s ease-out, fuse-banner-out 0.8s ease-in 1.8s forwards;
}
@keyframes fuse-banner-in {
    from { opacity: 0; transform: translateX(-50%) scale(0.85); }
    to   { opacity: 1; transform: translateX(-50%) scale(1);    }
}
@keyframes fuse-banner-out {
    to   { opacity: 0; transform: translateX(-50%) scale(1.1); }
}

/* =============================================================================
 * Next-rank hint (game-over "you were X points away from the board").
 * =============================================================================
 */
.next-rank-hint {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: #ffcc66;
    text-shadow: 0 0 5px #ff8800;
    letter-spacing: 0.08em;
    text-align: center;
}
.next-rank-hint.hidden { display: none; }

/* =============================================================================
 * Swap mobile controls — flip the D-pad and action columns.
 * =============================================================================
 */
body.swap-controls #mobile-controls {
    flex-direction: row-reverse;
}

/* =============================================================================
 * Rainbow gradient text used on the "NEW ELITE HACKER" banner.
 * =============================================================================
 */
.rainbow-text {
    background: linear-gradient(90deg, #ff0080, #ffdd00, #00ffaa, #00ccff, #aa66ff, #ff0080);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow-slide 2s linear infinite;
    text-shadow: none;
}
@keyframes rainbow-slide {
    0%   { background-position: 0%   50%; }
    100% { background-position: 200% 50%; }
}

/* =============================================================================
 * Start-overlay scroll hint — soft blinking pointer nudging new visitors to
 * scroll past the fold into the FAQ.
 * =============================================================================
 */
.scroll-hint {
    display: inline-block;
    margin-top: 0.9rem;
    padding: 0.25rem 0.6rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: #7fffd4;
    text-decoration: none;
    text-shadow: 0 0 5px #0ff;
    border: 1px dashed rgba(0, 255, 255, 0.35);
    border-radius: 3px;
    animation: scroll-hint-pulse 2.2s ease-in-out infinite;
}
.scroll-hint:hover {
    color: #bfffff;
    border-color: rgba(0, 255, 255, 0.7);
    text-shadow: 0 0 8px #0ff, 0 0 16px #0ff;
}
@keyframes scroll-hint-pulse {
    0%, 100% { opacity: 0.55; transform: translateY(0); }
    50%      { opacity: 1;    transform: translateY(2px); }
}

/* =============================================================================
 * Below-the-fold marketing / FAQ section.
 * =============================================================================
 * Terminal-styled content block that lives under the game viewport. Uses
 * the same Share Tech Mono palette as the HUD so scrolling down feels like
 * descending further into the system prompt rather than leaving the game.
 */
.site-info {
    width: 100%;
    max-width: 52rem;
    margin: 0 auto;
    padding: 3rem 1.25rem 4rem;
    font-family: 'Share Tech Mono', monospace;
    color: #cfc;
    line-height: 1.55;
    /* Re-enable touch scrolling here — the game-screen section above sets
       touch-action: none to keep swipes on the canvas from scrolling the
       page. That restriction must not bleed into the FAQ. */
    touch-action: auto;
}
.site-info p,
.site-info li {
    font-size: 0.9rem;
    color: #b9e6b9;
}
.site-info p {
    margin: 0 0 0.75rem;
}
.site-info b {
    color: #eaffea;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.35);
}
.site-info i {
    color: #ffe58a;
}
.site-info code {
    background: rgba(0, 255, 0, 0.08);
    border: 1px solid rgba(0, 255, 0, 0.25);
    padding: 0 0.3rem;
    border-radius: 2px;
    font-size: 0.82rem;
    color: #cfffcf;
}
.info-block {
    margin-bottom: 2.25rem;
    padding: 1.1rem 1.25rem 1.25rem;
    background: rgba(0, 20, 0, 0.45);
    border: 1px solid rgba(0, 255, 0, 0.28);
    border-radius: 4px;
    box-shadow: 0 0 16px rgba(0, 255, 0, 0.08),
                inset 0 0 10px rgba(0, 255, 0, 0.04);
}
.info-title {
    font-size: 1.05rem;
    letter-spacing: 0.18em;
    color: #ffff66;
    text-shadow: 0 0 6px #ff0, 0 0 12px rgba(255, 255, 0, 0.35);
    margin: 0 0 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed rgba(255, 255, 102, 0.3);
}
.info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.info-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.35rem;
}
.info-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #0f0;
    text-shadow: 0 0 4px #0f0;
    font-weight: bold;
}

/* --- FAQ accordion (<details>/<summary>) ------------------------------------ */
.faq-item {
    border-top: 1px dashed rgba(0, 255, 0, 0.18);
    padding: 0.7rem 0 0.1rem;
}
.faq-item:first-of-type { border-top: none; padding-top: 0; }
.faq-item summary {
    cursor: pointer;
    color: #8cff8c;
    font-size: 0.92rem;
    font-weight: bold;
    letter-spacing: 0.03em;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.3);
    list-style: none;
    padding: 0.35rem 0 0.35rem 1.25rem;
    position: relative;
    transition: color 0.15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: '+';
    position: absolute;
    left: 0;
    width: 1rem;
    text-align: center;
    color: #ffff66;
    text-shadow: 0 0 4px #ff0;
    transition: transform 0.2s ease;
    display: inline-block;
}
.faq-item[open] > summary::before {
    content: '-';
}
.faq-item summary:hover {
    color: #c6ffc6;
}
.faq-item p {
    margin: 0.35rem 0 0.9rem 1.25rem;
    font-size: 0.86rem;
    color: #b9e6b9;
}

/* --- Footer ----------------------------------------------------------------- */
.site-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    text-align: center;
    border-top: 1px dashed rgba(0, 255, 0, 0.2);
    letter-spacing: 0.15em;
    color: #9f9;
    text-shadow: 0 0 5px #0f0;
}
.site-footer-sub {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #5a5;
    text-shadow: none;
    letter-spacing: 0.1em;
}

@media (max-width: 600px) {
    .site-info {
        padding: 2rem 0.9rem 3rem;
    }
    .info-block {
        padding: 0.9rem 0.9rem 1rem;
        margin-bottom: 1.75rem;
    }
    .info-title { font-size: 0.95rem; }
    .site-info p,
    .site-info li { font-size: 0.85rem; }
}

/* =============================================================================
 * Legal pages (privacy.html / terms.html / contact.html)
 * =============================================================================
 * Standalone pages that reuse the .site-info / .info-block visual language
 * but live on their own URL with a back-link header and legal nav footer.
 */
.legal-body {
    /* Legal pages scroll normally — no 100vh game viewport above them. */
    min-height: 100vh;
    padding: 0;
}
.legal-page {
    padding-top: 2.5rem;
}
.legal-header {
    margin-bottom: 2rem;
    text-align: center;
}
.legal-back {
    display: inline-block;
    margin-bottom: 1.25rem;
    color: #8cff8c;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.35);
    border-bottom: 1px dashed rgba(0, 255, 0, 0.4);
    padding-bottom: 2px;
    transition: color 0.15s, border-color 0.15s;
}
.legal-back:hover {
    color: #c6ffc6;
    border-bottom-color: #c6ffc6;
}
.legal-title {
    font-size: 1.6rem;
    letter-spacing: 0.2em;
    color: #ffff66;
    text-shadow: 0 0 8px #ff0, 0 0 16px rgba(255, 255, 0, 0.35);
    margin: 0 0 0.5rem;
}
.legal-effective {
    font-size: 0.8rem;
    color: #8a8;
    letter-spacing: 0.12em;
    margin: 0;
}
.legal-inline-link,
.site-info a {
    color: #8cff8c;
    text-decoration: underline;
    text-decoration-color: rgba(0, 255, 0, 0.4);
}
.site-info a:hover {
    color: #c6ffc6;
    text-decoration-color: #c6ffc6;
}
.legal-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
}
.legal-nav a {
    color: #9f9;
    text-decoration: none;
    text-shadow: 0 0 4px #0f0;
}
.legal-nav a:hover {
    color: #ffff66;
    text-shadow: 0 0 5px #ff0;
}
.legal-sep {
    color: #484;
}

/* =============================================================================
 * Cookie / ads consent banner (js/consent.js)
 * =============================================================================
 * Fixed-bottom modal-like strip. Visible only on first visit (or when the
 * player re-opens it via the footer "Cookie settings" link).
 */
.consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0, 10, 0, 0.96);
    border-top: 2px solid #0f0;
    box-shadow: 0 -4px 24px rgba(0, 255, 0, 0.25);
    color: #cfc;
    font-family: 'Share Tech Mono', monospace;
    padding: 0.9rem 1rem 1rem;
    animation: consent-slide-up 0.35s ease-out;
}
@keyframes consent-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.consent-inner {
    max-width: 60rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
@media (min-width: 760px) {
    .consent-inner {
        flex-direction: row;
        align-items: center;
        gap: 1.25rem;
    }
}
.consent-copy {
    flex: 1;
    min-width: 0;
}
.consent-title {
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    color: #ffff66;
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.4);
    margin-bottom: 0.25rem;
}
.consent-copy p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #b9e6b9;
}
.consent-copy a {
    color: #8cff8c;
    text-decoration: underline;
}
.consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}
.consent-btn {
    background: rgba(0, 40, 0, 0.6);
    color: #cfffcf;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    padding: 0.55rem 0.9rem;
    border-radius: 3px;
    cursor: pointer;
}
.consent-btn-reject {
    background: rgba(40, 0, 0, 0.5);
    border-color: #f55;
    box-shadow: 0 0 8px #f55, inset 0 0 8px #f55;
    color: #fcc;
}
.consent-btn-reject:hover {
    background: rgba(80, 0, 0, 0.6);
}

/* Footer "cookie settings" re-open link on the game page. */
.legal-nav .consent-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #9f9;
    text-shadow: 0 0 4px #0f0;
    cursor: pointer;
    letter-spacing: 0.15em;
}
.legal-nav .consent-link:hover {
    color: #ffff66;
    text-shadow: 0 0 5px #ff0;
}
