/* ==========================================================================
   FOXHOLE SOCIAL DARTS - PUBLIC HIGH SCORE DEMO (Phase 1)
   Minimal selectors extracted from the FHS Darts stylesheets
   (base.css, board.css, scoreboard.css, panels.css, animations.css,
   responsive.css). Only what this demo renders is included.
   ========================================================================== */

@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

:root {
    --seg-green: #007E72;
    --seg-red: #C9252C;
    --seg-dark: #3A3A3A;
    --seg-light: #F1D5A2;
    --seg-sb: #3A3A3A;
    --seg-db: #C9252C;
    --seg-wires: #000000;
    --seg-ring: #3A3A3A;
    --seg-numbersfill: #ffffff;
    --seg-numbersstroke: #000000;
    --outer-bg: #0B0F14;
    --scoreboard-width: clamp(200px, 22vw, 420px);
}

/* ---------- Global ---------- */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
body {
    background: var(--outer-bg);
    font-family: Arial, sans-serif;
    color: #fff;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
button { font-family: Arial, sans-serif; }

/* ---------- Board segment colors (base.css) ---------- */
.seg-green { fill: var(--seg-green); }
.seg-red   { fill: var(--seg-red); }
.seg-dark  { fill: var(--seg-dark); }
.seg-light { fill: var(--seg-light); }
.seg-wires {
    fill: var(--seg-wires);
    filter:
        drop-shadow(0  1.5px 1px   rgba(0,0,0,0.80))
        drop-shadow(0 -0.6px 0.6px rgba(160,160,160,0.28));
}
.seg-db    { fill: var(--seg-db); }
.seg-sb    { fill: var(--seg-sb); }
.seg-ring  { stroke: var(--seg-ring); }
.seg-numbers {
    fill: var(--seg-numbersfill);
    stroke: var(--seg-numbersstroke);
    pointer-events: none;
}
svg * {
    outline: none !important;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* ---------- Dartboard area (board.css) ---------- */
#dartboard-wrapper {
    position: fixed;
    top: 0;
    bottom: 0;
    left: var(--scoreboard-width);
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
#dartboard-host {
    filter:
        drop-shadow(0 6px 18px rgba(0,0,0,0.80))
        drop-shadow(0 2px 6px  rgba(0,0,0,0.60));
}
#dartboard {
    width: 89vmin;
    height: 89vmin;
    display: block;
    overflow: visible;
    transform: scale(0.975);
    filter:
        drop-shadow(0 24px 32px rgba(0,0,0,0.85))
        drop-shadow(0 8px 12px rgba(0,0,0,0.7))
        drop-shadow(0 2px 4px rgba(0,0,0,0.5))
        drop-shadow(-3px -3px 6px rgba(255,255,255,0.04));
}
#dartboard .segment {
    pointer-events: auto;
    cursor: pointer;
}
#board-texture {
    mix-blend-mode: multiply;
    opacity: 0.35;
    pointer-events: none;
}
.segment.hit-flash { animation: segFlash 140ms ease-out; }

/* LAST ROUND banner (FHS animations.css) */
#last-round-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.75);
    background: rgba(180, 0, 0, 0.93);
    color: #fff;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 5px;
    text-align: center;
    padding: 28px 52px;
    border-radius: 16px;
    border: 3px solid #ff5555;
    box-shadow: 0 0 50px rgba(255,0,0,0.7), 0 0 100px rgba(255,60,0,0.35);
    text-shadow: 0 0 18px rgba(255,200,0,1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 9998;
    white-space: nowrap;
}
#last-round-banner.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Badge earned popup (FHS animations.css #gsap-badge-popup) */
#gsap-badge-popup {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    background: linear-gradient(145deg, rgba(16,10,34,0.97), rgba(36,14,56,0.97));
    border: 3.5px solid rgba(255, 215, 0, 0.88);
    border-radius: 31.5px;
    padding: 42px 66.5px;
    text-align: center;
    z-index: 99998;
    pointer-events: none;
    min-width: 490px;
    max-width: 682.5px;
    box-sizing: content-box;
    opacity: 0;
    box-shadow:
        0 0 0 1.75px rgba(255,215,0,0.18),
        0 0 56px rgba(255,215,0,0.38),
        0 0 131.25px rgba(160,80,255,0.18),
        inset 0 0 49px rgba(255,215,0,0.06);
}
.gbp-glow {
    position: absolute;
    inset: -3.5px;
    border-radius: 31.5px;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,215,0,0.14) 0%, transparent 65%);
    pointer-events: none;
}
.gbp-icon {
    font-size: 5.95rem;
    line-height: 1;
    margin-bottom: 17.5px;
    display: block;
    filter: drop-shadow(0 0 14px rgba(255,215,0,0.95));
}
.gbp-label {
    font-size: 2.3625rem;
    font-weight: 900;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-shadow: 0 0 12px rgba(255,215,0,0.75);
    margin-bottom: 14px;
}
.gbp-desc {
    font-size: 1.54rem;
    color: rgba(255,255,255,0.72);
    font-style: italic;
    line-height: 1.4;
}

/* MISS board shake (FHS animations.css) */
.board-shake {
    animation: boardShake 0.5s cubic-bezier(.36,.07,.19,.97);
}
@keyframes boardShake {
    10%, 90% {
        transform: translate(-8px, 0);
    }
    20%, 80% {
        transform: translate(8px, 0);
    }
    30%, 50%, 70% {
        transform: translate(-12px, 0);
    }
    40%, 60% {
        transform: translate(12px, 0);
    }
}
@keyframes segFlash {
    0%   { filter: brightness(1); }
    50%  { filter: brightness(1.8); }
    100% { filter: brightness(1); }
}

/* ---------- Scoreboard (scoreboard.css) ---------- */
#scoreboard {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--scoreboard-width);
    height: 100vh;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: repeat(8, 1fr);
    gap: clamp(3px, 0.5vh, 6px);
    padding: clamp(3px, 0.5vh, 6px);
    overflow: visible;
    background: transparent;
    z-index: 9998;
    pointer-events: none;
}
.player {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: linear-gradient(180deg, #1e1e1e, #141414);
    padding: clamp(6px, 1vh, 12px) clamp(8px, 1.2vw, 16px);
    border-radius: 8px;
    border: 2px solid rgba(130, 145, 165, 0.48);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 2px 8px rgba(0,0,0,0.45), inset 0 0 8px rgba(255,255,255,0.03);
    box-sizing: border-box;
    position: relative;
    min-height: 0;
    height: 100%;
    overflow: visible;
}
.player.active {
    border: 3px solid rgba(0, 255, 80, 1);
    background: linear-gradient(180deg, rgba(0,255,80,0.25), rgba(0,200,60,0.18)),
                linear-gradient(180deg, #1e1e1e, #141414);
    box-shadow: 0 0 0 1px rgba(180,255,205,0.65), 0 0 18px rgba(0,255,80,0.95), 0 0 34px rgba(0,255,80,0.70), inset 0 0 14px rgba(0,255,80,0.24);
    animation: activePulse 0.6s ease-in-out 1;
    z-index: 9999;
}
@keyframes activePulse {
    0%   { box-shadow: 0 0 12px rgba(0,255,80,0.72), inset 0 0 12px rgba(0,255,80,0.20); }
    50%  { box-shadow: 0 0 28px rgba(0,255,80,1),    inset 0 0 24px rgba(0,255,80,0.45); }
    100% { box-shadow: 0 0 12px rgba(0,255,80,0.72), inset 0 0 12px rgba(0,255,80,0.20); }
}
.player.winner-highlight {
    border: 3px solid #ffffff;
    background: linear-gradient(135deg, rgba(255,215,0,0.35), rgba(255,165,0,0.22)),
                linear-gradient(180deg, #1e1e1e, #141414);
    box-shadow:
        0 0 0 2px rgba(255,215,0,0.85),
        0 0 22px rgba(255,215,0,0.75),
        0 0 50px rgba(255,215,0,0.4);
    animation: winner-pulse 1.0s ease-in-out infinite alternate;
    z-index: 9999;
}
@keyframes winner-pulse {
    from { box-shadow: 0 0 0 2px rgba(255,215,0,0.85), 0 0 14px rgba(255,215,0,0.6), 0 0 30px rgba(255,215,0,0.3); }
    to   { box-shadow: 0 0 0 2px rgba(255,215,0,0.85), 0 0 26px rgba(255,215,0,0.9), 0 0 60px rgba(255,215,0,0.5); }
}
.player-top {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    height: 100%;
    position: relative;
}
.player-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}
.player-name {
    font-size: clamp(21px, 3.6vh, 39px);
    font-weight: 700;
    color: white;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
}
.player-score {
    font-size: clamp(28px, 4.8vh, 56px);
    font-weight: 900;
    color: white;
    line-height: 1;
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
}
.score-animate { animation: scorePop 0.25s ease; }
@keyframes scorePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}
.player-place {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 6px;
    font-size: 12.5vh;
    line-height: 1;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.12);
    pointer-events: none;
    letter-spacing: 2px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

/* Throw dots */
.throw-dots {
    position: absolute;
    right: 4px;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    gap: 0;
    padding: 0;
    z-index: 2;
}
.dot {
    width: clamp(12px, 2vh, 22px);
    height: clamp(12px, 2vh, 22px);
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: 50%;
    background: black;
    box-shadow: 0 0 6px rgba(255,255,255,0.25);
    transition: background 0.2s ease;
}
.player.active .dot {
    background: yellow;
    box-shadow: 0 0 6px rgba(255,255,0,0.4);
}
.player.active .dot.used,
.dot.used {
    background: black;
    box-shadow: none;
    animation: dotPop 180ms ease-out;
}
@keyframes dotPop {
    0%   { transform: scale(1);   box-shadow: 0 0 0 rgba(255,255,0,0); }
    40%  { transform: scale(1.6); box-shadow: 0 0 12px rgba(255,255,0,0.9); }
    100% { transform: scale(1);   box-shadow: none; }
}
/* Sudden death: one dart per player, so only one dot is shown */
body.sudden-mode .throw-dots .dot:nth-child(n+2) { display: none; }

/* Round display HUD */
#round-display {
    position: fixed;
    top: 10px;
    right: 10px;
    width: max-content;
    min-width: 150px;
    max-width: calc(100vw - var(--scoreboard-width) - 20px);
    padding: 12px 32px;
    box-sizing: border-box;
    background: rgba(0,0,0,0.75);
    color: #fff;
    border-radius: 10px;
    font-size: 28.8px;
    font-weight: 900;
    text-shadow: 0 0 6px #00eaff;
    border: 2px solid #00eaff;
    box-shadow: 0 0 12px rgba(0,234,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
}
#round-display.round-sudden {
    background: rgba(255, 40, 40, 0.22);
    border-color: rgba(255, 40, 40, 0.85);
    color: #ff4d4d;
    text-shadow: 0 0 8px rgba(255,60,60,0.9);
    box-shadow: 0 0 14px rgba(255,40,40,0.6);
}

/* ---------- Last Darts (panels.css, approved 26px / 28px) ---------- */
.last-darts-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    max-width: 0;
    visibility: hidden;
    display: block;
    box-sizing: border-box;
    white-space: nowrap;
    text-align: left;
    z-index: 900;
    pointer-events: none;
}
.last-darts-panel.positioned { visibility: visible; }
.last-darts-label,
.last-darts-value { -webkit-text-stroke: 0; }
.last-darts-label {
    display: block;
    max-width: 100%;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #7ffcff;
    text-shadow: 0 0 8px rgba(0, 234, 255, 0.75);
    margin-bottom: 4px;
    white-space: nowrap;
}
.last-darts-value {
    display: block;
    max-width: 100%;
    min-height: 1.15em;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.3px;
    color: #ffffff;
    text-shadow:
        0 0 8px rgba(0, 234, 255, 0.85),
        0 0 2px rgba(0, 0, 0, 0.85);
    white-space: nowrap;
}
.last-darts-value.pop { animation: lastDartsPop 180ms ease-out; }
@keyframes lastDartsPop {
    from { transform: scale(0.94); opacity: 0.65; }
    to   { transform: scale(1);    opacity: 1; }
}

/* ---------- Lower-right controls (panels.css / responsive.css) ---------- */
#cornerControls {
    position: fixed;
    right: 6px;
    bottom: 6px;
    width: 124px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    z-index: 100000;
    pointer-events: auto;
}
#cornerControls .corner-stack-btn {
    width: 100%;
    box-sizing: border-box;
    min-height: 52px;
    margin: 0;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
    white-space: normal;
    cursor: pointer;
}
#options-btn {
    background: rgba(20, 30, 40, 0.82);
    color: rgba(200, 220, 255, 0.85);
    border: 1px solid rgba(255,255,255,0.25);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: background 0.15s, color 0.15s;
}
#options-btn:active {
    background: rgba(50, 70, 100, 0.95);
    color: #fff;
}
#restart-btn {
    margin-top: 1px;
    min-height: 79px;
    font-family: 'Orbitron', Arial, sans-serif;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 15px 20px;
    background: linear-gradient(160deg, #0a2a1a 0%, #0d3d22 60%, #0a2a1a 100%);
    color: #00ff99;
    border: 2px solid #00ff99;
    box-shadow:
        0 0 10px rgba(0,255,153,0.5),
        0 0 24px rgba(0,255,153,0.25),
        inset 0 0 12px rgba(0,255,153,0.08);
    text-shadow: 0 0 8px rgba(0,255,153,0.9);
    transition: box-shadow 0.2s ease, transform 0.1s ease;
}
#restart-btn:active {
    box-shadow:
        0 0 18px rgba(0,255,153,0.85),
        0 0 40px rgba(0,255,153,0.4),
        inset 0 0 18px rgba(0,255,153,0.18);
    transform: scale(1.03);
}

/* ---------- Hit float (animations.css) ---------- */
.hit-float {
    position: fixed;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    pointer-events: none;
    z-index: 99999;
    animation: hitFloatUp 650ms ease-out forwards;
    text-shadow: 0 0 12px rgba(255,255,255,0.8), 0 2px 10px rgba(0,0,0,0.65);
}
@keyframes hitFloatUp {
    0%   { opacity: 0; transform: translate(-50%, -30%) scale(0.85); }
    20%  { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    100% { opacity: 0; transform: translate(-50%, -90%) scale(1); }
}

/* ---------- Toast ---------- */
#toast {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    width: max-content;
    max-width: 90vw;
    padding: 18px 28px;
    background: rgba(0,0,0,0.85);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 10px;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 10px #ff0000;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 9999999;
}
#toast.show { opacity: 1; }

/* ---------- Sudden death (animations.css) ---------- */
body.sudden-mode::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(120, 0, 0, 0.25);
    pointer-events: none;
    z-index: 5;
    animation: suddenPulse 2s ease-in-out infinite;
}
@keyframes suddenPulse {
    0%   { background: rgba(120, 0, 0, 0.20); }
    50%  { background: rgba(160, 0, 0, 0.35); }
    100% { background: rgba(120, 0, 0, 0.20); }
}
body.sudden-mode #dartboard { animation: boardBeat 1.5s ease-in-out infinite; }
@keyframes boardBeat {
    0%, 100% { transform: scale(0.975); }
    50%      { transform: scale(0.99); }
}

/* ---------- Winner screen (animations.css / panels.css) ---------- */
#winner-dim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    z-index: 9;
    pointer-events: none;
}
#winner-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: var(--scoreboard-width);
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 99999;
    animation: fadeIn 1s ease forwards;
}
.winner-content {
    text-align: center;
    color: white;
    animation: popIn 0.8s ease forwards;
}
.winner-game-label {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #fff;
    text-shadow: 0 0 20px #ffdd55, 0 0 40px #ffaa00;
    margin: 0 0 4px;
}
.winner-title {
    font-size: 4rem;
    text-shadow: 0 0 20px #ffdd55, 0 0 40px #ffaa00;
    margin: 0 0 20px;
}
.winner-name {
    font-size: 3rem;
    text-shadow: 0 0 20px #00eaff, 0 0 40px #0099ff;
    margin: 0 0 10px;
}
.winner-score {
    font-size: 2rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}
.winner-sd {
    font-size: 1.5rem;
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255,60,60,0.8);
    margin: 8px 0 0;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
    0%   { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

/* ==========================================================================
   PHASE 2A - DEMO OPTIONS (BOARDS / WALLS / THEMES)
   Extracted from FHS options-modal.css, animations.css (themes) and
   panels.css (walls / board tiles). Only what the demo Options uses.
   ========================================================================== */
@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Board outer ring follows --seg-ring (FHS responsive.css) */
#outer-background-ring { stroke: var(--seg-ring) !important; }

/* Wall: full background mode (the FHS default) */
body.wall-fullbg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ---------- Options shell ---------- */
.options-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(0, 0, 0, 0.72);
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.options-modal-backdrop.open { display: flex; }
.options-modal-card {
    width: min(1200px, 96vw);
    height: min(860px, 90vh);
    max-height: 92vh;
    overflow: hidden;
    background: linear-gradient(180deg, #14141f, #0b0b12);
    border: 2px solid #00eaff;
    border-radius: 14px;
    box-shadow: 0 0 24px rgba(0, 234, 255, 0.35), 0 12px 40px rgba(0, 0, 0, 0.6);
    box-sizing: border-box;
    padding: 14px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.options-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.options-modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #fff;
    text-shadow: 0 0 8px #00eaff;
}
.options-modal-close {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid #00eaff;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.options-modal-close::before,
.options-modal-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: #fff;
    box-shadow: 0 0 4px rgba(0, 234, 255, 0.8);
}
.options-modal-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.options-modal-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.options-modal-close:active {
    background: rgba(0, 234, 255, 0.18);
    border-color: #74e7ff;
}
.options-modal-body {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 14px;
}
.options-modal-nav {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    padding-right: 10px;
    border-right: 1px solid rgba(0, 234, 255, 0.25);
    box-sizing: border-box;
}
.options-nav-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #74e7ff;
    margin: 2px 4px 4px;
}
.options-nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.options-nav-item,
.options-return-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-align: left;
    padding: 12px 14px;
    min-height: 44px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 234, 255, 0.35);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.options-nav-item:active { background: rgba(0, 234, 255, 0.12); }
.options-nav-item.active {
    background: rgba(0, 234, 255, 0.22);
    border-color: #74e7ff;
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.45);
}
.options-return-btn {
    margin-top: auto;
    text-align: center;
    min-height: 52px;
    border: 2px solid #00eaff;
    color: #7ffcff;
    text-shadow: 0 0 6px rgba(0, 234, 255, 0.8);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.35);
}
.options-return-btn:active { background: rgba(0, 234, 255, 0.22); }
.options-modal-pane {
    flex: 1;
    min-width: 0;
    position: relative;
    overflow: hidden;
}
.options-pane-section {
    display: none;
    height: 100%;
    flex-direction: column;
    box-sizing: border-box;
}
.options-pane-section.active { display: flex; }

/* ---------- BOARDS (board tiles, panels.css) ---------- */
.demo-board-grid {
    flex: 1;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-content: start;
    overflow: hidden;
}
.board-tile {
    border-radius: 10px;
    border: 2px solid #333;
    cursor: pointer;
    background: #181818;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    color: inherit;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.board-tile-preview {
    width: 100%;
    aspect-ratio: 1;
    background: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
}
.mini-board-svgwrap {
    width: 100%;
    height: 100%;
    display: block;
}
.mini-board-svg {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.board-tile-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    background: #1e1e1e;
    border-top: 1px solid #2a2a2a;
    flex-shrink: 0;
}
.board-tile-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #ccc;
    text-transform: uppercase;
}
.board-tile.selected {
    border-color: #00eaff;
    box-shadow: 0 0 18px rgba(0,234,255,0.75);
}
.board-tile.selected .board-tile-name { color: #7ffcff; }

/* ---------- WALLS (wall tiles, panels.css) ---------- */
.demo-wall-list {
    flex: 1;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    align-content: start;
    overflow: hidden;
}
.wall-thumb {
    border-radius: 10px;
    border: 2px solid #333;
    cursor: pointer;
    background: #181818;
    display: flex;
    flex-direction: column;
    padding: 7px 7px 5px 7px;
    gap: 5px;
    color: inherit;
    font: inherit;
    min-width: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wall-thumb img {
    width: 100%;
    height: 155px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}
.wall-label {
    text-align: center;
    font-size: 10px;
    font-family: 'Orbitron', sans-serif;
    color: #777;
    letter-spacing: 0.5px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    padding-bottom: 1px;
}
.wall-thumb.selected {
    border-color: #00eaff;
    box-shadow: 0 0 18px rgba(0,234,255,0.75), inset 0 0 0 9999px rgba(0,234,255,0.04);
}
.wall-thumb.selected .wall-label { color: #7ffcff; }
.no-wall-thumb {
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 167px;
}
.no-wall-icon {
    font-size: 36px;
    color: #555;
    line-height: 1;
}

/* ---------- THEMES (animations.css) ---------- */
.theme-modal-content {
    background: #101826;
    border: 1px solid #2a3550;
    border-radius: 14px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    box-sizing: border-box;
}
#theme-league-tabs {
    display: flex;
    gap: 5px;
    padding: 0 18px 12px;
    border-bottom: 1px solid #1e2d47;
    flex-shrink: 0;
}
.theme-league-tab {
    flex: 1;
    padding: 6px 0;
    min-height: 38px;
    border-radius: 7px;
    border: 1px solid #2a3550;
    background: #0d1520;
    color: #7a90b0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.14s, color 0.14s, border-color 0.14s;
    font-family: inherit;
}
.theme-league-tab.active { background: #1a3060; border-color: #4a72c0; color: #e8f0ff; }
.theme-league-tab[data-league="classic"].active { background: #1a2a1a; border-color: #3a8040; color: #a0e0a8; }
/* Matches production's own per-league active colors exactly (animations.css)
   -- dormant in this demo today (these 3 tabs are locked, never selectable),
   kept so the rule set matches production as closely as practical. */
.theme-league-tab[data-league="nba"].active { background: #2a1a10; border-color: #c05820; color: #f0c0a0; }
.theme-league-tab[data-league="pl"].active   { background: #0e2030; border-color: #3870c0; color: #a0c8f0; }
.theme-league-tab[data-league="d1"].active   { background: #1a1a2a; border-color: #8060c0; color: #d0b8ff; }
/* Locked tabs (full-application-only leagues): same tab, dimmed, with a
   small lock icon ahead of the real production label -- part of the normal
   tab row, not a separate advertising badge. Never gets .active (its click
   handler never calls renderThemeTab()), and :hover/:active are
   deliberately NOT overridden to a "live" look, since nothing happens on
   click. */
.theme-league-tab-locked {
    opacity: 0.55;
    cursor: default;
}
.theme-league-tab-locked:hover { background: #0d1520; color: #7a90b0; }
.theme-league-tab-lock {
    margin-right: 3px;
    font-size: 0.85em;
}
#theme-grid-wrap {
    flex: 1;
    min-height: 0;
    padding: 10px 14px 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#theme-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: calc((100% - 7 * 6px) / 8);
    gap: 6px;
    align-content: start;
}
.theme-card {
    background: #0d1520;
    border: 1px solid #1e2d47;
    border-radius: 8px;
    padding: 5px 6px 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    overflow: hidden;
    color: inherit;
    font: inherit;
    transition: border-color 0.14s, background 0.12s;
}
.theme-card.selected { border-color: #00c853; background: #0a2a14; }
.theme-card .team-name {
    font-size: 0.6rem;
    font-weight: 700;
    color: #b8c8e8;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.01em;
    line-height: 1.2;
}
.theme-card.selected .team-name { color: #5dff8a; }
.theme-card .card-swatches {
    flex: 1;
    display: flex;
    gap: 2px;
    min-height: 0;
}
.theme-card .card-swatch {
    flex: 1;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.1);
    min-width: 0;
    min-height: 0;
}
#theme-preview-bar {
    flex-shrink: 0;
    border-top: 1px solid #1e2d47;
    padding: 8px 16px;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0d1520;
}
#theme-preview-swatches { display: flex; gap: 4px; }
#theme-preview-swatches .card-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
}
#theme-preview-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #c8d6f0;
    flex: 1;
}

/* ==========================================================================
   DEMO USABILITY PASS (2026-10-12) -- welcome popup + Options pane
   descriptions + Leagues availability chips. Presentation only; reuses the
   existing dark Foxhole Social palette/fonts already defined above (Orbitron,
   #00eaff cyan accent, the winner-screen popIn keyframe) rather than
   introducing a new visual language.
   ========================================================================== */

/* ---------- Welcome popup (shown fresh on every page load/refresh) ------ */
.welcome-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.welcome-modal-card {
    width: min(520px, 94vw);
    max-height: 92vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #14141f, #0b0b12);
    border: 2px solid #00eaff;
    border-radius: 14px;
    box-shadow: 0 0 24px rgba(0, 234, 255, 0.35), 0 12px 40px rgba(0, 0, 0, 0.6);
    box-sizing: border-box;
    padding: 28px 26px 24px;
    text-align: center;
    color: #fff;
    font-family: Arial, sans-serif;
    animation: popIn 0.4s ease forwards;
}
.welcome-modal-kicker {
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.22em;
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255, 60, 60, 0.7);
    margin-bottom: 6px;
}
.welcome-modal-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #fff;
    text-shadow: 0 0 14px #00eaff;
    margin-bottom: 18px;
}
.welcome-modal-greeting {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
}
.welcome-modal-instructions {
    font-size: 14.5px;
    line-height: 1.5;
    color: #cfe9ff;
    margin: 0 0 22px;
}
.welcome-modal-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #0b0b12;
    background: linear-gradient(180deg, #00eaff, #00a8c0);
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(0, 234, 255, 0.5);
    transition: transform 0.12s, box-shadow 0.12s;
    box-sizing: border-box;
}
.welcome-modal-btn:active {
    transform: scale(0.97);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.7);
}
@media (max-width: 480px) {
    .welcome-modal-subtitle { font-size: 18px; }
    .welcome-modal-card { padding: 22px 18px 20px; }
}

/* ---------- Options pane headings + descriptions ------------------------ */
.options-pane-heading {
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #fff;
    text-shadow: 0 0 6px rgba(0, 234, 255, 0.5);
    margin: 14px 16px 4px;
    flex-shrink: 0;
}
.options-pane-desc {
    font-size: 12.5px;
    line-height: 1.45;
    color: #9fb3c8;
    margin: 0 16px 12px;
    flex-shrink: 0;
}
