@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@700&family=Orbitron:wght@700&family=Russo+One&display=swap');

/* Add Eggcrate Font */
@font-face {
    font-family: 'Eggcrate';
    src: url('../assets/eggcrate.ttf') format('truetype');
}

/* Add FranklinCond-Ultra Font */
@font-face {
    font-family: 'FranklinCond-Ultra';
    src: url('../assets/franklincond-ultra.otf') format('opentype');
}

/* Add Interstate Font */
@font-face {
    font-family: 'Interstate';
    src: url('../assets/interstate.otf') format('opentype');
}

/* Add Microgamma Font */
@font-face {
    font-family: 'Microgamma';
    src: url('../assets/microgamma.otf') format('opentype');
}

/* Add ITC Caslon Font */
@font-face {
    font-family: 'ITC-Caslon';
    src: url('../assets/itc-caslon.ttf') format('truetype');
}

:root {
    --neon-yellow: #fff200;
    --neon-red: #ff0000;
    --neon-blue: #00f0ff;
    --neon-green: #39ff14;
    --neon-orange: #ff6600;
    --dark-bg: #1a0505;
    --board-border: #c49a00;
    --light-bulb-off: #554400;
    --light-bulb-on: #fff200;
}

* {
    box-sizing: border-box;
}

html {
    background-color: black;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--dark-bg);
    color: white;
    font-family: 'Chakra Petch', sans-serif;
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Intro Sequence */
#intro-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: black;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s ease;
}

#intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: opacity;
    /* Optimize for opacity changes */
}

/* Pause heavy animations when video is playing to reduce main-thread jank */
body.video-playing * {
    animation-play-state: paused !important;
}

/* Except the video overlay animations/video itself */
body.video-playing #intro-video-overlay,
body.video-playing #intro-video {
    animation-play-state: running !important;
}

@keyframes value-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.square.pop-in-value {
    animation: value-fade-in 0.3s ease-out forwards;
}

@keyframes logo-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.logo-build-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: logo-fade-in 1.5s ease both;
}

#contestants-section {
    transition: transform 0.8s ease, opacity 0.8s ease;
}

#contestants-section.pods-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

#main-game-container {
    transition: filter 0.5s ease, opacity 0.5s ease;
}

#main-game-container.dimmed {
    filter: blur(5px) brightness(0.3);
    pointer-events: none;
}

/* Leaderboard Pop-over */
/* Onboarding Slides */
.onboarding-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fade-in 0.5s ease;
}

.onboarding-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    height: 100%;
}

.onboarding-hero-img {
    height: 55%;
    max-width: 90%;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.onboarding-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.onboarding-info h1 {
    font-family: 'Russo One', sans-serif;
    font-size: 4.5rem;
    color: var(--neon-yellow);
    text-shadow: 4px 4px 0 #000;
    margin: 0;
}

.onboarding-info p {
    font-size: 1.8rem;
    color: #fff;
    line-height: 1.4;
    max-width: 1000px;
    margin: 0;
}

.url-badge {
    background: #000;
    color: var(--neon-yellow);
    font-family: 'Eggcrate', monospace;
    font-size: 4rem;
    padding: 15px 40px;
    border: 6px solid var(--neon-yellow);
    border-radius: 20px;
    display: inline-block;
    align-self: center;
}

/* Rules Slide */
.rules-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.rules-title {
    font-family: 'Russo One', sans-serif;
    font-size: 4rem;
    color: var(--neon-yellow);
    text-shadow: 4px 4px 0 #000;
    margin-bottom: 30px;
}

.rules-grid {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: center;
    flex: 1;
}

.rule-card {
    background: rgba(0, 0, 0, 0.7);
    border: 5px solid #8b7355;
    border-radius: 25px;
    padding: 30px;
    flex: 1;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.rule-step {
    background: var(--neon-red);
    color: white;
    font-family: 'Russo One', sans-serif;
    padding: 6px 20px;
    border-radius: 12px;
    font-size: 1.2rem;
}

.rule-card h2 {
    font-family: 'Russo One', sans-serif;
    color: var(--neon-yellow);
    margin: 0;
    font-size: 2rem;
}

.rule-card p {
    font-size: 1.7rem;
    line-height: 1.4;
    color: #eee;
    margin: 0;
}

.example-btn {
    font-family: 'Russo One', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
}

/* Red Circle Spin Button Replica */
.spin-btn-example {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #990000);
    border: 6px solid #660000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), inset 0 8px 15px rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 1rem;
    line-height: 1.2;
    padding: 10px;
}

/* Red Octagon Bank Button Replica */
.banked-btn-example {
    width: 110px;
    height: 110px;
    background: #cc0000;
    color: white;
    font-size: 0.85rem;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.rule-card img {
    height: 120px !important;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.5));
}

.example-stats-box-spins {
    width: 140px;
    height: 70px;
    background: #e6b800;
    /* Orange/Yellow for spins */
    border: 5px solid #ccc;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.example-stats-box-rank {
    width: 140px;
    height: 70px;
    background: #ff0000;
    /* Orange/Yellow for spins */
    border: 5px solid #ccc;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.leaderboard-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1200px;
    height: 85vh;
    background: #b69b75;
    /* Tan base */
    border: 10px solid #8b7355;
    border-radius: 30px;
    z-index: 5000;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.9);
    padding: 30px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: featured-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.leaderboard-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.leaderboard-header-mini {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 4px solid #8b7355;
    padding-bottom: 10px;
    flex-shrink: 0;
}

#leaderboard-title {
    font-family: 'Russo One', sans-serif;
    color: #ff0000;
    text-shadow: 2px 2px 0 #000;
    margin: 0;
    margin-right: auto;
    font-size: 2.5rem;
}

#audience-clock-container {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 150px;
    justify-content: flex-end;
}

.leaderboard-list {
    position: relative;
    width: 100%;
    height: calc(100% - 100px);
}

.main-game-page {
    overflow: hidden;
    position: relative;
}

.main-game-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
    transition: filter 0.8s ease;
}

.main-game-page.dim-bg::before {
    filter: brightness(0.2) blur(10px);
}

.main-game-page.dim-game::before {
    filter: brightness(0.5);
}

.main-game-page {
    background-color: transparent !important;
}

.main-game-page.bg-video-active::before {
    opacity: 0;
}

/* Called Screen */
.called-screen {
    width: 100%;
    max-width: 900px;
    background: radial-gradient(circle, #4a0000 0%, #1a0505 100%);
    border: 8px solid var(--neon-yellow);
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 242, 0, 0.3);
    margin: 20px 0;
}

.called-screen h1 {
    font-size: 4rem;
    color: var(--neon-yellow);
    margin-bottom: 20px;
    line-height: 1.1;
}

/* Typography */
h1,
h2,
h3 {
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

h1 {
    font-size: 2.25rem;
    color: var(--neon-yellow);
    letter-spacing: 3px;
    margin: 10px 0;
}

.big-board-title {
    font-size: 5rem;
    letter-spacing: 8px;
    margin: 30px 0;
}

/* Container */
.game-container {
    width: 100%;
    height: 100vh;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Welcome Screen */
#welcome-screen {
    text-align: center;
    padding: 20px;
}

.input-group {
    margin: 20px 0;
}

input {
    padding: 15px;
    font-size: 1.5rem;
    background: #333;
    border: 2px solid var(--neon-blue);
    color: white;
    border-radius: 5px;
    text-align: center;
    font-family: 'Russo One', sans-serif;
}

.big-button {
    padding: 15px 40px;
    font-size: 1rem;
    background: linear-gradient(to bottom, #ff3333, #aa0000);
    color: white;
    border: 4px solid white;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s, box-shadow 0.1s;
    text-shadow: 2px 2px 0px black;
}

.big-button:active {
    transform: translateY(4px);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.big-button:disabled {
    background: #555;
    cursor: not-allowed;
    border-color: #777;
}

/* The Big Board */
.board-wrapper {
    position: relative;
    padding: 15px;
    /* Enough room for lights */
    background: #4a0000;
    border-radius: 20px;
    box-shadow: inset 0 0 50px #000;
    margin: 0 auto 20px auto;
    width: fit-content;
    max-width: 100%;
}

/* Lights around the board */
.chaser-lights {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 10px dotted var(--light-bulb-off);
    border-radius: 20px;
    pointer-events: none;
    animation: chase 1s infinite linear;
}

@keyframes chase {
    0% {
        border-color: var(--light-bulb-off);
    }

    50% {
        border-color: var(--light-bulb-on);
    }

    100% {
        border-color: var(--light-bulb-off);
    }
}

.game-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(5, 1fr);
    width: min(90vw, 800px);
    aspect-ratio: 6/5;
    margin: 0 auto;
    gap: 2px;
    /* Small gap to prevent active square overlap */
}

.square {
    background: #333;
    /* Thick bronze/brown frame - reduced globally for audience view */
    border: 6px solid #3d2b1f;
    border-radius: 12px;
    aspect-ratio: 1/1;
    /* Force perfect squares */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'FranklinCond-Ultra', sans-serif;
    font-size: 1.8rem;
    font-weight: normal;
    letter-spacing: 1px;
    /* The font itself is bold/ultra */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
    position: relative;
    /* No overflow: hidden here so lights on ::after aren't clipped */
    transition: transform 0.1s;
    color: white;
    text-shadow: 2px 2px 1px black;
}

/* Inactive lights/studs on the frame */
.square::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 6px dotted rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    pointer-events: none;
    z-index: 5;
}

.square.square-has-spin {
    position: relative;
    padding: 0;
}

.square-has-spin .square-value {
    position: absolute;
    top: 8px;
    width: 100%;
}

.square-value {
    font-family: 'FranklinCond-Ultra', sans-serif;
    font-size: 1rem;
    line-height: 1;
}

.square.no-spin .square-value {
    font-size: 1.25rem;
    /* Larger when no spin is present */
}

.spin-plus,
.square-spin {
    font-family: 'ITC-Caslon', serif;
    letter-spacing: 0px;
    line-height: 1;
    position: absolute;
}

.spin-plus {
    font-size: 1.5rem;
    color: white;
    margin: 0;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -35%);
}

.square-spin {
    font-size: 0.6rem;
    bottom: 5px;
    white-space: nowrap;
    width: 100%;
}

/* Themed Square Backgrounds */
.bg-blue-coins {
    background-image: url('../assets/slides/blue_coins.png');
    background-size: cover;
    background-position: center;
}

.bg-green-coins {
    background-image: url('../assets/slides/green_coins.png');
    background-size: cover;
    background-position: center;
}

.bg-lightblue-coins {
    background-image: url('../assets/slides/lightblue_coins.png');
    background-size: cover;
    background-position: center;
}

.bg-orange-coins {
    background-image: url('../assets/slides/orange_coins.png');
    background-size: cover;
    background-position: center;
}

.bg-purple-coins {
    background-image: url('../assets/slides/purple_coins.png');
    background-size: cover;
    background-position: center;
}

.bg-red {
    background-image: url('../assets/slides/red.png');
    background-size: cover;
    background-position: center;
}

.bg-yellow {
    background-image: url('../assets/slides/yellow.png');
    background-size: cover;
    background-position: center;
}

.bg-green {
    background-image: url('../assets/slides/green.png');
    background-size: cover;
    background-position: center;
}

/* Standard fallback/legacy square colors */
.square-blue {
    background: radial-gradient(circle, #4da6ff 0%, #003366 100%);
}

.square-red {
    background: radial-gradient(circle, #ff6666 0%, #660000 100%);
}

.square-green {
    background: radial-gradient(circle, #66ff66 0%, #004d00 100%);
}

.square-orange {
    background: radial-gradient(circle, #ffcc66 0%, #804000 100%);
}

.square-gold {
    background: radial-gradient(circle, #ffff00 0%, #cc9900 100%);
}

/* Standard squares are colored by random classes in JS */

.square-whammy {
    background: radial-gradient(circle, #ffff00 0%, #cc9900 100%);
    color: red;
}

.square.active {
    border-color: #ff8c00;
    /* Bright Orange Frame */
    box-shadow: 0 0 30px #ff8c00, inset 0 0 20px #ff8c00;
    z-index: 10;
}

.square.active-pulse {
    border-color: #ff8c00;
    /* Bright Orange Frame */
    box-shadow: 0 0 30px #ff8c00, inset 0 0 20px #ff8c00;
    z-index: 10;
    animation: winning-pulse 0.4s 6 alternate ease-in-out forwards;
}

/* Lights on for active square */
.square.active::after,
.square.active-pulse::after,
.square.winner-flash::after {
    border-color: #ffffff;
    /* Bright White "lights" */
    filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 10px #fff);
    z-index: 11;
}

.square.winner-flash {
    z-index: 10;
    animation: winner-board-blink 4.0s step-start forwards;
}

.square.winner-flash::after {
    animation: winner-lights-blink 4.0s step-start forwards;
}

@keyframes winner-board-blink {

    0%,
    20%,
    40%,
    60%,
    80%,
    100% {
        /* ON State */
        border-color: #ff8c00;
        box-shadow: 0 0 30px #ff8c00, inset 0 0 20px #ff8c00;
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        /* OFF State */
        border-color: #3d2b1f;
        box-shadow: none;
    }
}

@keyframes winner-lights-blink {

    0%,
    20%,
    40%,
    60%,
    80%,
    100% {
        /* ON State */
        border-color: #ffffff;
        filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 10px #fff);
        opacity: 1;
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        /* OFF State */
        border-color: rgba(0, 0, 0, 0.4);
        filter: none;
        opacity: 1;
    }
}

@keyframes winning-pulse {
    from {
        transform: scale(1);
        box-shadow: 0 0 30px #ff8c00, inset 0 0 20px #ff8c00;
    }

    to {
        transform: scale(1.08);
        box-shadow: 0 0 50px #ff8c00, inset 0 0 30px #ff8c00, 0 0 70px rgba(255, 255, 255, 0.4);
    }
}

.contestant-pod-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.contestant-card {
    border: 2px solid #555;
    padding: 15px;
    background: #fdfdfd;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contestant-card.active-turn {
    border-color: var(--neon-yellow, #ffcc00);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
    background: #fffdf0;
    transform: translateY(-2px);
}

.contestant-card h4 {
    margin: -15px -15px 10px -15px;
    text-align: center;
    background: #333;
    color: white;
    padding: 12px;
    border-radius: 10px 10px 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contestant-card .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.contestant-card .admin-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.pass-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
}

.pass-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.pass-to-btn {
    background: #eef;
    border: 1px solid #ccd;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    color: #445;
}

.pass-to-btn:hover {
    background: #e0e0ff;
    border-color: #bbc;
}

.square img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.square-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5px;
    position: relative;
    /* Base for absolute positioned children like spins */
    box-sizing: border-box;
}

.square-content.has-spin {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Special Image Content for Board Squares */
.special-image-content {
    width: 100%;
    height: 100%;
    padding: 0 !important;
    overflow: hidden;
    display: block;
    /* Override flex for full bleed images */
}

.special-slide-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
}

/* Center Display */
.center-display {
    grid-column: 2 / span 4;
    grid-row: 2 / span 3;
    background: radial-gradient(ellipse at center, #ff0000 0%, #550000 100%);
    border: 5px solid #ffd700;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: inset 0 0 30px #000;
    overflow: hidden;
}

#logo-build-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* --- Scoreboard --- */
.scoreboard-area {
    margin-top: 25px;
    /* Space for the button */
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background-color: #d2b48c;
    /* Tan/Beige */
    padding: 10px;
    border-radius: 10px;
    border: 6px solid #8b7355;
    /* Physical frame look */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    flex-shrink: 1;
}

/* Red dome button */
.podium-button {
    width: 60px;
    height: 45px;
    background: radial-gradient(circle at center, #ff0000 0%, #aa0000 100%);
    border-radius: 50% 50% 10% 10% / 100% 100% 20% 20%;
    border: 4px solid #600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 5;
    cursor: pointer;
    margin-bottom: 0;
    /* Align with bottom of header */
    flex-shrink: 0;
    /* Prevent compression */
}

.podium-button::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 10px;
    background: #333;
    border-radius: 5px;
}

.name-bar {
    background: var(--neon-yellow);
    color: black;
    width: 100%;
    padding: 10px;
    text-align: center;
    font-family: 'Russo One', sans-serif;
    font-size: 1.25rem;
    text-transform: uppercase;
    border: 2px solid white;
    box-shadow: 0 0 10px var(--neon-yellow);
}

/* Whammy Counter Style */
.whammy-counter {
    display: flex;
    gap: 30px;
    margin: 5px 0;
    justify-content: center;
}

.whammy-slot {
    width: 30px;
    height: 40px;
    border: 3px solid #666;
    border-radius: 10%;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
}

.whammy-slot.active {
    background: var(--neon-yellow) url('../assets/whammy.png') center/contain no-repeat;
    border-color: #ff0000;
    animation: whammy-pop-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.score-row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.stats-row {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 0;
}

/* Common height for rows */
.score-box,
.stats-box,
.stats-center {
    height: 70px;
}

.score-box {
    width: 100%;
    background: #004d00;
    border: 4px solid #b0b0b0;
    /* Metallic frame look */
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 20px black;
}

.score-display {
    font-family: 'Eggcrate', monospace;
    font-size: 3rem;
    color: #fdfdfd;
    /* Amber/Yellow LEDs often used in PYL scoreboards */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    letter-spacing: 5px;
    line-height: 1;
    text-align: center;
    margin-top: 0;
}

.stats-box {
    flex: 1 1 0;
    /* Force equal width */
    border: 5px solid #ccc;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-center {
    flex: 1 1 0;
    /* Mathematical 1/3 width */
    background: #333;
    border-top: 5px solid #ccc;
    border-bottom: 5px solid #ccc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all 0.5s ease;
    gap: 4px;
}

.left-box {
    background: #e6b800;
    border-right: none;
}

.right-box {
    background: #b30000;
    border-left: none;
}

/* Question Mode Stats */
.question-mode .left-box .stats-value,
.question-mode .right-box .stats-value {
    opacity: 0;
    /* Hide individual values */
}

.question-mode .stats-center {
    background: #ff8c00 !important;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    /* Total Spins Orange */
    z-index: 5;
    flex: 1 1 0;
    /* Keep size stable */
}

.question-mode .stats-center .arrow-label {
    opacity: 0;
    /* Hide labels */
}

.question-mode .stats-center::after {
    content: attr(data-total-spins);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Eggcrate', monospace;
    font-size: 2.8rem;
    color: white;
    text-shadow: 0 0 5px white;
    z-index: 10;
}

.stats-value {
    font-family: 'Eggcrate', monospace;
    font-size: 2.5rem;
    color: white;
    text-shadow: 0 0 2px white;
    letter-spacing: 2px;
    line-height: 1;
    text-align: center;
    margin-top: 0;
}

.stats-center {
    display: flex;
    flex-direction: column;
    width: 100px;
    background: #888;
    border-top: 5px solid #ccc;
    border-bottom: 5px solid #ccc;
    justify-content: center;
    gap: 4px;
    padding: 4px 0;
}

.arrow-label {
    font-family: 'Interstate', sans-serif;
    font-size: 1rem;
    height: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0px;
}

.arrow-left {
    background: #e6b800;
    /* Golden yellow */
    color: black;
    clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 15% 100%, 0% 50%);
    padding-left: 10px;
}

.arrow-right {
    background: #b30000;
    /* Red */
    color: white;
    clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%);
    padding-right: 10px;
}

.blink-text {
    animation: blink 1s infinite;
    color: var(--neon-yellow);
    font-family: 'Russo One', sans-serif;
    font-size: 2rem;
    text-align: center;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.called-scoreboard {
    background-color: #e8dcc5;
    padding: 20px;
    border-radius: 15px;
    border: 4px solid #c0a060;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    width: 100% !important;
    max-width: 600px;
    margin: 20px auto;
}

@keyframes pulse {
    from {
        transform: scale(1);
        text-shadow: 0 0 20px var(--neon-yellow);
    }

    to {
        transform: scale(1.1);
        text-shadow: 0 0 50px var(--neon-yellow);
    }
}

/* Admin */
.admin-panel {
    background: white;
    color: black;
    padding: 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 1200px;
}

.admin-btn {
    padding: 10px 20px;
    cursor: pointer;
    background: #ddd;
    border: 1px solid #999;
    border-radius: 5px;
}

.admin-btn:hover {
    background: #ccc;
}

/* Whammy Animation */
.whammy-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
}

/* Logo Styles */
.welcome-logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px var(--neon-yellow));
}

.center-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px black);
}

/* --- Game Controls --- */
.bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex-shrink: 0;
    margin-top: 5px;
}

#game-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
    width: 100%;
}

#spin-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #990000);
    border: 8px solid #660000;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.6),
        inset 0 10px 20px rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, box-shadow 0.1s;
    flex-shrink: 0;
}

#spin-btn:active {
    transform: translateY(5px) scale(0.98);
    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.6),
        inset 0 10px 20px rgba(255, 255, 255, 0.4);
}

#bank-btn {
    height: 75px;
    background: #cc0000;
    color: white;
    font-size: .75rem;
    width: 75px;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    box-shadow: none;
    position: relative;
    flex-shrink: 0;
    padding: 10px;
}

#bank-btn:hover {
    background: #ff0000;
}

#bank-btn:disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

#spin-btn:disabled {
    background: radial-gradient(circle at 30% 30%, #666, #333);
    border-color: #444;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
    filter: grayscale(1);
}

/* --- Dynamic Leaderboard --- */
.leaderboard-outer-container {
    position: relative;
    padding: 10px;
    margin: 20px auto;
    width: 95%;
    /* Slightly larger for padding */
}

.leaderboard-wrapper-main {
    width: 100%;
    height: 950px;
    /* Space for 10 entries */
    position: relative;
    background: #b69b75;
    /* Tan background from image */
    padding: 20px;
    border: 12px solid #8b7355;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), inset 0 0 100px rgba(0, 0, 0, 0.2);
}

.leaderboard-list {
    position: relative;
    width: 100%;
    height: 100%;
}

.leaderboard-entry {
    position: absolute;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: top 1s ease-in-out, opacity 0.5s ease-in-out;
    padding: 0 20px;
    box-sizing: border-box;
}

.entry-rank {
    width: 70px;
    height: 70px;
    background: #ff0000;
    color: white;
    font-family: 'Eggcrate', monospace;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #333;
    flex-shrink: 0;
}

.entry-name-box {
    background: #ffff00;
    color: black;
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    min-width: 300px;
    flex-grow: 1;
    font-size: 2rem;
    font-family: 'Russo One', sans-serif;
    border: 3px solid #333;
    text-transform: uppercase;
}

.entry-score-box {
    background: #004d00;
    border: 5px solid #ccc;
    border-radius: 15px;
    height: 75px;
    width: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 15px black;
    flex-shrink: 0;
}

.entry-score {
    font-family: 'Eggcrate', monospace;
    font-size: 3rem;
    color: white;
    letter-spacing: 5px;
}

.entry-whammies {
    display: flex;
    gap: 8px;
    margin-left: 10px;
    /* Reduced margin */
    flex-shrink: 0;
    width: 165px;
    /* Fixed width for 4 whammies */
}

.leaderboard-whammy-slot {
    width: 35px;
    height: 35px;
    border: 2px solid #555;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 5px;
}

.leaderboard-whammy-slot.active {
    background: url('../assets/whammy.png') center/contain no-repeat;
    background-color: #ff0000;
    border-color: #fff;
}

.entry-spins {
    width: 70px;
    height: 70px;
    background: #e6b800;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    color: white;
    font-family: 'Eggcrate', monospace;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #ccc;
    flex-shrink: 0;
}

/* Status variants */
.leaderboard-entry.finished .entry-name-box {
    background: #00cc00;
}

.leaderboard-entry.called {
    z-index: 100 !important;
}

.leaderboard-entry.called .entry-name-box {
    background: var(--neon-yellow);
    box-shadow: 0 0 20px var(--neon-yellow);
    border-color: white;
    transform: scale(1.02);
    animation: called-pulse 1s infinite alternate;
}

.leaderboard-entry.called .entry-rank,
.leaderboard-entry.called .entry-spins {
    border-color: white;
    box-shadow: 0 0 15px var(--neon-yellow);
}

@keyframes called-pulse {
    from {
        box-shadow: 0 0 10px var(--neon-yellow);
    }

    to {
        box-shadow: 0 0 30px var(--neon-yellow), inset 0 0 10px white;
    }
}

@keyframes winning-pulse-heavy {
    from {
        transform: scale(1.05);
        box-shadow: 0 0 30px #fff, inset 0 0 20px #fff, 0 0 50px #00ff00;
    }

    to {
        transform: scale(1.15);
        box-shadow: 0 0 60px #fff, inset 0 0 40px #fff, 0 0 80px #00ff00;
    }
}

#interaction-overlay {
    transition: opacity 0.5s ease;
    text-align: center;
}

#interaction-overlay h1 {
    animation: blink 1s infinite;
}

/* Game Over / Called Screen Mobile */
.called-screen {
    padding: 10px 15px;
    border-radius: 20px;
    flex: 1;
    width: 100%;
    justify-content: center;
    margin: 0;
    min-height: 0;
    position: relative;
}

.called-screen h1 {
    font-size: 2rem;
}

.called-screen p {
    font-size: 1rem;
    margin: 5px 0;
}

.center-display {
    padding: 5px;
}

.center-logo {
    max-width: 100%;
    max-height: 100%;
}

/* --- Custom Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-box {
    background: radial-gradient(circle, #4a0000 0%, #1a0505 100%);
    border: 6px solid var(--neon-yellow);
    border-radius: 30px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 242, 0, 0.3), inset 0 0 30px rgba(0, 0, 0, 0.8);
    position: relative;
    animation: modal-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes featured-pop {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.modal-chaser {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border: 8px dotted var(--light-bulb-off);
    border-radius: 40px;
    pointer-events: none;
    animation: chase 0.8s infinite linear;
}

.modal-box h2 {
    color: var(--neon-yellow);
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 20px;
    letter-spacing: 2px;
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
}

.modal-box p {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: white;
    font-family: 'Chakra Petch', sans-serif;
    line-height: 1.4;
}

.modal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.modal-btn {
    min-width: 150px;
}

.cancel-btn {
    background: linear-gradient(to bottom, #666, #333) !important;
}

/* --- MAIN GAME EXPANSION --- */

/* Big Board Specifics */
#main-game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
    overflow: hidden;
    gap: clamp(20px, 6vh, 70px);
    /* Space for whammy cubes to pop up */
    padding-bottom: 0;
}

#big-board-section {
    flex: 1;
    min-height: 0;
    /* Allow board to scale down */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    background: transparent;
}

.board-frame {
    position: relative;
    padding: 15px;
    background: #4a0000;
    border-radius: 20px;
    box-shadow:
        0 0 50px rgba(255, 0, 0, 0.2),
        inset 0 0 50px black;
}

.big-board {
    /* Override size for full screen */
    width: 80vw;
    max-width: min(1200px, 85vw);
    aspect-ratio: 6/5;
    gap: 10px;
}

.big-board .square {
    font-size: 2rem;
    /* Larger text */
    border-width: 4px;
}

.big-board .square-value {
    font-size: 1.5rem;
}

.big-board .square.no-spin .square-value {
    font-size: 2rem;
}

/* Contestants Section at Bottom */
#contestants-section {
    width: 80vw;
    max-width: 1200px;
    margin: 0 auto;
    height: 22vh;
    /* Reverting to user specified height */
    background: #d2b48c;
    /* One long beige unit */
    border: 10px solid #8b7355;
    border-top: 15px solid #a68b6a;
    /* Ledge border */
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 40px 20px 40px;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}

.contestant-pod {
    width: 30%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

.pod-header {
    position: absolute;
    top: -60px;
    /* Flush with 60px cubes */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
}

.whammy-cube {
    width: 55px;
    height: 55px;
    background: #ffcc00;
    /* Physical cube yellow */
    border: 4px solid #8b4513;
    border-radius: 4px;
    background-size: 85%;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transform: translateY(20px);
    flex-shrink: 0;
    /* Prevent compression */
}

@keyframes whammy-pop-up {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.5);
    }

    70% {
        transform: translateY(-10px) scale(1.1);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.whammy-cube.active {
    opacity: 1;
    transform: translateY(0);
    background-image: url('../assets/whammy.png');
    animation: whammy-pop-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.pod-main {
    width: 100%;
    background: rgba(0, 0, 0, 0.15);
    /* Indented display panel */
    padding: 15px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Space between name, score, and stats */
    position: relative;
}

/* Highlight for Active Player */
.contestant-pod.active-turn .name-bar,
.contestant-pod.active-turn .score-box,
.contestant-pod.active-turn .spins-overlay {
    border-color: #ff0000 !important;
    box-shadow: 0 0 25px #ff0000;
}

.contestant-pod.active-turn .pod-main {
    background: rgba(255, 0, 0, 0.4) !important;
    /* Semi-transparent red background */
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
}

/* SPINS Overlay Bar - Now covers ONLY the score area */
.spins-overlay {
    position: absolute;
    top: 76px;
    /* Nudged for perfect score-row centering */
    left: 4%;
    width: 92%;
    /* Narrower for cleaner fit */
    height: 70px;
    /* Taller to fill the score area */
    background: #e0e0e0;
    /* Solid light grey card */
    border: 4px solid #b0b0b0;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.7);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: none;
    /* Removed shadow as requested */
}

.spins-overlay .spins-text {
    font-family: 'Microgamma', sans-serif;
    font-weight: 900;
    font-size: 3rem;
    color: #b00;
    /* Richer red */
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: scaleX(1.1);
    /* Microgamma often has a slightly wider feel */
}

.question-mode .spins-overlay {
    opacity: 1;
    transform: scale(1);
    /* Pop in effect */
}

/* Mode Transition Animations */
.pod-main>* {
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}

.question-mode .score-row {
    opacity: 0;
    filter: blur(5px);
    transform: scale(0.9);
}

/* Name stays clear as per user request */
.question-mode .name-bar {
    opacity: 1;
}

/* Blank Board Squares (Question Mode) */
.square.blank-square .square-content {
    display: none !important;
}

.contestant-pod.buzzed .pod-main {
    background: rgba(255, 0, 0, 0.4) !important;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
}

.contestant-pod.buzzed .spins-overlay,
.contestant-pod.buzzed .score-box,
.contestant-pod.buzzed .name-bar {
    border-color: #ff0000 !important;
    box-shadow: 0 0 25px #ff0000;
    animation: active-border-pulse-red 0.8s infinite alternate ease-in-out;
}

/* Flashing State for Spin Assignment - Sharp Blink */
.contestant-pod.flashing .spins-overlay,
.contestant-pod.flashing .score-box,
.contestant-pod.flashing .name-bar,
.contestant-pod.flashing .pod-main {
    border-color: #ff0000 !important;
    animation: buzzed-border-blink 0.4s infinite steps(2);
}

.contestant-pod.flashing .pod-main {
    animation: buzzed-bg-blink 0.4s infinite steps(2);
}

@keyframes buzzed-bg-blink {
    0% {
        background: rgba(255, 0, 0, 0.4);
        box-shadow: 0 0 40px rgba(255, 0, 0, 0.3);
    }

    100% {
        background: rgba(0, 0, 0, 0.15);
        box-shadow: none;
    }
}

@keyframes buzzed-border-blink {
    0% {
        box-shadow: 0 0 20px #ff0000;
        border-color: #ff0000;
        outline: 4px solid #ff0000;
    }

    100% {
        box-shadow: none;
        border-color: transparent;
        outline: none;
    }
}

@keyframes rapid-flash {
    from {
        background: rgba(255, 255, 255, 0.1);
        box-shadow: 0 0 10px white;
    }

    to {
        background: rgba(255, 255, 255, 0.6);
        box-shadow: 0 0 40px white;
    }
}

@keyframes buzzed-border-pulse {
    from {
        box-shadow: 0 0 10px #ff0000;
        border-color: #ff0000;
    }

    to {
        box-shadow: 0 0 30px #ff0000;
        border-color: #ff5555;
    }
}

/* Active Turn Highlight */
.contestant-pod.active-turn .score-box,
.contestant-pod.active-turn .spins-overlay,
.contestant-pod.active-turn .name-bar {
    animation: active-border-pulse-red 0.8s infinite alternate ease-in-out;
}

@keyframes active-border-pulse-red {
    from {
        box-shadow: 0 0 10px #ff0000;
    }

    to {
        box-shadow: 0 0 35px #ff0000;
    }
}

/* Winner Celebration */
.contestant-pod.winner-celebration {
    animation: winner-pod-bounce 0.5s infinite alternate ease-in-out;
    z-index: 100;
}

@keyframes winner-pod-bounce {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

/* Alerts moved below base classes */

/* Full Screen Scoreboard Page */
.scoreboard-page {
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.full-screen-scoreboard {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: black;
    overflow: hidden;
    position: relative;
}

/* Dedicated Scoreboard Background Alerts - Moved below base for priority */
.full-screen-scoreboard.active-turn-bg,
.full-screen-scoreboard.buzzed-bg,
.full-screen-scoreboard.winner-bg,
.full-screen-scoreboard.flashing-bg {
    background: #b30000;
    /* PYL Red */
    animation: background-pulse-red 1s infinite alternate ease-in-out;
    z-index: 1;
}

.full-screen-scoreboard.flashing-bg {
    animation: background-blink-red 0.4s infinite steps(2) !important;
}

@keyframes background-blink-red {
    0% {
        background: #b30000;
    }

    100% {
        background: #000000;
    }
}

@keyframes background-pulse-red {
    from {
        background: #600;
    }

    to {
        background: #b00;
    }
}

.full-screen-scoreboard .contestant-pod {
    transform: none;
    width: 90vw;
    height: 80vh;
    /* Keep it from being TOO wide on ultra-wide monitors if you want, or just let it rip */
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #d2b48c;
    border: 2vw solid #8b7355;
    border-top: 3vw solid #a68b6a;
    border-radius: 4vw;
    padding: 2vw;
    margin-top: 5vh;
}

.full-screen-scoreboard .pod-header {
    top: -16vh;
    gap: 2vw;
}

.full-screen-scoreboard .whammy-cube {
    width: 12vh;
    height: 16vh;
    border-width: 0.8vw;
    border-radius: 1vw;
}

.full-screen-scoreboard .pod-main {
    gap: 2vh;
    padding: 2vw;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.full-screen-scoreboard .name-bar {
    font-size: 5vw;
    padding: 1vw;
    border-width: 0.5vw;
}

.full-screen-scoreboard .score-box {
    height: 25vh;
    border-width: 1vw;
}

.full-screen-scoreboard .score-display {
    font-size: 18vh;
    letter-spacing: 2vw;
}

.full-screen-scoreboard .stats-row {
    height: 18vh;
}

.full-screen-scoreboard .stats-box,
.full-screen-scoreboard .stats-center {
    height: 100%;
    border-width: 0.8vw;
}

.full-screen-scoreboard .stats-value {
    font-size: 14vh;
}

.full-screen-scoreboard .arrow-label {
    font-size: 6vh;
}

.full-screen-scoreboard .spins-overlay {
    top: 49%;
    transform: translateY(-50%) scale(0.7);
    height: 25vh;
    width: 95%;
    left: 2.5%;
    border-width: 1vw;
}

.full-screen-scoreboard .question-mode .spins-overlay {
    transform: translateY(-50%) scale(1);
}

.full-screen-scoreboard .spins-text {
    font-size: 20vh;
}

.full-screen-scoreboard .stats-center::after {
    font-size: 14vh;
}

/* Board Slides */
.board-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.1s;
    border-radius: 12px;
    /* Curved internal part */
    overflow: hidden;
    /* Ensure content follows the curve */
}

.board-slide.active-slide {
    opacity: 1;
}

/* --- Main Game Board Specific Overrides --- */
#main-board-grid .square {
    /* Base Font Size Upgrade */
    font-size: 2.8rem;
    border-width: 12px;
    border-radius: 20px;
    /* Thick border override match */
    font-weight: bold;
}

#main-board-grid .square::after {
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-width: 12px;
    border-radius: 20px;
}

#main-board-grid .square-value {
    font-size: 4rem;
    /* Really pop the numbers */
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8);
    /* Better readability */
}

#main-board-grid .dollar-sign {
    font-size: 0.5em;
    /* Half height */
    vertical-align: top;
    position: relative;
    top: 0.2em;
    /* Fine-tune alignment to the top */
    margin-right: 0.05em;
}

#main-board-grid .square-special-text {
    font-size: 4rem;
    /* Massive impact text */
    line-height: 0.85;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8);
    transform: scaleX(0.9);
    /* Condensed look */
}

/* Three line text needs to be slightly smaller to fit vertically */
#main-board-grid .square-special-text.special-text-three-lines {
    font-size: 3rem;
}

#main-board-grid .square.active {
    /* Super bright active border */
    border-color: #ff8c00;
    box-shadow:
        0 0 30px #ff8c00,
        inset 0 0 20px #ff8c00,
        0 0 60px rgba(255, 255, 0, 0.4);
    /* Outer glow */
    z-index: 10;
    /* Pop above others */
    transform: scale(1.05);
    /* Slight pop out */
}

/* Specific text tweaks */
#main-board-grid .square-spin {
    font-size: 1.4rem;
    letter-spacing: 1px;

}

#main-board-grid .spin-plus {
    font-size: 3rem;
    letter-spacing: 2px;
    transform: translate(-50%, -10%);
}

#main-board-grid .prize-name {
    font-family: 'ITC-Caslon', serif;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Position cash higher on spin slides */
#main-board-grid .square-content.has-spin .square-value {
    position: absolute;
    top: 10%;
    width: 100%;
}

/* --- Responsive Adjustments --- */
@media screen and (max-height: 850px),
screen and (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
        margin: 5px 0;
    }

    .board-wrapper {
        padding: 12px;
        margin: 0 auto;
    }

    .chaser-lights {
        top: 2px;
        left: 2px;
        right: 2px;
        bottom: 2px;
        border-width: 8px;
        border-radius: 15px;
    }

    .game-board {
        width: 90vw;
        max-width: 320px;
        gap: 2px;
    }

    .square {
        border-width: 3px;
        min-width: 0;
        min-height: 0;
    }

    .square::after {
        border-width: 3px;
        top: -3px;
        left: -3px;
        right: -3px;
        bottom: -3px;
    }

    .square-value {
        font-size: 1.1rem;
    }

    .square.no-spin .square-value {
        font-size: 1.1rem;
    }

    .square-content.has-spin .square-value {
        position: absolute;
        top: 1px;
    }

    .square-special-text {
        font-size: 1.0rem !important;
        line-height: 0.9;
    }

    .spin-plus {
        transform: translate(-50%, -40%);
        font-size: 1rem;
    }

    .square-spin {
        font-size: 0.5rem;
        bottom: 2px;
        width: auto !important;
    }

    .center-display {
        padding: 5px;
        border-width: 3px;
    }

    .scoreboard-area {
        margin-top: 0;
        padding: 5px;
        max-width: 300px;
        border-width: 4px;
    }

    .whammy-counter {
        gap: 15px;
    }

    .whammy-slot {
        width: 20px;
        height: 28px;
    }

    .name-bar {
        padding: 5px;
        font-size: 1rem;
    }

    .score-box,
    .stats-box,
    .stats-center {
        height: 50px;
    }

    .score-display {
        font-size: 2rem;
    }

    .stats-value {
        font-size: 1.8rem;
    }

    .arrow-label {
        font-size: 0.7rem;
    }

    .stats-center {
        width: 70px;
    }

    .question-mode .stats-center::after {
        font-size: 1.8rem;
    }

    .bottom-content {
        margin-top: 0;
    }

    #game-controls {
        margin-top: 5px;
        gap: 10px;
    }

    #spin-btn {
        width: 80px;
        height: 80px;
        font-size: 0.8rem;
        border-width: 5px;
    }

    #bank-btn {
        width: 65px;
        height: 65px;
        font-size: 0.65rem;
        padding: 5px;
    }

    .blink-text {
        font-size: 1.2rem;
    }
}

@media screen and (max-height: 650px) {
    .game-board {
        max-width: 280px;
    }

    .scoreboard-area {
        max-width: 260px;
    }

    .score-box,
    .stats-box,
    .stats-center {
        height: 40px;
    }

    .score-display {
        font-size: 1.5rem;
    }
}


/* --- HD / 1080p Specific Scaling --- */
@media screen and (max-height: 1100px) and (min-height: 851px) {
    html {
        font-size: 14px;
    }

    #main-game-container {
        gap: 4vh;
    }

    .big-board {
        max-width: 900px;
        gap: 6px;
    }

    .big-board .square {
        border-width: 8px;
    }

    .big-board .square::after {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
        border-width: 8px;
    }

    #main-board-grid .square-value,
    #main-board-grid .square-special-text {
        font-size: 3.5rem;
    }

    #main-board-grid .square-special-text.special-text-three-lines {
        font-size: 2rem;
    }

    #contestants-section {
        max-width: 1000px;
        padding: 0 30px 10px 30px;
        height: 22vh;
        border-width: 6px;
    }

    .pod-main {
        padding: 10px;
        gap: 8px;
    }

    .score-box,
    .stats-box,
    .stats-center,
    .spins-overlay {
        height: 55px;
    }

    .score-display {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .stats-value {
        font-size: 1.8rem;
    }

    .whammy-cube {
        width: 45px;
        height: 45px;
    }

    .pod-header {
        top: -50px;
    }

    .name-bar {
        padding: 6px;
        font-size: 1.1rem;
    }

    .leaderboard-wrapper-main {
        height: 80vh;
        border-width: 8px;
    }

    .leaderboard-entry {
        height: 60px;
    }

    .entry-rank,
    .entry-spins,
    .entry-name-box {
        height: 50px;
        font-size: 1.5rem;
    }

    .entry-score-box {
        height: 55px;
        width: 250px;
    }

    .entry-score {
        font-size: 2.2rem;
    }
}

/* Clock Support */
#audience-clock-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

#audience-countdown-text {
    font-family: 'Eggcrate', monospace;
    font-size: 2.5rem;
    color: var(--neon-yellow);
}

#audience-stopwatch-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--neon-yellow);
    background: black;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#audience-stopwatch-hand {
    position: absolute;
    width: 2px;
    height: 30px;
    background: red;
    top: 10px;
    transform-origin: bottom center;
}

#audience-clock-text {
    font-family: 'Eggcrate', monospace;
    font-size: 2rem;
}

/* --- Interaction Overlay --- */
#interaction-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 20000;
    /* Highest z-index */
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.interaction-content {
    background: radial-gradient(circle, #4a0000 0%, #1a0505 100%);
    border: 5px solid var(--neon-yellow);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 242, 0, 0.3), inset 0 0 30px rgba(0, 0, 0, 0.8);
    animation: modal-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.interaction-content h1 {
    font-size: 2.5rem;
    color: var(--neon-yellow);
    margin-bottom: 30px;
    line-height: 1.2;
}

.interact-btn {
    font-size: 1.8rem;
    padding: 15px 50px;
    background: linear-gradient(to bottom, #00cc00, #006600);
    border-color: #fff;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
    animation: pulse 1s infinite alternate;
}

/* --- Player Device Main Game Status View --- */
/* --- Player Device Main Game Status View --- */
.main-game-status-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px;
    gap: 0;
    overflow: hidden;
    z-index: 1000;
}

.main-game-info {
    width: 90%;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid var(--neon-yellow);
    border-radius: 8px;
    padding: 8px 5px;
    text-align: center;
    font-family: 'Russo One', sans-serif;
    color: var(--neon-yellow);
    font-size: 0.9rem;
    box-shadow: 0 0 15px rgba(255, 242, 0, 0.4);
    margin: 5px 0 10px 0;
    flex-shrink: 0;
}

.vertical-pods-container {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Tight gap */
    margin-top: 10px;
    flex: 1;
    justify-content: flex-start;
    padding-top: 10px;
}

.vertical-pods-container .contestant-pod {
    width: 100%;
    background: #d2b48c;
    border: 3px solid #8b7355;
    border-top: 6px solid #a68b6a;
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
    margin: 0;
    position: relative;
    overflow: visible;
    transform: scale(0.85);
    /* Force fit */
    transform-origin: top center;
    margin-bottom: -25px;
    /* Pull pods closer */
}

.vertical-pods-container .pod-header {
    top: -28px;
    gap: 4px;
}

.vertical-pods-container .whammy-cube {
    width: 30px;
    height: 30px;
    border-width: 2px;
}

.vertical-pods-container .pod-main {
    padding: 4px;
    gap: 4px;
}

.vertical-pods-container .name-bar {
    padding: 2px;
    font-size: 1.5rem;
    border-width: 2px;
}

.vertical-pods-container .score-display {
    font-size: 2.6rem;
}

.vertical-pods-container .stats-value {
    font-size: 2.6rem;
}

.vertical-pods-container .score-box,
.vertical-pods-container .stats-box,
.vertical-pods-container .stats-center {
    height: 60px;
    border-width: 2px;
}

.vertical-pods-container .arrow-label {
    font-size: 1rem;
}

.vertical-pods-container .spins-overlay {
    top: 45px;
    height: 60px;
}

.vertical-pods-container .spins-text {
    font-size: 2.6rem;
}

/* Landed Prize Popup */
.landed-prize-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    background: #222;
    border: 8px solid var(--neon-yellow);
    border-radius: 15px;
    z-index: 6000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 80px rgba(0, 0, 0, 1);
    animation: featured-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.landed-prize-popup .square {
    width: 90% !important;
    height: 90% !important;
    border-width: 15px !important;
    position: relative !important;
    transform: none !important;
    opacity: 1 !important;
    font-size: 2rem;
}

.landed-prize-popup .square-value {
    font-size: 3.4rem !important;
}

.landed-prize-popup .prize-name {
    font-size: 1rem !important;
}

.landed-prize-popup .square-special-text {
    font-size: 3.5rem !important;
    line-height: 0.8 !important;
}

.landed-prize-popup .square-special-text.special-text-three-lines {
    font-size: 2.2rem !important;
    line-height: 0.85 !important;
}

.landed-prize-popup .square-has-spin .square-value {
    top: 15% !important;
}

.landed-prize-popup .square-spin {
    font-size: 1.5rem !important;
    bottom: 10% !important;
}

.landed-prize-popup .spin-plus {
    font-size: 2.5rem !important;
    transform: translate(-50%, 15%) !important;
}

/* Dotted lights for popup square */
.landed-prize-popup .square::after {
    top: -15px !important;
    left: -15px !important;
    right: -15px !important;
    bottom: -15px !important;
    border-radius: 20px !important;
    border: 15px dotted #ffffff !important;
    filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 10px #fff) !important;
    z-index: 11 !important;
}

/* Custom Modal Styling for Singleton Logic */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-box {
    background: #222;
    border: 5px solid var(--neon-yellow);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-box h2 {
    color: var(--neon-yellow);
    margin-top: 0;
}

.modal-box p {
    color: white;
    font-size: 1.2rem;
    margin: 20px 0;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.modal-btn {
    padding: 10px 20px;
    font-size: 1.2rem;
    cursor: pointer;
}

.cancel-btn {
    background: #555;
    color: white;
    border: none;
}

.prize-name {
    font-family: 'ITC-Caslon', serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    text-align: center;
    padding: 2px;
    color: white;
    text-shadow: 1px 1px 2px black;
}

 / *   F i x   f o r   7 2 0 p   d i s p l a y s :   I n c r e a s e   S P I N S   t e x t   s i z e   o n   s c o r e b o a r d s   * /   @ m e d i a   s c r e e n   a n d   ( m a x - h e i g h t :   7 6 8 p x )    {
               . f u l l - s c r e e n - s c o r e b o a r d   . s p i n s - t e x t    {
                           f o n t - s i z e :    3 0 v h ;
                   
    }

               . f u l l - s c r e e n - s c o r e b o a r d   . s p i n s - o v e r l a y    {
                           t r a n s f o r m :    t r a n s l a t e Y ( - 5 0 % )   s c a l e ( 0 . 9 ) ;
                   
    }

       
}

     