:root {
    --neon-blue:   #00f2ff;
    --neon-pink:   #ff00ff;
    --neon-yellow: #ffff00;
    --bg-dark:     #0a0a0f;
    --screen-w:    240px;
    --screen-h:    266px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    color: #ffffff;
    font-family: 'Outfit', -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    user-select: none;
}

/* Wrapper shrinks/grows to the scaled footprint so no scrollbar.
   overflow:hidden clips the full-size game-container that lives inside. */
#board-scaler {
    --scale: 1;
    position: relative;
    width:  calc(1200px * var(--scale));
    height: calc(1596px * var(--scale));
    overflow: hidden;
    flex-shrink: 0;
}

/* ── Main board canvas ──────────────────────────────────── */
#game-container {
    /* Absolutely positioned so its unscaled 1200×1596 layout
       doesn't bleed outside the scaler wrapper. */
    position: absolute;
    top: 0;
    left: 0;
    width: 1200px;
    height: 1596px;
    background-image: url('images/sample PYL background.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transform-origin: top left;
    transform: scale(var(--scale, 1));
}

/* ── Miniscreen tiles ─────────────────────────────────────
   Each is absolutely placed by inline style in HTML.
   The green rounded-square PNG is the background.
   Text is laid over the top, centred.
   ─────────────────────────────────────────────────────── */
.miniscreen {
    position: absolute;
    width: var(--screen-w);
    height: var(--screen-h);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Reward / whammy label */
.reward-name {
    display: block;
    width: 70%;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.2;
    color: #ffffff;
    text-align: center;
    text-transform: uppercase;
    text-shadow:
        0 1px 3px rgba(0,0,0,0.8),
        0 0 8px rgba(0,0,0,0.6);
    /* guard against very long names overflowing */
    overflow-wrap: break-word;
    hyphens: auto;
}

/* ── Selector overlay ─────────────────────────────────────
   Single element moved by JS; sits above all screens.
   The PNG has the glowing marquee-bulb border; centre is
   transparent so the screen beneath remains fully visible.
   ─────────────────────────────────────────────────────── */
#selector-overlay {
    position: absolute;
    width: var(--screen-w);
    height: var(--screen-h);
    background-image: url('images/selector.png');
    background-size: cover;
    background-position: center;
    pointer-events: none;
    z-index: 20;
    left: 0;
    top: 0;
    /* start hidden; JS will show it on first tick */
    opacity: 0;
    transition: opacity 0.05s;
}

/* ── Blink (final selection highlight) ───────────────────
   Applied to the selector overlay, not the miniscreen.
   ─────────────────────────────────────────────────────── */
#selector-overlay.blink {
    animation: rapid-blink 0.12s infinite;
    opacity: 1 !important;
}

@keyframes rapid-blink {
    0%   { filter: brightness(1.4); }
    50%  { filter: brightness(0.4); }
    100% { filter: brightness(1.4); }
}

/* ── CRT flicker removed — screens switch instantly on shuffle ── */
.flicker {
    /* no-op: kept so JS classList calls don't error */
}

/* ── Contestant portrait area ────────────────────────────*/
#contestant-area {
    position: absolute;
    left:   240px;
    top:    266px;
    width:  720px;
    height: 1064px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

#contestant-portrait {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}



/* Character is now loaded from user assets */

/* ── Result modal ─────────────────────────────────────── */
#selection-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 40px;
    text-align: center;
}

#modal-content {
    /* Removed box background, border, and glow to match theme */
    padding: 20px;
    max-width: 900px;
    width: min(95%, 900px);
}

#modal-name {
    font-size: clamp(2rem, 10vw, 4rem);
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    text-transform: uppercase;
    /* Rich blended shadows for readability */
    text-shadow: 
        0 4px 12px rgba(0,0,0,0.9),
        0 0 30px rgba(0,0,0,0.8);
    margin: 0 0 25px;
    line-height: 1.1;
    overflow-wrap: break-word;
    hyphens: auto;
}

#modal-desc {
    font-size: clamp(1.1rem, 4vw, 1.75rem);
    font-weight: 400; /* Normal weight as requested */
    line-height: 1.5;
    color: #ffffff;
    text-align: center;
    text-shadow: 
        0 2px 8px rgba(0,0,0,0.9),
        0 0 15px rgba(0,0,0,0.8);
    margin: 0;
}

.tap-to-restart {
    margin-top: 50px;
    font-size: 1rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    animation: breathe 2s infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 1; }
}
