/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    /* Repo Blue dark variant base with Christmas night feel */
    background: radial-gradient(circle at center, #2462a7 0%, #0f2b4d 40%, #05101f 100%);
    background-size: 200% 200%;
    animation: aurora 20s ease infinite;
    color: #fff;
    min-height: 100vh;
    position: relative;
}

@keyframes aurora {
    0% { background-position: 50% 50%; }
    50% { background-position: 50% 60%; }
    100% { background-position: 50% 50%; }
}

/* Twinkling Stars */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0;
    animation: twinkle 4s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.1); }
}

/* Subtle texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(238, 121, 1, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 80% 80%, rgba(36, 98, 167, 0.15) 0%, transparent 20%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Elegant Snowflakes Animation */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    animation: fall linear infinite;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
}

.snowflake:nth-child(1) { left: 5%; animation-duration: 15s; animation-delay: 0s; font-size: 2.5rem; opacity: 0.8; }
.snowflake:nth-child(2) { left: 15%; animation-duration: 18s; animation-delay: 1s; font-size: 1.8rem; opacity: 0.7; }
.snowflake:nth-child(3) { left: 25%; animation-duration: 12s; animation-delay: 2s; font-size: 3.2rem; opacity: 0.9; }
.snowflake:nth-child(4) { left: 35%; animation-duration: 20s; animation-delay: 0.5s; font-size: 2.0rem; opacity: 0.6; }
.snowflake:nth-child(5) { left: 45%; animation-duration: 14s; animation-delay: 3s; font-size: 2.8rem; opacity: 0.8; }
.snowflake:nth-child(6) { left: 55%; animation-duration: 16s; animation-delay: 1.5s; font-size: 1.5rem; opacity: 0.7; }
.snowflake:nth-child(7) { left: 65%; animation-duration: 19s; animation-delay: 2.5s; font-size: 3.5rem; opacity: 0.9; }
.snowflake:nth-child(8) { left: 75%; animation-duration: 13s; animation-delay: 0.8s; font-size: 2.2rem; opacity: 0.8; }
.snowflake:nth-child(9) { left: 85%; animation-duration: 21s; animation-delay: 3.5s; font-size: 1.9rem; opacity: 0.6; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 14s; animation-delay: 1.2s; font-size: 3.0rem; opacity: 0.8; }
.snowflake:nth-child(11) { left: 10%; animation-duration: 25s; animation-delay: 4s; font-size: 1.6rem; opacity: 0.7; }
.snowflake:nth-child(12) { left: 20%; animation-duration: 22s; animation-delay: 2.5s; font-size: 2.4rem; opacity: 0.8; }
.snowflake:nth-child(13) { left: 30%; animation-duration: 28s; animation-delay: 1.5s; font-size: 3.1rem; opacity: 0.9; }
.snowflake:nth-child(14) { left: 40%; animation-duration: 19s; animation-delay: 5s; font-size: 1.7rem; opacity: 0.6; }
.snowflake:nth-child(15) { left: 50%; animation-duration: 24s; animation-delay: 3.5s; font-size: 2.6rem; opacity: 0.8; }
.snowflake:nth-child(16) { left: 60%; animation-duration: 21s; animation-delay: 0.5s; font-size: 1.8rem; opacity: 0.7; }
.snowflake:nth-child(17) { left: 70%; animation-duration: 26s; animation-delay: 2s; font-size: 3.3rem; opacity: 0.9; }
.snowflake:nth-child(18) { left: 80%; animation-duration: 23s; animation-delay: 4.5s; font-size: 2.1rem; opacity: 0.7; }
.snowflake:nth-child(19) { left: 90%; animation-duration: 29s; animation-delay: 1s; font-size: 1.5rem; opacity: 0.6; }
.snowflake:nth-child(20) { left: 2%; animation-duration: 17s; animation-delay: 3s; font-size: 2.9rem; opacity: 0.8; }

@keyframes fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Prize Celebration - Falling Coins and Dollar Amounts */
.prize-celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 60;
    overflow: hidden;
}

.falling-coin {
    position: absolute;
    top: -50px;
    font-size: 2rem;
    animation: prizeFall linear forwards;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
}

.falling-amount {
    position: absolute;
    top: -50px;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.8);
    animation: prizeFall linear forwards;
}

@keyframes prizeFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Background Trees */
.background-trees {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1; /* Behind app-container (2) but above stars (0) */
}

.tree {
    position: absolute;
    bottom: 120px; /* Just peeking over the control deck */
    font-size: 12rem;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.8));
    opacity: 0.9;
    transform-origin: bottom center;
}

.tree-left-1 {
    left: 2%;
    transform: scale(1.2) rotate(-5deg);
    z-index: 2;
}

.tree-left-2 {
    left: 12%;
    transform: scale(0.9) rotate(2deg);
    bottom: 140px;
    opacity: 0.7;
    z-index: 1;
    filter: blur(1px) drop-shadow(0 0 20px rgba(0,0,0,0.8));
}

.tree-right-1 {
    right: 2%;
    transform: scale(1.2) rotate(5deg);
    z-index: 2;
}

.tree-right-2 {
    right: 12%;
    transform: scale(0.9) rotate(-2deg);
    bottom: 140px;
    opacity: 0.7;
    z-index: 1;
    filter: blur(1px) drop-shadow(0 0 20px rgba(0,0,0,0.8));
}

/* Spotlight Effect */
.spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Lighter spotlight that doesn't darken the bottom as much */
    background: radial-gradient(circle at 50% 40%, transparent 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 3;
}

/* Garland & Lights */
.garland-container {
    position: fixed;
    top: 80px; /* Moved closer to header */
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 4;
    pointer-events: none;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
}

.garland {
    width: 100%;
    height: 60px;
    background:
        radial-gradient(circle at 50% 0%, #0f3b1a 20%, transparent 25%) 0 0 / 60px 60px repeat-x,
        radial-gradient(circle at 50% 0%, #165b33 20%, transparent 25%) 30px 10px / 60px 60px repeat-x;
}

.garland-lights {
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
    margin-top: -15px;
}

.bulb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    animation: blink 2s infinite alternate;
    box-shadow: 0 0 10px currentColor;
}

.bulb:nth-child(4n+1) { background: #ff0000; color: #ff0000; animation-delay: 0s; }
.bulb:nth-child(4n+2) { background: #ffd700; color: #ffd700; animation-delay: 0.5s; }
.bulb:nth-child(4n+3) { background: #00ff00; color: #00ff00; animation-delay: 1s; }
.bulb:nth-child(4n+4) { background: #00bfff; color: #00bfff; animation-delay: 1.5s; }

@keyframes blink {
    0% { opacity: 0.4; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 20px currentColor; }
}

/* Wheel Glass Reflection */
.wheel-glass-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 20%, transparent 50%, rgba(255,255,255,0.1) 80%, rgba(255,255,255,0.3) 100%);
    pointer-events: none;
    z-index: 10;
    box-shadow: inset 0 0 30px rgba(255,255,255,0.2);
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    z-index: 2;
    padding: 0; /* Full width */
}

/* Header */
.header {
    text-align: center;
    padding: 15px 0;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.logo {
    display: inline-block;
    margin-right: 20px;
    vertical-align: middle;
}

.logo-img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    background: linear-gradient(to bottom, #f4e4bc, #d4af37 40%, #8b6914);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
    letter-spacing: 1px;
    font-weight: 700;
    display: inline-block;
    vertical-align: middle;
    text-transform: uppercase;
}

/* Main Stage - The Wheel */
.game-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-bottom: 100px; /* Space for control deck */
}

/* Wheel Container - CENTERED */
.wheel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Scale down slightly on smaller screens */
    transform: scale(0.9);
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.wheel-pointer svg {
    width: 60px;
    height: 70px;
}

/* Wheel Frame - Festive Candy Cane Style */
.wheel-outer {
    position: relative;
    /* 540px canvas + 40px padding + 30px border = 610px */
    width: 610px;
    height: 610px;
    border-radius: 50%;
    background:
        linear-gradient(#0f2b4d, #0f2b4d) padding-box,
        repeating-linear-gradient(45deg, #c41e3a 0, #c41e3a 20px, #f0f0f0 20px, #f0f0f0 40px) border-box;
    border: 15px solid transparent;
    padding: 20px;
    box-shadow:
        0 0 60px rgba(0, 0, 0, 0.8),
        0 0 100px rgba(212, 175, 55, 0.2),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.wheel-outer::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.5);
    pointer-events: none;
    z-index: 2;
}

#wheel-canvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 0, 0, 0.4);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 30% 30%, #f4e4bc, #d4af37 40%, #8b6914 80%, #5c4a0f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.5),
        inset 0 3px 10px rgba(255, 255, 255, 0.3),
        inset 0 -3px 10px rgba(0, 0, 0, 0.3);
    border: 4px solid #1a0f0a;
    z-index: 5;
}

.wheel-center span {
    font-size: 3rem;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
    /* animation: slowRotate 20s linear infinite; */
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Elegant Wheel Lights */
.wheel-lights {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    height: 650px;
    pointer-events: none;
}

.light {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    animation: elegantTwinkle 1.5s ease infinite alternate;
    transition: all 0.1s ease;
}

.light.flashing {
    width: 22px;
    height: 22px;
    filter: brightness(2) saturate(1.5);
    animation: none;
    opacity: 1;
    transform: scale(1.3);
}

.light:nth-child(3n) {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #cc0000 60%, #800000);
    box-shadow: 0 0 8px #ff0000, 0 0 15px rgba(255, 0, 0, 0.5);
}

.light:nth-child(3n+1) {
    background: radial-gradient(circle at 30% 30%, #90EE90, #228b22 60%, #006400);
    box-shadow: 0 0 8px #00ff00, 0 0 15px rgba(0, 255, 0, 0.5);
    animation-delay: 0.5s;
}

.light:nth-child(3n+2) {
    background: radial-gradient(circle at 30% 30%, #ffd700, #daa520 60%, #b8860b);
    box-shadow: 0 0 8px #ffd700, 0 0 15px rgba(255, 215, 0, 0.5);
    animation-delay: 1s;
}

.light:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); }
.light:nth-child(2) { top: 7%; left: 75%; }
.light:nth-child(3) { top: 25%; left: 93%; }
.light:nth-child(4) { top: 50%; left: 100%; transform: translateY(-50%); }
.light:nth-child(5) { top: 75%; left: 93%; }
.light:nth-child(6) { top: 93%; left: 75%; }
.light:nth-child(7) { top: 100%; left: 50%; transform: translateX(-50%); }
.light:nth-child(8) { top: 93%; left: 25%; }
.light:nth-child(9) { top: 75%; left: 7%; }
.light:nth-child(10) { top: 50%; left: 0; transform: translateY(-50%); }
.light:nth-child(11) { top: 25%; left: 7%; }
.light:nth-child(12) { top: 7%; left: 25%; }

@keyframes elegantTwinkle {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* Control Deck - Casino Table Style */
.control-deck {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 140px;
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6)),
        url("data:image/svg+xml,%3Csvg width='4' height='4' viewBox='0 0 4 4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3h1v1H1V3zm2-2h1v1H3V1z' fill='%23000000' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E"),
        #0f2b4d; /* Felt texture base */
    border-top: 8px solid #5c3a1e; /* Wood trim */
    box-shadow:
        inset 0 2px 10px rgba(0,0,0,0.8),
        0 -10px 50px rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 50;
}

.control-deck::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #5c3a1e, #8b5a2b, #5c3a1e);
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.deck-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255,255,255,0.05); /* Lighter background */
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.4); /* Brighter border */
    box-shadow:
        inset 0 0 20px rgba(255,255,255,0.05),
        0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    z-index: 55; /* Ensure above shadows */
}

.left-panel {
    width: 300px;
}

.center-panel {
    flex: 1;
    align-items: center;
}

.right-panel {
    width: 300px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.panel-label {
    font-size: 0.9rem;
    color: #ffd700; /* Brighter gold */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

#employee-select {
    width: 100%;
    padding: 10px 15px;
    font-size: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
}

.spins-info {
    margin-top: 5px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

#spins-left {
    color: #fff;
    font-weight: bold;
}

.spin-button {
    padding: 20px 60px;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Mountains of Christmas', cursive;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #c41e3a 60%, #8b0000);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 140px;
    height: 140px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    box-shadow:
        0 10px 0 #5c0000, /* 3D side */
        0 10px 20px rgba(0,0,0,0.6),
        inset 0 5px 10px rgba(255,255,255,0.4);
    position: relative;
    overflow: hidden;
    transform: translateY(-40px); /* Pop out of the deck */
    display: flex;
    align-items: center;
    justify-content: center;
}

.spin-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: buttonShine 3s infinite;
}

@keyframes buttonShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    20% { transform: translateX(100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.spin-button:hover:not(:disabled) {
    transform: translateY(-45px) scale(1.05);
    box-shadow:
        0 12px 0 #5c0000,
        0 15px 30px rgba(196, 30, 58, 0.6),
        inset 0 5px 10px rgba(255,255,255,0.5);
}

.spin-button:active:not(:disabled) {
    transform: translateY(-30px);
    box-shadow:
        0 2px 0 #5c0000,
        0 5px 10px rgba(0,0,0,0.4),
        inset 0 5px 20px rgba(0,0,0,0.2);
}

.spin-button:disabled {
    background: radial-gradient(circle at 30% 30%, #555, #333);
    color: #888;
    transform: translateY(0);
    box-shadow: 0 5px 0 #222, 0 5px 10px rgba(0,0,0,0.5);
    cursor: not-allowed;
    width: 120px;
    height: 120px;
    font-size: 2rem;
}

.stat-group {
    text-align: right;
}

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem; /* Larger */
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.stat-value.highlight {
    font-size: 2.8rem; /* Much larger */
    color: #ffd700; /* Brighter gold */
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.stat-value.celebrating {
    animation: celebratePop 0.5s ease;
    color: #00ff00;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
}

@keyframes celebratePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
}

.prize-ticker {
    display: none; /* Hidden for now, logic still works */
}

/* Modal overlay - dark background */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Modal - content only */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200; /* Above coins (101) */
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: all;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: linear-gradient(145deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 3px solid #d4af37;
    border-radius: 25px;
    padding: 60px 80px;
    text-align: center;
    max-width: 600px;
    position: relative;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 150px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalPop 0.5s ease;
    overflow: hidden;
}

.modal-logo {
    width: 200px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.3));
}

@keyframes modalPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #d4af37;
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 3px;
}

.winner-name {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 300;
}

.winner-total {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.winner-amount {
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    color: #d4af37;
    text-shadow:
        0 0 40px rgba(212, 175, 55, 0.6),
        0 0 80px rgba(212, 175, 55, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    animation: winnerPulse 1s ease infinite;
    font-weight: 500;
}

@keyframes winnerPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 40px rgba(212, 175, 55, 0.6), 0 0 80px rgba(212, 175, 55, 0.4), 0 4px 8px rgba(0, 0, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 60px rgba(212, 175, 55, 0.8), 0 0 120px rgba(212, 175, 55, 0.5), 0 4px 8px rgba(0, 0, 0, 0.5);
    }
}

.close-button {
    padding: 15px 40px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(180deg, #8b0000 0%, #5c0000 50%, #3d0000 100%);
    color: #fff;
    border: 2px solid #d4af37;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, #a00000 0%, #6c0000 50%, #4d0000 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Pointer wiggle - triggered on segment boundary crossing */
.wheel-pointer.wiggle {
    animation: pointerShake 0.15s ease;
}

@keyframes pointerShake {
    0%, 100% { transform: translateX(-50%) rotate(-8deg); }
    50% { transform: translateX(-50%) rotate(8deg); }
}

/* Coin Fountain */
.coin {
    position: fixed;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #d4af37 60%, #8b6914);
    border-radius: 50%;
    border: 2px solid #ffd700;
    box-shadow: inset 0 0 5px rgba(255,255,255,0.5), 0 4px 8px rgba(0,0,0,0.5);
    z-index: 101; /* Above modal background (100) but modal-content has relative z-index: 2 */
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin::before {
    content: '$';
    color: #8b6914;
    font-weight: bold;
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

/* Responsive Design */
@media (max-width: 1000px) {
    .control-deck {
        height: auto;
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .spin-button {
        transform: translateY(0);
    }

    .spin-button:hover:not(:disabled) {
        transform: translateY(-5px);
    }

    .game-stage {
        padding-bottom: 200px;
    }

    .wheel-outer {
        width: 400px;
        height: 400px;
    }

    #wheel-canvas {
        width: 330px;
        height: 330px;
    }

    .wheel-lights {
        width: 440px;
        height: 440px;
    }
}

/* Confetti & Fireworks */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.modal-content > *:not(.confetti-container) {
    position: relative;
    z-index: 2;
}

.confetti {
    position: absolute;
    top: -20px;
    animation-name: confettiFall;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(600px) rotate(720deg); opacity: 0; }
}

.firework-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation-name: fireworkPop;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

@keyframes fireworkPop {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}
