/* 3-column layout: payout | slot | leaderboard */
#main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    gap: 0;
}

/* Side panels */
#payout-panel,
#leaderboard-panel {
    width: 330px;
    flex-shrink: 0;
    background: rgba(18,18,31,0.8);
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

#leaderboard-panel {
    border-right: none;
    border-left: 1px solid #222;
}

.panel-title {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 3px;
    padding: 12px 8px 8px;
    border-bottom: 1px solid #333;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

/* Payout table in sidebar */
#payout-table {
    padding: 6px;
    flex: 1;
}

.payout-row {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    font-size: 12px;
    color: var(--text-dim);
    border-bottom: 1px solid #1a1a2e;
}

.payout-row .payout-symbol {
    color: var(--neon-green);
    flex: 1;
}

.payout-row .payout-mult {
    color: var(--gold);
    text-align: right;
    flex: 1;
}

.payout-header {
    font-weight: bold;
    color: var(--gold-dark);
    border-bottom: 1px solid #333;
}

.payout-header .payout-symbol,
.payout-header .payout-mult {
    color: var(--gold-dark);
}

/* Leaderboard */
#leaderboard-list {
    padding: 6px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.lb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 8px;
    font-size: 13px;
    border-bottom: 1px solid #1a1a2e;
}

.lb-rank {
    color: var(--gold);
    width: 22px;
    text-align: center;
    font-weight: bold;
}

.lb-name {
    flex: 1;
    color: var(--text-primary);
    padding: 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-currency {
    color: var(--neon-green);
    white-space: nowrap;
}

.lb-avatar-wrap {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    margin-left: 4px;
}

.lb-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--gold-dark);
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.lb-rank-letter {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 4px rgba(0,0,0,0.9), 0 0 8px rgba(255,215,0,0.4);
    line-height: 1;
    pointer-events: none;
}

/* Rank separator line in leaderboard */
.lb-rank-separator {
    position: relative;
    text-align: center;
    border-top: 1px solid #2a2a3e;
    margin: 8px 0 4px;
    padding-top: 2px;
}

.lb-rank-name {
    display: inline-block;
    position: relative;
    top: -9px;
    background: rgba(18,18,31,0.95);
    padding: 0 8px;
    font-size: 10px;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Keys table */
#keys-table {
    padding: 6px;
}

.key-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    font-size: 12px;
    color: var(--text-dim);
    border-bottom: 1px solid #1a1a2e;
}

.key-action {
    color: var(--neon-green);
}

.key-bind {
    color: var(--gold);
    text-align: right;
    font-weight: bold;
}

/* Slot machine cabinet and reels */
#slot-machine {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 16px;
    min-width: 0;
    background: rgba(10, 10, 18, 0.6);
}

#slot-cabinet {
    position: relative;
    width: 100%;
    max-width: 1050px;
    background: linear-gradient(135deg, rgba(26,26,46,0.92) 0%, rgba(22,33,62,0.92) 50%, rgba(26,26,46,0.92) 100%);
    border: 3px solid var(--gold-dark);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--cabinet-shadow), 0 0 80px rgba(255, 215, 0, 0.05);
}

/* LED strips on cabinet */
.led-strip {
    position: absolute;
    z-index: 2;
}

.led-strip-left,
.led-strip-right {
    top: 10px;
    bottom: 10px;
    width: 6px;
}

.led-strip-left {
    left: -3px;
    background: repeating-linear-gradient(
        180deg,
        var(--gold) 0px,
        var(--gold) 4px,
        transparent 4px,
        transparent 10px
    );
    box-shadow: -4px 0 8px rgba(255, 215, 0, 0.3);
    animation: led-blink-left 1.5s infinite;
}

.led-strip-right {
    right: -3px;
    background: repeating-linear-gradient(
        180deg,
        var(--neon-red) 0px,
        var(--neon-red) 4px,
        transparent 4px,
        transparent 10px
    );
    box-shadow: 4px 0 8px rgba(255, 23, 68, 0.3);
    animation: led-blink-right 1.5s infinite 0.75s;
}

.led-strip-top {
    top: -3px;
    left: 10px;
    right: 10px;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        var(--neon-blue) 0px,
        var(--neon-blue) 4px,
        transparent 4px,
        transparent 10px
    );
    box-shadow: 0 -4px 8px rgba(0, 176, 255, 0.3);
    animation: led-blink-top 2s infinite;
}

@keyframes led-blink-left {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes led-blink-right {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes led-blink-top {
    0%, 100% { opacity: 1; }
    33% { opacity: 0.3; }
    66% { opacity: 0.8; }
}

/* Slot title */
#slot-title {
    text-align: center;
    font-size: clamp(24px, 5vw, 40px);
    letter-spacing: 6px;
    margin-bottom: 14px;
}

/* Reels frame */
#reels-frame {
    position: relative;
    background: #000;
    border: 3px solid var(--gold-dark);
    border-radius: 6px;
    padding: 4px;
    overflow: hidden;
}

#reels-window {
    display: flex;
    height: 300px;
    gap: 0;
}

.reel {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(10,10,20,0.92) 0%, rgba(17,17,34,0.92) 50%, rgba(10,10,20,0.92) 100%);
}

.reel-divider {
    width: 2px;
    background: var(--gold-dark);
    opacity: 0.5;
    transition: background 0.3s, opacity 0.3s, box-shadow 0.3s, width 0.3s;
}

/* Scatter flash: golden glow on reels frame when stars appear */
#reels-frame.scatter-flash {
    border-color: var(--gold-light);
    box-shadow: 0 0 16px rgba(255,228,77,0.7), 0 0 40px rgba(255,215,0,0.4), inset 0 0 12px rgba(255,228,77,0.2);
    animation: scatter-frame-flash 0.4s ease infinite alternate;
}

@keyframes scatter-frame-flash {
    from { border-color: var(--gold); box-shadow: 0 0 10px rgba(255,215,0,0.5), 0 0 24px rgba(255,228,77,0.2); }
    to { border-color: var(--gold-light); box-shadow: 0 0 20px rgba(255,228,77,0.8), 0 0 50px rgba(255,215,0,0.4), inset 0 0 16px rgba(255,228,77,0.25); }
}

/* Single symbol cell in reel */
.reel-symbol {
    height: 100px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.symbol-label {
    font-size: 16px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

/* Winning cell highlight */
.reel-symbol.win-highlight {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.4), 0 0 12px rgba(255, 215, 0, 0.3);
    animation: win-cell-pulse 0.8s ease infinite alternate;
}

.reel-symbol.win-highlight .symbol-label {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

@keyframes win-cell-pulse {
    from { background: rgba(255, 215, 0, 0.15); }
    to { background: rgba(255, 215, 0, 0.3); }
}

/* Reel strip (animated via transform for GPU acceleration) */
.reel-strip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform;
}

.reel-strip.stopping {
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1.05);
}

/* Payline indicator */
#payline {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--neon-red);
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(255, 23, 68, 0.6);
    z-index: 3;
    pointer-events: none;
}

#payline::before,
#payline::after {
    content: '';
    position: absolute;
    top: -5px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

#payline::before {
    left: -2px;
    border-left: 8px solid var(--neon-red);
}

#payline::after {
    right: -2px;
    border-right: 8px solid var(--neon-red);
}

/* Win display */
#win-display {
    text-align: center;
    padding: 12px;
    margin-top: 10px;
    min-height: 48px;
    font-size: clamp(16px, 3vw, 26px);
    font-weight: bold;
    animation: win-flash 0.5s ease infinite alternate;
}

#win-display.win-hidden {
    visibility: hidden;
}

#win-display.win-triple {
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4);
}

#win-display.win-double {
    color: var(--neon-green);
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
}

#win-display.win-none {
    color: var(--neon-red);
    text-shadow: none;
    animation: none;
}

@keyframes win-flash {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

/* Lever */
#lever-container {
    display: flex;
    justify-content: flex-end;
    padding-right: 10px;
    margin-top: 12px;
}

#lever {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transform-origin: bottom center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#lever:hover #lever-knob {
    background: var(--neon-red);
    box-shadow: 0 0 14px rgba(255, 23, 68, 0.6);
}

#lever.pulled {
    transform: rotate(25deg);
    transition: transform 0.1s ease-in;
}

#lever-knob {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #cc0000;
    border: 3px solid #880000;
    box-shadow: 0 0 8px rgba(204, 0, 0, 0.4);
    transition: all 0.15s;
}

#lever-shaft {
    width: 8px;
    height: 50px;
    background: linear-gradient(90deg, #666 0%, #aaa 50%, #666 100%);
    border-radius: 2px;
}

#lever-base {
    width: 24px;
    height: 10px;
    background: #444;
    border-radius: 0 0 4px 4px;
}

/* Auto-spin: lever stays pulled with color highlight */
#lever.auto-spin {
    transform: rotate(25deg);
}

#lever.auto-spin #lever-knob {
    background: var(--neon-green);
    border-color: #006600;
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.6);
    animation: autospin-pulse 1s ease infinite alternate;
}

@keyframes autospin-pulse {
    from { box-shadow: 0 0 8px rgba(0, 255, 65, 0.4); }
    to { box-shadow: 0 0 20px rgba(0, 255, 65, 0.8); }
}

/* Coin rain animation */
#coin-rain {
    position: relative;
    height: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 5;
}

.coin {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffe44d, #b8860b);
    border: 2px solid #8b7500;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
    animation: coin-fall linear forwards;
    opacity: 1;
}

@keyframes coin-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(140px) rotate(720deg); opacity: 0; }
}

/* ALL IN button */
.btn-allin {
    background: var(--neon-red) !important;
    color: #fff !important;
    border-color: #aa0000 !important;
}

.btn-allin:hover {
    background: #ff4444 !important;
    border-color: var(--neon-red) !important;
}

/* CSS Pixel Art Symbols */
.pixel-symbol {
    width: 56px;
    height: 56px;
    position: relative;
    image-rendering: pixelated;
}

/* Battery symbol */
.pixel-battery {
    background:
        linear-gradient(var(--neon-green), var(--neon-green)) 12px 2px / 16px 4px no-repeat,
        linear-gradient(#555, #555) 6px 6px / 28px 2px no-repeat,
        linear-gradient(var(--neon-green), var(--neon-green)) 6px 8px / 28px 24px no-repeat,
        linear-gradient(#333, #333) 10px 12px / 20px 16px no-repeat,
        linear-gradient(var(--neon-green), var(--neon-green)) 12px 14px / 8px 12px no-repeat,
        linear-gradient(#555, #555) 6px 32px / 28px 2px no-repeat;
}

/* Antenna symbol */
.pixel-antenna {
    background:
        linear-gradient(var(--neon-blue), var(--neon-blue)) 18px 2px / 4px 4px no-repeat,
        linear-gradient(var(--neon-blue), var(--neon-blue)) 16px 6px / 8px 4px no-repeat,
        linear-gradient(#888, #888) 18px 10px / 4px 14px no-repeat,
        linear-gradient(#888, #888) 10px 20px / 20px 4px no-repeat,
        linear-gradient(#888, #888) 8px 24px / 4px 12px no-repeat,
        linear-gradient(#888, #888) 28px 24px / 4px 12px no-repeat,
        linear-gradient(#555, #555) 4px 32px / 12px 4px no-repeat,
        linear-gradient(#555, #555) 24px 32px / 12px 4px no-repeat;
}

/* Memory chip symbol */
.pixel-memory {
    background:
        linear-gradient(var(--neon-purple), var(--neon-purple)) 8px 4px / 24px 28px no-repeat,
        linear-gradient(#333, #333) 12px 8px / 16px 20px no-repeat,
        linear-gradient(var(--neon-purple), var(--neon-purple)) 16px 12px / 8px 12px no-repeat,
        linear-gradient(var(--neon-purple), var(--neon-purple)) 4px 8px / 4px 4px no-repeat,
        linear-gradient(var(--neon-purple), var(--neon-purple)) 4px 16px / 4px 4px no-repeat,
        linear-gradient(var(--neon-purple), var(--neon-purple)) 4px 24px / 4px 4px no-repeat,
        linear-gradient(var(--neon-purple), var(--neon-purple)) 32px 8px / 4px 4px no-repeat,
        linear-gradient(var(--neon-purple), var(--neon-purple)) 32px 16px / 4px 4px no-repeat,
        linear-gradient(var(--neon-purple), var(--neon-purple)) 32px 24px / 4px 4px no-repeat;
}

/* GPU symbol */
.pixel-gpu {
    background:
        linear-gradient(#ffa500, #ffa500) 4px 6px / 32px 24px no-repeat,
        linear-gradient(#333, #333) 8px 10px / 10px 8px no-repeat,
        linear-gradient(#ffa500, #ffa500) 10px 12px / 6px 4px no-repeat,
        linear-gradient(#333, #333) 22px 10px / 10px 8px no-repeat,
        linear-gradient(#ffa500, #ffa500) 24px 12px / 6px 4px no-repeat,
        linear-gradient(#333, #333) 8px 20px / 24px 6px no-repeat,
        linear-gradient(#ffa500, #ffa500) 12px 22px / 4px 2px no-repeat,
        linear-gradient(#ffa500, #ffa500) 20px 22px / 4px 2px no-repeat,
        linear-gradient(#ffa500, #ffa500) 28px 22px / 4px 2px no-repeat,
        linear-gradient(#888, #888) 8px 30px / 4px 6px no-repeat,
        linear-gradient(#888, #888) 16px 30px / 4px 6px no-repeat,
        linear-gradient(#888, #888) 24px 30px / 4px 6px no-repeat,
        linear-gradient(#888, #888) 32px 30px / 4px 6px no-repeat;
}

/* Neural net symbol */
.pixel-neural {
    background:
        linear-gradient(#ff69b4, #ff69b4) 16px 2px / 8px 8px no-repeat,
        linear-gradient(#ff69b4, #ff69b4) 4px 14px / 8px 8px no-repeat,
        linear-gradient(#ff69b4, #ff69b4) 28px 14px / 8px 8px no-repeat,
        linear-gradient(#ff69b4, #ff69b4) 10px 28px / 8px 8px no-repeat,
        linear-gradient(#ff69b4, #ff69b4) 22px 28px / 8px 8px no-repeat,
        linear-gradient(#aaa, #aaa) 14px 10px / 2px 6px no-repeat,
        linear-gradient(#aaa, #aaa) 24px 10px / 2px 6px no-repeat,
        linear-gradient(#aaa, #aaa) 10px 22px / 2px 6px no-repeat,
        linear-gradient(#aaa, #aaa) 28px 22px / 2px 6px no-repeat,
        linear-gradient(#aaa, #aaa) 18px 22px / 4px 6px no-repeat;
}

/* CPU symbol */
.pixel-cpu {
    background:
        linear-gradient(var(--gold), var(--gold)) 8px 8px / 24px 24px no-repeat,
        linear-gradient(#333, #333) 12px 12px / 16px 16px no-repeat,
        linear-gradient(var(--gold), var(--gold)) 16px 16px / 8px 8px no-repeat,
        linear-gradient(var(--gold), var(--gold)) 14px 4px / 4px 4px no-repeat,
        linear-gradient(var(--gold), var(--gold)) 22px 4px / 4px 4px no-repeat,
        linear-gradient(var(--gold), var(--gold)) 14px 32px / 4px 4px no-repeat,
        linear-gradient(var(--gold), var(--gold)) 22px 32px / 4px 4px no-repeat,
        linear-gradient(var(--gold), var(--gold)) 4px 14px / 4px 4px no-repeat,
        linear-gradient(var(--gold), var(--gold)) 4px 22px / 4px 4px no-repeat,
        linear-gradient(var(--gold), var(--gold)) 32px 14px / 4px 4px no-repeat,
        linear-gradient(var(--gold), var(--gold)) 32px 22px / 4px 4px no-repeat;
}

/* Diamond chip symbol */
.pixel-diamond {
    background:
        linear-gradient(#00ffff, #00ffff) 16px 2px / 8px 4px no-repeat,
        linear-gradient(#00cccc, #00cccc) 12px 6px / 16px 4px no-repeat,
        linear-gradient(#00ffff, #00ffff) 8px 10px / 24px 4px no-repeat,
        linear-gradient(#00dddd, #00dddd) 4px 14px / 32px 4px no-repeat,
        linear-gradient(#00cccc, #00cccc) 8px 18px / 24px 4px no-repeat,
        linear-gradient(#00bbbb, #00bbbb) 12px 22px / 16px 4px no-repeat,
        linear-gradient(#00aaaa, #00aaaa) 16px 26px / 8px 4px no-repeat,
        linear-gradient(#009999, #009999) 18px 30px / 4px 4px no-repeat;
}

/* Star scatter symbol */
.pixel-star {
    background:
        linear-gradient(#ffff00, #ffff00) 24px 0px / 8px 4px no-repeat,
        linear-gradient(#ffdd00, #ffdd00) 20px 4px / 16px 4px no-repeat,
        linear-gradient(#ffff00, #ffff00) 4px 8px / 48px 4px no-repeat,
        linear-gradient(#ffdd00, #ffdd00) 8px 12px / 40px 4px no-repeat,
        linear-gradient(#ffff00, #ffff00) 12px 16px / 32px 4px no-repeat,
        linear-gradient(#ffdd00, #ffdd00) 16px 20px / 24px 4px no-repeat,
        linear-gradient(#ffff00, #ffff00) 12px 24px / 32px 4px no-repeat,
        linear-gradient(#ffdd00, #ffdd00) 8px 28px / 12px 4px no-repeat,
        linear-gradient(#ffdd00, #ffdd00) 36px 28px / 12px 4px no-repeat;
    animation: star-glow 1.2s ease infinite alternate;
}

@keyframes star-glow {
    from { filter: brightness(1) drop-shadow(0 0 4px rgba(255,255,0,0.3)); }
    to { filter: brightness(1.3) drop-shadow(0 0 10px rgba(255,255,0,0.8)); }
}

/* ===================== FREE SPIN MODE ===================== */

/* Free-spin alternative symbol skins (neon/inverted palette) */
.free-spin-mode .pixel-battery {
    background:
        linear-gradient(#ff00ff, #ff00ff) 12px 2px / 16px 4px no-repeat,
        linear-gradient(#aaa, #aaa) 6px 6px / 28px 2px no-repeat,
        linear-gradient(#ff00ff, #ff00ff) 6px 8px / 28px 24px no-repeat,
        linear-gradient(#220022, #220022) 10px 12px / 20px 16px no-repeat,
        linear-gradient(#ff00ff, #ff00ff) 12px 14px / 8px 12px no-repeat,
        linear-gradient(#aaa, #aaa) 6px 32px / 28px 2px no-repeat;
}

.free-spin-mode .pixel-antenna {
    background:
        linear-gradient(#ff4444, #ff4444) 18px 2px / 4px 4px no-repeat,
        linear-gradient(#ff4444, #ff4444) 16px 6px / 8px 4px no-repeat,
        linear-gradient(#ccc, #ccc) 18px 10px / 4px 14px no-repeat,
        linear-gradient(#ccc, #ccc) 10px 20px / 20px 4px no-repeat,
        linear-gradient(#ccc, #ccc) 8px 24px / 4px 12px no-repeat,
        linear-gradient(#ccc, #ccc) 28px 24px / 4px 12px no-repeat,
        linear-gradient(#999, #999) 4px 32px / 12px 4px no-repeat,
        linear-gradient(#999, #999) 24px 32px / 12px 4px no-repeat;
}

.free-spin-mode .pixel-memory {
    background:
        linear-gradient(#00ff41, #00ff41) 8px 4px / 24px 28px no-repeat,
        linear-gradient(#001a00, #001a00) 12px 8px / 16px 20px no-repeat,
        linear-gradient(#00ff41, #00ff41) 16px 12px / 8px 12px no-repeat,
        linear-gradient(#00ff41, #00ff41) 4px 8px / 4px 4px no-repeat,
        linear-gradient(#00ff41, #00ff41) 4px 16px / 4px 4px no-repeat,
        linear-gradient(#00ff41, #00ff41) 4px 24px / 4px 4px no-repeat,
        linear-gradient(#00ff41, #00ff41) 32px 8px / 4px 4px no-repeat,
        linear-gradient(#00ff41, #00ff41) 32px 16px / 4px 4px no-repeat,
        linear-gradient(#00ff41, #00ff41) 32px 24px / 4px 4px no-repeat;
}

.free-spin-mode .pixel-gpu {
    background:
        linear-gradient(#00b0ff, #00b0ff) 4px 6px / 32px 24px no-repeat,
        linear-gradient(#001a2e, #001a2e) 8px 10px / 10px 8px no-repeat,
        linear-gradient(#00b0ff, #00b0ff) 10px 12px / 6px 4px no-repeat,
        linear-gradient(#001a2e, #001a2e) 22px 10px / 10px 8px no-repeat,
        linear-gradient(#00b0ff, #00b0ff) 24px 12px / 6px 4px no-repeat,
        linear-gradient(#001a2e, #001a2e) 8px 20px / 24px 6px no-repeat,
        linear-gradient(#00b0ff, #00b0ff) 12px 22px / 4px 2px no-repeat,
        linear-gradient(#00b0ff, #00b0ff) 20px 22px / 4px 2px no-repeat,
        linear-gradient(#00b0ff, #00b0ff) 28px 22px / 4px 2px no-repeat,
        linear-gradient(#ccc, #ccc) 8px 30px / 4px 6px no-repeat,
        linear-gradient(#ccc, #ccc) 16px 30px / 4px 6px no-repeat,
        linear-gradient(#ccc, #ccc) 24px 30px / 4px 6px no-repeat,
        linear-gradient(#ccc, #ccc) 32px 30px / 4px 6px no-repeat;
}

.free-spin-mode .pixel-neural {
    background:
        linear-gradient(#ffff00, #ffff00) 16px 2px / 8px 8px no-repeat,
        linear-gradient(#ffff00, #ffff00) 4px 14px / 8px 8px no-repeat,
        linear-gradient(#ffff00, #ffff00) 28px 14px / 8px 8px no-repeat,
        linear-gradient(#ffff00, #ffff00) 10px 28px / 8px 8px no-repeat,
        linear-gradient(#ffff00, #ffff00) 22px 28px / 8px 8px no-repeat,
        linear-gradient(#fff, #fff) 14px 10px / 2px 6px no-repeat,
        linear-gradient(#fff, #fff) 24px 10px / 2px 6px no-repeat,
        linear-gradient(#fff, #fff) 10px 22px / 2px 6px no-repeat,
        linear-gradient(#fff, #fff) 28px 22px / 2px 6px no-repeat,
        linear-gradient(#fff, #fff) 18px 22px / 4px 6px no-repeat;
}

.free-spin-mode .pixel-cpu {
    background:
        linear-gradient(#ff1744, #ff1744) 8px 8px / 24px 24px no-repeat,
        linear-gradient(#1a0000, #1a0000) 12px 12px / 16px 16px no-repeat,
        linear-gradient(#ff1744, #ff1744) 16px 16px / 8px 8px no-repeat,
        linear-gradient(#ff1744, #ff1744) 14px 4px / 4px 4px no-repeat,
        linear-gradient(#ff1744, #ff1744) 22px 4px / 4px 4px no-repeat,
        linear-gradient(#ff1744, #ff1744) 14px 32px / 4px 4px no-repeat,
        linear-gradient(#ff1744, #ff1744) 22px 32px / 4px 4px no-repeat,
        linear-gradient(#ff1744, #ff1744) 4px 14px / 4px 4px no-repeat,
        linear-gradient(#ff1744, #ff1744) 4px 22px / 4px 4px no-repeat,
        linear-gradient(#ff1744, #ff1744) 32px 14px / 4px 4px no-repeat,
        linear-gradient(#ff1744, #ff1744) 32px 22px / 4px 4px no-repeat;
}

.free-spin-mode .pixel-diamond {
    background:
        linear-gradient(#e040fb, #e040fb) 16px 2px / 8px 4px no-repeat,
        linear-gradient(#c030dd, #c030dd) 12px 6px / 16px 4px no-repeat,
        linear-gradient(#e040fb, #e040fb) 8px 10px / 24px 4px no-repeat,
        linear-gradient(#d038ee, #d038ee) 4px 14px / 32px 4px no-repeat,
        linear-gradient(#c030dd, #c030dd) 8px 18px / 24px 4px no-repeat,
        linear-gradient(#b028cc, #b028cc) 12px 22px / 16px 4px no-repeat,
        linear-gradient(#a020bb, #a020bb) 16px 26px / 8px 4px no-repeat,
        linear-gradient(#9018aa, #9018aa) 18px 30px / 4px 4px no-repeat;
}

/* Free-spin mode: flash gold borders to neon-purple */
.free-spin-mode #header,
.free-spin-mode #footer {
    animation: border-flash 0.6s ease infinite alternate;
}

.free-spin-mode #slot-cabinet {
    border-color: var(--neon-purple);
    box-shadow: 0 0 40px rgba(224, 64, 251, 0.3), inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.free-spin-mode #reels-frame {
    border-color: var(--neon-purple);
}

.free-spin-mode .led-strip-left {
    background: repeating-linear-gradient(180deg, var(--neon-purple) 0px, var(--neon-purple) 4px, transparent 4px, transparent 10px);
    box-shadow: -4px 0 8px rgba(224, 64, 251, 0.3);
}

.free-spin-mode .led-strip-right {
    background: repeating-linear-gradient(180deg, var(--neon-green) 0px, var(--neon-green) 4px, transparent 4px, transparent 10px);
    box-shadow: 4px 0 8px rgba(0, 255, 65, 0.3);
}

.free-spin-mode .led-strip-top {
    background: repeating-linear-gradient(90deg, var(--neon-purple) 0px, var(--neon-purple) 4px, transparent 4px, transparent 10px);
    box-shadow: 0 -4px 8px rgba(224, 64, 251, 0.3);
}

.free-spin-mode .reel-divider {
    background: var(--neon-purple);
}

.free-spin-mode .lb-rank-separator {
    border-top-color: var(--neon-purple);
}

.free-spin-mode .lb-rank-name {
    color: var(--neon-purple);
}

@keyframes border-flash {
    from { border-color: var(--neon-purple); }
    to { border-color: var(--neon-green); }
}

/* Payout table special text for scatter */
.payout-special {
    color: var(--neon-purple);
    font-size: 10px;
    text-align: center;
    text-shadow: 0 0 6px rgba(224, 64, 251, 0.5);
}

/* Risk Ladder */
#risk-ladder-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#risk-ladder-overlay.hidden { display: none; }

#risk-ladder {
    background: linear-gradient(180deg, #0d0d1a 0%, #1a1a2e 50%, #0d0d1a 100%);
    border: 2px solid var(--gold-dark);
    border-radius: 8px;
    padding: 16px 24px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.ladder-title {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 3px;
    margin-bottom: 12px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

#ladder-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ladder-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid #2a2a3e;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
    background: rgba(20, 20, 40, 0.8);
}

.ladder-step:hover {
    border-color: var(--gold-dark);
}

.ladder-step .ladder-pct {
    color: var(--text-dim);
    font-size: 11px;
    min-width: 36px;
}

.ladder-step .ladder-amount {
    color: var(--neon-green);
    font-weight: bold;
    flex: 1;
    text-align: center;
}

.ladder-step.ladder-locked {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.ladder-step.ladder-locked .ladder-amount {
    color: var(--text-dim);
}

.ladder-step.ladder-current {
    cursor: default;
    pointer-events: none;
    border-color: var(--gold-dark);
    border-style: dashed;
    background: rgba(40, 35, 20, 0.4);
}

.ladder-step.ladder-current .ladder-pct {
    color: var(--gold);
}

.ladder-step.ladder-top .ladder-amount {
    color: var(--gold);
}

.ladder-step.ladder-bottom .ladder-amount {
    color: var(--neon-red);
}

.ladder-step.ladder-highlight {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.12);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.ladder-step.ladder-selected-win {
    border-color: var(--neon-green);
    background: rgba(0, 255, 65, 0.15);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
}

.ladder-step.ladder-selected-loss {
    border-color: var(--neon-red);
    background: rgba(255, 50, 50, 0.15);
    box-shadow: 0 0 12px rgba(255, 50, 50, 0.4);
}

#ladder-collect {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    font-size: 14px;
    letter-spacing: 2px;
}
