:root {
    --neon-blue: #00f3ff;
    --neon-pink: #ff00de;
    --neon-purple: #9d00ff;
    --neon-green: #00ff41;
    --dark-bg: #0a0a12;
    --panel-bg: #151520;
    --gold: #ffd700;
    --reel-bg: linear-gradient(to bottom, #000 0%, #222 50%, #000 100%);
}

* {
    box-sizing: border-box;
    user-select: none;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-bg);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 50% 50%, #1a1a2e 0%, #000 100%);
    overflow: hidden;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(157, 0, 255, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(157, 0, 255, 0.2) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(500px) rotateX(60deg);
    animation: gridScroll 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 20%, rgba(255, 0, 222, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 243, 255, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse 50% 30% at 20% 70%, rgba(157, 0, 255, 0.06) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
    animation: ambientPulse 8s ease-in-out infinite;
}

@keyframes ambientPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Background effects: waves, sparks, floaters, confetti */
.bg-effects {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-effects::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    margin: -150px 0 0 -150px;
    background: radial-gradient(circle, rgba(255, 0, 222, 0.15) 0%, transparent 70%);
    animation: sparkBurst 4s ease-in-out infinite;
}

@keyframes sparkBurst {
    0%, 100% { transform: scale(0.8); opacity: 0.4; }
    50% { transform: scale(1.4); opacity: 0.7; }
}

.bg-wave {
    position: absolute;
    left: -10%;
    width: 120%;
    height: 120px;
    opacity: 0.12;
    filter: blur(40px);
}

.bg-wave-1 {
    top: 10%;
    background: linear-gradient(90deg, transparent, var(--neon-pink), var(--neon-blue), transparent);
    animation: waveMove1 12s ease-in-out infinite;
}

.bg-wave-2 {
    top: 45%;
    background: linear-gradient(90deg, transparent, var(--neon-purple), var(--neon-pink), transparent);
    animation: waveMove2 15s ease-in-out infinite;
}

.bg-wave-3 {
    bottom: 15%;
    background: linear-gradient(90deg, transparent, var(--neon-blue), var(--neon-purple), transparent);
    animation: waveMove3 14s ease-in-out infinite;
}

.bg-wave-4 {
    top: 80%;
    height: 80px;
    background: linear-gradient(90deg, var(--neon-green), transparent, var(--neon-pink), transparent);
    opacity: 0.08;
    animation: waveMove4 10s ease-in-out infinite;
}

@keyframes waveMove1 {
    0%, 100% { transform: translateX(0) scaleY(1); opacity: 0.12; }
    50% { transform: translateX(-5%) scaleY(1.2); opacity: 0.18; }
}

@keyframes waveMove2 {
    0%, 100% { transform: translateX(-3%) translateY(0); opacity: 0.1; }
    50% { transform: translateX(4%) translateY(-20px); opacity: 0.16; }
}

@keyframes waveMove3 {
    0%, 100% { transform: translateX(2%) scaleY(1); opacity: 0.11; }
    50% { transform: translateX(-4%) scaleY(1.15); opacity: 0.17; }
}

@keyframes waveMove4 {
    0%, 100% { transform: translateX(5%) scaleX(1); opacity: 0.08; }
    50% { transform: translateX(-8%) scaleX(1.1); opacity: 0.12; }
}

/* Sparks layer: moving dots – many scattered across background */
.bg-sparks {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 15% 25%, rgba(255, 0, 222, 0.8), transparent),
        radial-gradient(2px 2px at 85% 15%, rgba(0, 243, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 50% 80%, rgba(255, 215, 0, 0.6), transparent),
        radial-gradient(2px 2px at 25% 60%, rgba(157, 0, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 70% 45%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 40% 30%, rgba(0, 255, 65, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 90% 70%, rgba(255, 0, 222, 0.6), transparent),
        radial-gradient(2px 2px at 10% 90%, rgba(0, 243, 255, 0.5), transparent),
        radial-gradient(2px 2px at 5% 50%, rgba(255, 215, 0, 0.55), transparent),
        radial-gradient(1.5px 1.5px at 95% 35%, rgba(255, 0, 222, 0.5), transparent),
        radial-gradient(2px 2px at 35% 12%, rgba(0, 243, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 65% 92%, rgba(0, 255, 65, 0.5), transparent),
        radial-gradient(2px 2px at 18% 78%, rgba(157, 0, 255, 0.55), transparent),
        radial-gradient(1.5px 1.5px at 78% 58%, rgba(255, 255, 255, 0.45), transparent),
        radial-gradient(2px 2px at 48% 42%, rgba(255, 8, 68, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 92% 85%, rgba(255, 215, 0, 0.5), transparent),
        radial-gradient(2px 2px at 8% 18%, rgba(0, 243, 255, 0.55), transparent),
        radial-gradient(1.5px 1.5px at 55% 5%, rgba(255, 0, 222, 0.5), transparent),
        radial-gradient(2px 2px at 72% 28%, rgba(0, 255, 65, 0.45), transparent),
        radial-gradient(1.5px 1.5px at 28% 65%, rgba(255, 215, 0, 0.5), transparent);
    background-size: 100% 100%;
    animation: sparksDrift 20s linear infinite;
}

@keyframes sparksDrift {
    0% { background-position: 0% 0%, 100% 0%, 50% 100%, 0% 50%, 100% 50%, 50% 0%, 100% 100%, 0% 100%, 5% 50%, 95% 35%, 35% 12%, 65% 92%, 18% 78%, 78% 58%, 48% 42%, 92% 85%, 8% 18%, 55% 5%, 72% 28%, 28% 65%; }
    100% { background-position: 100% 100%, 0% 100%, 50% 0%, 100% 50%, 0% 50%, 50% 100%, 0% 0%, 100% 0%, 95% 50%, 5% 65%, 65% 88%, 35% 8%, 82% 22%, 22% 42%, 52% 58%, 8% 15%, 92% 82%, 45% 95%, 28% 72%, 78% 35%; }
}

/* Floating orbs */
.bg-floaters {
    position: absolute;
    inset: 0;
}

.floater {
    position: absolute;
    border-radius: 50%;
    filter: blur(25px);
    opacity: 0.2;
}

.floater.f1 { width: 80px; height: 80px; background: var(--neon-pink); top: 20%; left: 10%; animation: float1 18s ease-in-out infinite; }
.floater.f2 { width: 60px; height: 60px; background: var(--neon-blue); top: 60%; left: 80%; animation: float2 22s ease-in-out infinite; }
.floater.f3 { width: 100px; height: 100px; background: var(--neon-purple); top: 75%; left: 20%; animation: float3 20s ease-in-out infinite; }
.floater.f4 { width: 50px; height: 50px; background: var(--gold); top: 15%; left: 70%; animation: float4 16s ease-in-out infinite; }
.floater.f5 { width: 70px; height: 70px; background: var(--neon-green); bottom: 25%; right: 15%; animation: float5 19s ease-in-out infinite; }
.floater.f6 { width: 55px; height: 55px; background: var(--neon-pink); top: 40%; left: 5%; animation: float6 21s ease-in-out infinite; }
.floater.f7 { width: 90px; height: 90px; background: var(--neon-blue); top: 5%; right: 25%; animation: float7 17s ease-in-out infinite; }
.floater.f8 { width: 45px; height: 45px; background: var(--neon-purple); bottom: 15%; left: 50%; animation: float8 23s ease-in-out infinite; }

@keyframes float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(30px, -40px) scale(1.1); } 50% { transform: translate(-20px, 20px) scale(0.9); } 75% { transform: translate(40px, 30px) scale(1.05); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(-50px, 30px) scale(1.15); } 66% { transform: translate(20px, -50px) scale(0.95); } }
@keyframes float3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, -30px); } }
@keyframes float4 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-40px, -60px) scale(1.2); } }
@keyframes float5 { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-30px, -20px); } 75% { transform: translate(25px, 40px); } }
@keyframes float6 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(45px, 25px); } }
@keyframes float7 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-35px, 50px) scale(1.1); } }
@keyframes float8 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(50px, -25px); } 66% { transform: translate(-30px, 35px); } }

/* Confetti: falling / drifting pieces */
.bg-confetti {
    position: absolute;
    inset: 0;
}

.bg-confetti .c {
    position: absolute;
    top: -5%;
    width: 8px;
    height: 8px;
    border-radius: 1px;
    opacity: 0.5;
    animation: confettiFall 12s linear infinite;
}

.bg-confetti .c3, .bg-confetti .c8, .bg-confetti .c12, .bg-confetti .c19, .bg-confetti .c24, .bg-confetti .c30,
.bg-confetti .c33, .bg-confetti .c38, .bg-confetti .c44, .bg-confetti .c50 {
    border-radius: 50%;
    width: 6px;
    height: 6px;
}

.bg-confetti .c7, .bg-confetti .c15, .bg-confetti .c23, .bg-confetti .c27, .bg-confetti .c35, .bg-confetti .c41 {
    width: 6px;
    height: 10px;
}

.bg-confetti .c1 { left: 5%; animation-delay: 0s; background: #ff00de; }
.bg-confetti .c2 { left: 12%; animation-delay: -2s; background: #00f3ff; }
.bg-confetti .c3 { left: 20%; animation-delay: -4s; background: #ffd700; }
.bg-confetti .c4 { left: 28%; animation-delay: -1s; background: #9d00ff; }
.bg-confetti .c5 { left: 35%; animation-delay: -3s; background: #00ff41; }
.bg-confetti .c6 { left: 42%; animation-delay: -5s; background: #ff00de; }
.bg-confetti .c7 { left: 50%; animation-delay: -0.5s; background: #00f3ff; }
.bg-confetti .c8 { left: 58%; animation-delay: -2.5s; background: #ffd700; }
.bg-confetti .c9 { left: 65%; animation-delay: -4.5s; background: #ff0844; }
.bg-confetti .c10 { left: 72%; animation-delay: -1.5s; background: #9d00ff; }
.bg-confetti .c11 { left: 80%; animation-delay: -3.5s; background: #00ff41; }
.bg-confetti .c12 { left: 88%; animation-delay: -5.5s; background: #ff00de; }
.bg-confetti .c13 { left: 95%; animation-delay: -0.8s; background: #00f3ff; }
.bg-confetti .c14 { left: 8%; animation-delay: -6s; background: #ffd700; }
.bg-confetti .c15 { left: 18%; animation-delay: -2.2s; background: #9d00ff; }
.bg-confetti .c16 { left: 30%; animation-delay: -4.2s; background: #ff0844; }
.bg-confetti .c17 { left: 45%; animation-delay: -1.2s; background: #00f3ff; }
.bg-confetti .c18 { left: 55%; animation-delay: -3.2s; background: #ff00de; }
.bg-confetti .c19 { left: 68%; animation-delay: -5.2s; background: #ffd700; }
.bg-confetti .c20 { left: 78%; animation-delay: -0.3s; background: #00ff41; }
.bg-confetti .c21 { left: 3%; animation-delay: -7s; background: #9d00ff; }
.bg-confetti .c22 { left: 22%; animation-delay: -2.8s; background: #00f3ff; }
.bg-confetti .c23 { left: 38%; animation-delay: -4.8s; background: #ff00de; }
.bg-confetti .c24 { left: 52%; animation-delay: -1.8s; background: #ffd700; }
.bg-confetti .c25 { left: 62%; animation-delay: -3.8s; background: #00ff41; }
.bg-confetti .c26 { left: 75%; animation-delay: -5.8s; background: #9d00ff; }
.bg-confetti .c27 { left: 90%; animation-delay: -0.2s; background: #ff0844; }
.bg-confetti .c28 { left: 15%; animation-delay: -6.5s; background: #00f3ff; }
.bg-confetti .c29 { left: 48%; animation-delay: -2.1s; background: #ff00de; }
.bg-confetti .c30 { left: 85%; animation-delay: -4.1s; background: #ffd700; }
.bg-confetti .c31 { left: 7%; animation-delay: -1.2s; background: #ff0844; }
.bg-confetti .c32 { left: 24%; animation-delay: -5.2s; background: #00ff41; }
.bg-confetti .c33 { left: 41%; animation-delay: -3.3s; background: #9d00ff; }
.bg-confetti .c34 { left: 56%; animation-delay: -7s; background: #ffd700; }
.bg-confetti .c35 { left: 73%; animation-delay: -2.4s; background: #00f3ff; }
.bg-confetti .c36 { left: 91%; animation-delay: -4.6s; background: #ff00de; }
.bg-confetti .c37 { left: 11%; animation-delay: -6.1s; background: #ffd700; }
.bg-confetti .c38 { left: 29%; animation-delay: -0.9s; background: #00f3ff; }
.bg-confetti .c39 { left: 46%; animation-delay: -4.2s; background: #ff0844; }
.bg-confetti .c40 { left: 64%; animation-delay: -2.8s; background: #00ff41; }
.bg-confetti .c41 { left: 81%; animation-delay: -5.5s; background: #9d00ff; }
.bg-confetti .c42 { left: 4%; animation-delay: -3.7s; background: #ff00de; }
.bg-confetti .c43 { left: 37%; animation-delay: -1.5s; background: #ffd700; }
.bg-confetti .c44 { left: 53%; animation-delay: -6.3s; background: #00f3ff; }
.bg-confetti .c45 { left: 69%; animation-delay: -2s; background: #ff0844; }
.bg-confetti .c46 { left: 86%; animation-delay: -4.4s; background: #00ff41; }
.bg-confetti .c47 { left: 17%; animation-delay: -5.8s; background: #9d00ff; }
.bg-confetti .c48 { left: 61%; animation-delay: -0.6s; background: #ff00de; }
.bg-confetti .c49 { left: 94%; animation-delay: -3.2s; background: #ffd700; }
.bg-confetti .c50 { left: 33%; animation-delay: -5s; background: #00f3ff; }

@keyframes confettiFall {
    0% { transform: translateY(-10%) rotate(0deg); opacity: 0.5; }
    15% { opacity: 0.6; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0.3; }
}

/* Some confetti drift sideways */
.bg-confetti .c2, .bg-confetti .c5, .bg-confetti .c9, .bg-confetti .c14, .bg-confetti .c21, .bg-confetti .c28,
.bg-confetti .c32, .bg-confetti .c37, .bg-confetti .c43, .bg-confetti .c48 {
    animation-name: confettiDrift;
    animation-duration: 15s;
}

@keyframes confettiDrift {
    0% { transform: translate(-20px, -10%) rotate(0deg); opacity: 0.5; }
    100% { transform: translate(40px, 110vh) rotate(-360deg); opacity: 0.3; }
}

/* Flying Bgurk */
.bg-bgurk {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.bgurk-fly {
    position: absolute;
    font-size: 1.8rem;
    white-space: nowrap;
    color: rgba(255, 165, 0, 0.6);
    text-shadow: 0 0 15px rgba(255, 165, 0, 0.5);
    animation: bgurkFly 25s linear infinite;
}

.bgurk-fly.b1 { top: 12%; animation-delay: 0s; animation-duration: 28s; }
.bgurk-fly.b2 { top: 22%; animation-delay: -8s; animation-duration: 22s; font-size: 2.2rem; }
.bgurk-fly.b3 { top: 35%; animation-delay: -15s; animation-duration: 30s; }
.bgurk-fly.b4 { top: 48%; animation-delay: -5s; animation-duration: 25s; font-size: 2.5rem; }
.bgurk-fly.b5 { top: 58%; animation-delay: -20s; animation-duration: 26s; }
.bgurk-fly.b6 { top: 68%; animation-delay: -12s; animation-duration: 24s; font-size: 2rem; }
.bgurk-fly.b7 { top: 78%; animation-delay: -18s; animation-duration: 27s; }
.bgurk-fly.b8 { top: 8%; animation-delay: -3s; animation-duration: 32s; font-size: 1.6rem; }
.bgurk-fly.b9 { top: 28%; animation-delay: -11s; animation-duration: 23s; }
.bgurk-fly.b10 { top: 42%; animation-delay: -7s; animation-duration: 29s; font-size: 2.1rem; }
.bgurk-fly.b11 { top: 62%; animation-delay: -14s; animation-duration: 26s; }
.bgurk-fly.b12 { top: 82%; animation-delay: -9s; animation-duration: 27s; font-size: 1.9rem; }
.bgurk-fly.b13 { top: 92%; animation-delay: -19s; animation-duration: 24s; }

.bgurk-fly.alt {
    animation-name: bgurkFlyAlt;
}

/* Static bgurks scattered in background – expand/shrink only */
.bgurk-static {
    position: absolute;
    font-size: clamp(1.2rem, 2.5vw, 2.4rem);
    white-space: nowrap;
    color: rgba(255, 165, 0, 0.5);
    text-shadow: 0 0 12px rgba(255, 165, 0, 0.4);
    animation: bgurkPulse 2.5s ease-in-out infinite;
}
.bgurk-static.s1 { left: 8%; top: 15%; animation-delay: 0s; animation-duration: 2.2s; }
.bgurk-static.s2 { left: 78%; top: 20%; animation-delay: -0.5s; animation-duration: 3s; font-size: clamp(1rem, 2vw, 1.8rem); }
.bgurk-static.s3 { left: 15%; top: 75%; animation-delay: -1s; animation-duration: 2.8s; }
.bgurk-static.s4 { left: 82%; top: 70%; animation-delay: -0.3s; animation-duration: 2.4s; }
.bgurk-static.s5 { left: 45%; top: 8%; animation-delay: -1.2s; animation-duration: 2.6s; }
.bgurk-static.s6 { left: 52%; top: 88%; animation-delay: -0.8s; animation-duration: 2.3s; }

@keyframes bgurkPulse {
    0%, 100% { transform: scale(0.82); opacity: 0.45; }
    50% { transform: scale(1.18); opacity: 0.7; }
}

@keyframes bgurkFlyAlt {
    0% { transform: translateX(120%) scale(0.88); opacity: 0.5; }
    10% { transform: translateX(96%) scale(1.12); opacity: 0.7; }
    20% { transform: translateX(72%) scale(0.88); opacity: 0.7; }
    30% { transform: translateX(48%) scale(1.12); opacity: 0.7; }
    40% { transform: translateX(24%) scale(0.88); opacity: 0.7; }
    50% { transform: translateX(0) scale(1.12); opacity: 0.7; }
    60% { transform: translateX(-24%) scale(0.88); opacity: 0.7; }
    70% { transform: translateX(-48%) scale(1.12); opacity: 0.7; }
    80% { transform: translateX(-72%) scale(0.88); opacity: 0.7; }
    90% { transform: translateX(-96%) scale(1.12); opacity: 0.7; }
    100% { transform: translateX(-120%) scale(0.88); opacity: 0.5; }
}

@keyframes bgurkFly {
    0% { transform: translateX(-120%) scale(0.88); opacity: 0.5; }
    10% { transform: translateX(-96%) scale(1.12); opacity: 0.7; }
    20% { transform: translateX(-72%) scale(0.88); opacity: 0.7; }
    30% { transform: translateX(-48%) scale(1.12); opacity: 0.7; }
    40% { transform: translateX(-24%) scale(0.88); opacity: 0.7; }
    50% { transform: translateX(0) scale(1.12); opacity: 0.7; }
    60% { transform: translateX(24%) scale(0.88); opacity: 0.7; }
    70% { transform: translateX(48%) scale(1.12); opacity: 0.7; }
    80% { transform: translateX(72%) scale(0.88); opacity: 0.7; }
    90% { transform: translateX(96%) scale(1.12); opacity: 0.7; }
    100% { transform: translateX(120%) scale(0.88); opacity: 0.5; }
}

/* Aurora / extra gradient layer */
.bg-aurora {
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, transparent 0%, rgba(0, 255, 65, 0.03) 25%, transparent 50%, rgba(255, 0, 222, 0.03) 75%, transparent 100%);
    background-size: 200% 200%;
    animation: auroraShift 12s ease-in-out infinite;
}

@keyframes auroraShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes gridScroll {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 60px;
    }
}

#app {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Floating sparkles (CSS-only) – more dots around the UI */
#app::before {
    content: "";
    position: absolute;
    inset: -20px;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 0, 222, 0.6), transparent),
        radial-gradient(2px 2px at 80% 20%, rgba(0, 243, 255, 0.5), transparent),
        radial-gradient(2px 2px at 40% 80%, rgba(255, 215, 0, 0.4), transparent),
        radial-gradient(2px 2px at 60% 60%, rgba(157, 0, 255, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 10% 50%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 90% 70%, rgba(0, 255, 65, 0.4), transparent),
        radial-gradient(2px 2px at 15% 70%, rgba(255, 8, 68, 0.45), transparent),
        radial-gradient(1.5px 1.5px at 85% 45%, rgba(255, 215, 0, 0.45), transparent),
        radial-gradient(2px 2px at 50% 15%, rgba(0, 243, 255, 0.4), transparent),
        radial-gradient(1.5px 1.5px at 70% 85%, rgba(157, 0, 255, 0.45), transparent),
        radial-gradient(2px 2px at 32% 45%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1.5px 1.5px at 68% 55%, rgba(0, 255, 65, 0.4), transparent);
    background-size: 200% 200%;
    background-position: 0% 0%, 100% 100%, 50% 50%, 0% 100%, 100% 0%, 50% 0%, 15% 70%, 85% 45%, 50% 15%, 70% 85%, 32% 45%, 68% 55%;
    animation: sparkleFloat 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes sparkleFloat {
    0%, 100% { opacity: 0.6; background-position: 0% 0%, 100% 100%, 50% 50%, 0% 100%, 100% 0%, 50% 0%, 15% 70%, 85% 45%, 50% 15%, 70% 85%, 32% 45%, 68% 55%; }
    33% { opacity: 1; background-position: 100% 50%, 0% 50%, 80% 80%, 50% 0%, 0% 100%, 100% 50%, 85% 30%, 15% 55%, 50% 85%, 30% 15%, 68% 65%, 32% 35%; }
    66% { opacity: 0.8; background-position: 50% 100%, 50% 0%, 20% 20%, 100% 50%, 50% 50%, 0% 100%, 25% 80%, 75% 20%, 80% 50%, 20% 80%, 45% 25%, 55% 75%; }
}

.main-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Slot Machine Styling */
.slot-machine-container {
    background: var(--panel-bg);
    border: 4px solid var(--neon-purple);
    border-radius: 20px;
    padding: 30px;
    box-shadow:
        0 0 30px rgba(157, 0, 255, 0.3),
        0 0 60px rgba(157, 0, 255, 0.15),
        inset 0 0 50px rgba(0, 0, 0, 0.8);
    flex: 2;
    min-width: 350px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    animation: containerGlow 4s ease-in-out infinite;
}

@keyframes containerGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(157, 0, 255, 0.3), 0 0 60px rgba(157, 0, 255, 0.15), inset 0 0 50px rgba(0, 0, 0, 0.8); }
    50% { box-shadow: 0 0 40px rgba(157, 0, 255, 0.45), 0 0 80px rgba(157, 0, 255, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.8); }
}

/* Header */
.machine-header {
    position: relative;
    padding-bottom: 15px;
}

.machine-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-pink), var(--neon-blue), var(--neon-pink), transparent);
    box-shadow: 0 0 10px var(--neon-pink);
    opacity: 0.7;
}

.machine-header h1 {
    font-family: 'Orbitron', sans-serif;
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 2.5rem;
    color: #fff;
    text-shadow:
        0 0 5px #fff,
        0 0 10px var(--neon-pink),
        0 0 20px var(--neon-pink),
        0 0 40px rgba(255, 0, 222, 0.5);
    letter-spacing: 2px;
    animation: titleShimmer 3s ease-in-out infinite;
}

@keyframes titleShimmer {
    0%, 100% { text-shadow: 0 0 5px #fff, 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink), 0 0 40px rgba(255, 0, 222, 0.5); filter: brightness(1); }
    50% { text-shadow: 0 0 8px #fff, 0 0 18px var(--neon-pink), 0 0 35px var(--neon-pink), 0 0 55px rgba(255, 0, 222, 0.7); filter: brightness(1.08); }
}

/* Waving text: 50 krona i gangen */
.waving-text {
    display: block;
    text-align: center;
    margin: 0 0 12px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: var(--neon-cyan, #00f3ff);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
}

.waving-text span {
    display: inline-block;
    animation: letterWave 2s ease-in-out infinite;
}

.waving-text span:nth-child(1) { animation-delay: 0s; }
.waving-text span:nth-child(2) { animation-delay: 0.05s; }
.waving-text span:nth-child(3) { animation-delay: 0.1s; }
.waving-text span:nth-child(4) { animation-delay: 0.15s; }
.waving-text span:nth-child(5) { animation-delay: 0.2s; }
.waving-text span:nth-child(6) { animation-delay: 0.25s; }
.waving-text span:nth-child(7) { animation-delay: 0.3s; }
.waving-text span:nth-child(8) { animation-delay: 0.35s; }
.waving-text span:nth-child(9) { animation-delay: 0.4s; }
.waving-text span:nth-child(10) { animation-delay: 0.45s; }
.waving-text span:nth-child(11) { animation-delay: 0.5s; }
.waving-text span:nth-child(12) { animation-delay: 0.55s; }
.waving-text span:nth-child(13) { animation-delay: 0.6s; }
.waving-text span:nth-child(14) { animation-delay: 0.65s; }
.waving-text span:nth-child(15) { animation-delay: 0.7s; }
.waving-text span:nth-child(16) { animation-delay: 0.75s; }
.waving-text span:nth-child(17) { animation-delay: 0.8s; }

@keyframes letterWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* 3D Reels Area */
.reels-display {
    background: #000;
    border: 4px solid var(--neon-blue);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 25px;
    width: 100%;
    box-shadow: 0 0 20px var(--neon-blue), 0 0 40px rgba(0, 243, 255, 0.2), inset 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    animation: reelsBorderBreath 3s ease-in-out infinite;
}

.reels-display::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 243, 255, 0.03) 2px,
        rgba(0, 243, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 4;
}

.reels-display::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to bottom, rgba(0, 243, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 3;
}

.reel-window {
    position: relative;
}

.reel-window .light-sweep {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    pointer-events: none;
    z-index: 7;
    animation: lightSweep 6s ease-in-out infinite;
}

@keyframes lightSweep {
    0% { left: -50%; }
    100% { left: 150%; }
}

@keyframes reelsBorderBreath {
    0%, 100% { box-shadow: 0 0 20px var(--neon-blue), 0 0 40px rgba(0, 243, 255, 0.2), inset 0 0 30px rgba(0, 0, 0, 0.5); }
    50% { box-shadow: 0 0 28px var(--neon-blue), 0 0 55px rgba(0, 243, 255, 0.35), inset 0 0 30px rgba(0, 0, 0, 0.5); }
}

/* SVG Overlay for Paylines */
.payline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.payline-draw {
    stroke: transparent;
    stroke-width: 5;
    stroke-linecap: round;
    opacity: 0.8;
    transition: stroke 0.2s;
}

.payline-draw.active-line {
    stroke: var(--gold);
    stroke-width: 6;
    filter: drop-shadow(0 0 8px var(--gold)) drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    animation: paylineGlow 0.6s ease-in-out infinite alternate;
}

@keyframes paylineGlow {
    from { opacity: 0.85; filter: drop-shadow(0 0 6px var(--gold)) drop-shadow(0 0 12px rgba(255, 215, 0, 0.5)); }
    to { opacity: 1; filter: drop-shadow(0 0 12px var(--gold)) drop-shadow(0 0 22px rgba(255, 215, 0, 0.8)); }
}

@keyframes flashLine {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

/* 3D Viewport */
.reel-window {
    display: flex;
    justify-content: space-around;
    height: 200px;
    /* Perspective is key for 3D */
    perspective: 1000px;
    position: relative;
    background: #000;
}

/* Column wrapper */
.reel-col {
    width: 30%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

.reel-col:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0;
    right: -2px;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 243, 255, 0.4), transparent);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
    z-index: 6;
}

/* The Rotating Reel Strip */
.reel-3d {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    will-change: transform;
    /* We handle rotation in JS via inline styles for precise control */
}

/* Symbols */
/* We simulate the reel by placing symbols in 3D space.
   However, constructing a full cylinder is heavy.
   We can fake it by just translating Y for spin, OR 
   actually placing panels. Let's do a simplified strip:
   We just render a long strip and TranslateY it rapidly.
   To make it look 3D, we add a gradient overlay on top/bottom of container.
*/
/* Actually, user asked for "True 3D". Let's try to rotateX. */

.symbol {
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem;
    backface-visibility: hidden;
    position: absolute;
    left: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
    transition: transform 0.15s, filter 0.2s;
    animation: symbolIdle 4s ease-in-out infinite;
}

@keyframes symbolIdle {
    0%, 100% { filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)) drop-shadow(0 0 8px rgba(255,255,255,0.08)); }
    50% { filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)) drop-shadow(0 0 14px rgba(255,255,255,0.15)); }
}

.symbol.winning-symbol {
    animation: symbolPulse 0.6s ease-out 3;
    filter: drop-shadow(0 0 20px var(--gold)) drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}

@keyframes symbolPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes coinFall {
    from { transform: translateY(0) rotate(0deg); opacity: 1; }
    to { transform: translateY(100vh) rotate(720deg); opacity: 0.7; }
}

@keyframes flashFade {
    from { opacity: 1; }
    to { opacity: 0; }
}

.message-area.big-win-pulse {
    animation: messagePulse 0.5s ease-out 2;
}

@keyframes messagePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* To simulate 3D cylinder, we'd need many faces. 
   Instead, we will use the "Motion Blur Strip" technique for spinning,
   and static positioning for stop. 
   Actually, let's stick to 2D translation + blur for performance/robustness 
   unless we really want full 3D cylinder which requires fixed symbol count.
   Let's do 2D strip but with nice shading.
*/
.reel-3d {
    /* Falling back to 2D strip for robustness as true 3D cylinder with dynamic symbols is tricky to get pixel perfect without glitchy aliasing */
    /* We will simulate 3D with shading overlays */
}

.reel-window::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    z-index: 5;
    pointer-events: none;
}

.reel-window::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    z-index: 5;
    pointer-events: none;
}

/* Feature Status */
.feature-status {
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(157, 0, 255, 0.4), var(--neon-purple), rgba(157, 0, 255, 0.4), transparent);
    background-size: 200% 100%;
    text-align: center;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 50px;
    border: 2px solid var(--neon-pink);
    box-shadow: 0 0 25px var(--neon-pink), 0 0 50px rgba(255, 0, 222, 0.3), inset 0 0 20px rgba(255, 0, 222, 0.1);
    animation: featureStatusGlow 1.5s ease-in-out infinite;
}

@keyframes featureStatusGlow {
    0%, 100% { box-shadow: 0 0 25px var(--neon-pink), 0 0 50px rgba(255, 0, 222, 0.3), inset 0 0 20px rgba(255, 0, 222, 0.1); }
    50% { box-shadow: 0 0 40px var(--neon-pink), 0 0 70px rgba(255, 0, 222, 0.5), inset 0 0 30px rgba(255, 0, 222, 0.2); }
}

.pulse-text {
    font-family: 'Orbitron', sans-serif;
    color: white;
    font-size: 1.2rem;
    animation: pulseText 1s infinite alternate;
}

@keyframes pulseText {
    from {
        letter-spacing: 1px;
    }

    to {
        letter-spacing: 3px;
    }
}

/* Controls */
.controls-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px 20px;
    width: 100%;
    margin-bottom: 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.35) 100%);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #333;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.controls-side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 140px;
}

.controls-side .patrick-btn {
    background: linear-gradient(135deg, #ff00de, #9d00ff);
    color: white;
    font-size: 0.8rem;
    padding: 10px 12px;
    white-space: nowrap;
}

.controls-side .rema-btn {
    background: #00509e;
    color: white;
    font-size: 0.8rem;
    padding: 10px 12px;
    white-space: nowrap;
}

.controls-side .primary-btn {
    border: none;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
}

.controls-side .primary-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.display-box {
    background: linear-gradient(180deg, #0d0d12 0%, #000 100%);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.display-box:hover {
    border-color: #444;
    box-shadow: 0 0 18px rgba(0, 243, 255, 0.08);
}

.label {
    font-family: 'Orbitron';
    font-size: 0.7rem;
    color: #888;
}

.value {
    font-family: 'Orbitron';
    font-size: 1.1rem;
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

.value.highlight {
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold), 0 0 20px rgba(255, 215, 0, 0.5);
    animation: winValueGlow 1.2s ease-in-out infinite;
}

@keyframes winValueGlow {
    0%, 100% { text-shadow: 0 0 10px var(--gold), 0 0 20px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 16px var(--gold), 0 0 30px rgba(255, 215, 0, 0.7); }
}

/* Buttons */
.bet-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-btn {
    background: #222;
    color: white;
    border: 1px solid #444;
    min-width: 35px;
    height: 35px;
    border-radius: 8px;
    font-family: 'Orbitron';
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.1s;
}

.control-btn:hover {
    background: #333;
    border-color: #555;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.highlight-btn {
    color: var(--neon-blue);
    border-color: var(--neon-blue);
}

.highlight-btn:hover {
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.max-btn {
    background: linear-gradient(180deg, #ff33e8, var(--neon-pink));
    border-color: var(--neon-pink);
    font-weight: bold;
}

.max-btn:hover {
    box-shadow: 0 0 20px var(--neon-pink);
}

/* Main Action */
.action-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.main-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.spin-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.35);
    background: radial-gradient(circle at 30% 30%, #ff33e8, #ff00de 40%, #660059 100%);
    color: white;
    font-family: 'Orbitron';
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 25px var(--neon-pink), 0 0 50px rgba(255, 0, 222, 0.3), inset 0 0 15px rgba(255, 255, 255, 0.4), inset 0 -4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.3);
}

.spin-button:hover {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 40px var(--neon-pink), 0 0 70px rgba(255, 0, 222, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.5);
}

.spin-button:active {
    transform: scale(0.98);
}

.spin-button:not(:disabled) {
    animation: spinReadyPulse 2.5s ease-in-out infinite;
}

.spin-button:disabled {
    filter: grayscale(1);
    cursor: not-allowed;
    animation: none;
}

@keyframes spinReadyPulse {
    0%, 100% { box-shadow: 0 0 25px var(--neon-pink), 0 0 50px rgba(255, 0, 222, 0.3), inset 0 0 15px rgba(255, 255, 255, 0.4), inset 0 -4px 10px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: 0 0 35px var(--neon-pink), 0 0 65px rgba(255, 0, 222, 0.4), inset 0 0 18px rgba(255, 255, 255, 0.5), inset 0 -4px 10px rgba(0, 0, 0, 0.4); }
}

.auto-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--neon-green);
    background: radial-gradient(circle at 30% 30%, #0a1a0a, #000);
    color: var(--neon-green);
    font-family: 'Orbitron';
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.4), inset 0 0 15px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.2s, transform 0.15s;
}

.auto-button:hover {
    box-shadow: 0 0 20px var(--neon-green), 0 0 35px rgba(0, 255, 65, 0.25);
    transform: scale(1.05);
}

.auto-button.active {
    background: var(--neon-green);
    color: #000;
    animation: spinAuto 2s linear infinite;
}

@keyframes spinAuto {
    0% {
        box-shadow: 0 0 10px var(--neon-green);
    }

    50% {
        box-shadow: 0 0 25px var(--neon-green);
    }

    100% {
        box-shadow: 0 0 10px var(--neon-green);
    }
}

/* Hall of Fame */
.hall-of-fame-panel {
    min-width: 250px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95), rgba(10, 10, 20, 0.95));
    border: 2px solid var(--gold);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.12), inset 0 0 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.hall-of-fame-panel h2 {
    font-family: 'Orbitron';
    color: var(--gold);
    text-align: center;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

#hof-list li {
    padding: 12px;
    border-bottom: 1px solid #333;
    font-family: 'Roboto';
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    transition: background 0.2s, box-shadow 0.2s;
}

#hof-list li:hover {
    background: rgba(255, 215, 0, 0.06);
    box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.05);
}

.hof-file-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.hof-file-btn {
    background: #222;
    border: 1px solid #555;
    color: #ddd;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.hof-file-btn:hover {
    background: #333;
    border-color: var(--gold);
    color: #fff;
}

.hof-sync-status {
    font-size: 0.7rem;
    color: var(--neon-green);
    margin-left: 4px;
}

.current-player-display {
    margin-top: auto;
    padding-top: 15px;
    border-top: 2px solid #333;
    text-align: center;
    color: #aaa;
}

/* Global Animations */
.message {
    height: 28px;
    min-width: 200px;
    font-family: 'Orbitron';
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    padding: 4px 16px;
    border-radius: 8px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    background: rgba(0, 243, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15), inset 0 0 20px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s, border-color 0.3s;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(180deg, #1a1a22 0%, #0d0d12 100%);
    border: 2px solid var(--neon-blue);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.2), 0 0 80px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 0, 0, 0.3);
    animation: modalGlow 3s ease-in-out infinite;
}

@keyframes modalGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(0, 243, 255, 0.2), 0 0 80px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 0 55px rgba(0, 243, 255, 0.35), 0 0 100px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 0, 0, 0.3); }
}

.modal-content input {
    background: #222;
    border: 1px solid #444;
    padding: 10px;
    color: white;
    width: 200px;
    text-align: center;
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .slot-machine-container,
    .hall-of-fame-panel {
        width: 100%;
    }
}

/* Feature 1: Jackpot */
.jackpot-display {
    background: linear-gradient(90deg, #2a0000, #550000, #2a0000);
    border: 2px solid var(--gold);
    border-radius: 10px;
    padding: 10px 20px;
    margin-top: 10px;
    color: var(--gold);
    font-family: 'Orbitron';
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4), 0 0 30px rgba(255, 215, 0, 0.15);
    animation: pulseRed 2s infinite;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.jackpot-display span {
    display: block;
}

.jackpot-display span:first-child {
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.jackpot-display span:last-child {
    font-size: 1.5rem;
    font-weight: bold;
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 15px red;
    }

    50% {
        box-shadow: 0 0 25px red;
    }

    100% {
        box-shadow: 0 0 15px red;
    }
}

/* Feature 3: Tools & Mini buttons */
.mini-btn {
    background: var(--neon-green);
    color: black;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.controls-side .tools-panel {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tool-btn {
    background: #222;
    border: 1px solid #444;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: #333;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transform: scale(1.08);
}

.tool-btn.active {
    color: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

/* Feature 4: History */
.history-panel {
    margin-top: 20px;
    border-top: 1px solid #444;
    padding-top: 10px;
    max-height: 200px;
    display: flex;
    flex-direction: column;
}

.history-panel h3 {
    margin: 0 0 10px 0;
    font-family: 'Orbitron';
    font-size: 1rem;
    color: #888;
    text-align: center;
}

.history-log {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-item {
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px;
    border-radius: 5px;
}

.history-win {
    border: 1px solid var(--neon-green);
    border-left: 4px solid var(--neon-green);
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.2), 0 0 12px rgba(0, 255, 65, 0.15);
}

/* Feature 7: XP Bar */
.level-bar-container {
    width: 100%;
    margin: 10px 0;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.08);
}

.level-info {
    display: flex;
    justify-content: space-between;
    font-family: 'Orbitron';
    font-size: 0.8rem;
    color: var(--neon-blue);
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

.xp-bar-bg {
    width: 100%;
    height: 10px;
    background: #1a1a1a;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 243, 255, 0.1);
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple), var(--neon-pink));
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.5s ease-out;
    animation: xpBarShimmer 3s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

@keyframes xpBarShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}



/* Feature 8: Achievements */
.achievements-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.achievement-item {
    background: #222;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
}

.achievement-item.unlocked {
    opacity: 1;
    border: 1px solid var(--gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.trophy-icon {
    font-size: 2rem;
}

.ach-details h4 {
    margin: 0;
    color: var(--gold);
    font-family: 'Orbitron';
}

.ach-details p {
    margin: 5px 0 0 0;
    font-size: 0.8rem;
    color: #ccc;
}

.modal-content.large {
    width: 90%;
    max-width: 500px;
}

/* REMA Grocery Store Mini-Game */
.rema-store {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rema-game-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    margin-bottom: 10px;
    font-family: 'Orbitron';
    font-size: 1.2rem;
    color: #00ff88;
}

#rema-timer {
    color: #ffaa00;
    font-weight: bold;
}

.rema-score {
    color: #00f3ff;
}

.rema-shelf {
    width: 100%;
    max-width: 420px;
    min-height: 280px;
    max-height: 50vh;
    overflow: auto;
    background: linear-gradient(180deg, #2d5016 0%, #1a3009 100%);
    border: 4px solid #00509e;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: flex-start;
    justify-content: center;
    position: relative;
}

.energy-drink {
    width: 36px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 50%, #111 100%);
    border: 2px solid #00ff41;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6), inset 0 1px 0 rgba(0,255,65,0.2);
    transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
    user-select: none;
}

.energy-drink .energy-drink-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.energy-drink:hover {
    transform: scale(1.12);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6), 0 4px 10px rgba(0,0,0,0.6);
    border-color: #39ff14;
}

.energy-drink:active {
    transform: scale(0.95);
}

.energy-drink.grabbed {
    pointer-events: none;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.2s, transform 0.2s;
}

.rema-result {
    font-size: 1.3rem;
    font-weight: bold;
    color: #00ff88;
    margin-top: 12px;
    min-height: 1.5em;
}

.rema-result.hidden {
    display: none;
}

/* Patrick Mode (Wheel) */
.star-btn {
    color: #ffd700;
    border-color: #ffd700;
}

.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 20px auto;
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    color: white;
    z-index: 10;
    text-shadow: 0 0 10px red;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid white;
    position: relative;
    overflow: hidden;
    transition: transform 5s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: #333;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.wheel-segment {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: transparent;
    transform-origin: 0% 50%;
    transform: rotate(calc(45deg * var(--i))) translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
}

.wheel-segment::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 0;
    width: 300px;
    height: 300px;
    background: var(--clr);
    clip-path: polygon(0 50%, 100% 30%, 100% 70%);
    /* Approximate 45deg slice */
    z-index: -1;
    transform: rotate(0deg);
    opacity: 0.5;
}

.wheel-segment span {
    transform: rotate(90deg);
    font-weight: bold;
    font-family: 'Orbitron';
    text-shadow: 1px 1px 2px black;
    z-index: 2;
}

/* Patrick: 8-color wheel segments (color only) */
.patrick-wheel-modal .wheel-segment span {
    display: none;
}

.patrick-wheel-modal .wheel-segment::before {
    opacity: 0.9;
}

.patrick-subtitle {
    color: #ccc;
    font-size: 0.9rem;
    margin: -5px 0 15px 0;
}

.patrick-label {
    margin: 10px 0 6px 0;
    font-size: 0.95rem;
    color: #ddd;
}

.patrick-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 5px;
}

.patrick-color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    transition: transform 0.1s, box-shadow 0.15s;
}

.patrick-color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px currentColor;
}

.patrick-color-btn.selected {
    border-color: white;
    box-shadow: 0 0 18px white, 0 0 8px currentColor;
    transform: scale(1.15);
}

.patrick-controls {
    margin-top: 20px;
}

.bet-input {
    background: #222;
    border: 1px solid #555;
    color: white;
    padding: 10px;
    width: 100px;
    text-align: center;
    font-size: 1.2rem;
    font-family: 'Orbitron';
}

.control-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.spin-button.large {
    font-size: 1.5rem;
    padding: 15px 40px;
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    color: black;
    border: none;
}

/* Game Over & Extras */
.alarming {
    border: 2px solid red;
    box-shadow: 0 0 50px red;
    background: #100;
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

/* Rocket Mode */
.rocket-container {
    height: 200px;
    border-bottom: 2px solid cyan;
    border-left: 2px solid cyan;
    position: relative;
    margin: 20px;
    background: linear-gradient(to top, rgba(0, 255, 255, 0.1), transparent);
    overflow: hidden;
}

#rocket-ship {
    font-size: 3rem;
    position: absolute;
    bottom: 0;
    left: 10px;
    transition: bottom 0.1s linear, left 0.1s linear;
}

#rocket-multiplier {
    font-size: 4rem;
    color: white;
    text-align: center;
    position: absolute;
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    text-shadow: 0 0 10px cyan;
    opacity: 0.3;
}

.rocket-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Icon Selection */
.icon-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.player-icon {
    font-size: 2rem;
    padding: 10px;
    border: 2px solid #444;
    border-radius: 10px;
    cursor: pointer;
    background: #222;
    transition: all 0.2s;
}

.player-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px cyan;
    border-color: cyan;
}

.player-icon.selected {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    border-color: white;
    box-shadow: 0 0 20px var(--neon-pink);
    transform: scale(1.15);
}