:root {
    --primary-gold: #ffcc00;
    --primary-blue: #0088cc;
    --neon-green: #00ff66;
    --neon-blue: #00f3ff;
    --neon-purple: #bd00ff;
    --text-white: #ffffff;
    --cabin-border: 4px solid #004466;
    --panel-bg: rgba(7, 15, 30, 0.75);
    --gold-glow: 0 0 15px rgba(255, 204, 0, 0.4);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at center, #001220 0%, #00050a 100%);
    color: var(--text-white);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    user-select: none;
    height: 100vh;
    width: 100vw;
}

/* BACKGROUND WITH SCENIC SUN RAYS */
#bubble-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: url('assets/underwater_bg.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

#bubble-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 18, 32, 0.2) 0%, rgba(0, 5, 10, 0.8) 100%);
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: rise 6s infinite linear;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(0.6);
        opacity: 0.1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-110vh) translateX(50px) scale(1.2);
        opacity: 0;
    }
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* SCREEN STATES */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* LOADER SCREEN */
#loader {
    background: #00060d;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 242, 254, 0.15);
    border-radius: 50%;
    border-top-color: var(--neon-blue);
    border-bottom-color: var(--neon-purple);
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loader h2 {
    font-family: 'Outfit', 'Rowdies', Impact, sans-serif;
    font-weight: 800;
    color: var(--neon-blue);
    font-size: 28px;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

#loader p {
    color: #4da6ff;
    font-size: 14px;
    font-weight: 500;
}

/* SERVER EXCLUSIVE LOCK SCREEN */
#lock-screen {
    background: radial-gradient(circle, #0e051c 0%, #040108 100%);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lock-card {
    background: rgba(14, 6, 28, 0.85);
    border: 2px solid var(--neon-purple);
    border-radius: 28px;
    padding: 40px;
    text-align: center;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 30px rgba(189, 0, 255, 0.3);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    border-color: var(--neon-blue);
}

.lock-logo {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 0 12px var(--neon-blue));
    animation: floatLogo 3s infinite ease-in-out alternate;
}

@keyframes floatLogo {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.lock-card h1 {
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff 30%, var(--neon-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.lock-card p {
    color: #aeb9cf;
    font-size: 15px;
    line-height: 1.6;
}

.lock-badge {
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid var(--neon-blue);
    border-radius: 30px;
    color: var(--neon-blue);
    font-size: 12px;
    font-weight: 800;
    padding: 6px 20px;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

/* SLOT CABINET STYLE */
#cabinet {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border: 6px solid #002233;
    outline: 2px solid var(--neon-blue);
    outline-offset: -5px;
    background: rgba(0, 5, 12, 0.25);
}

/* HEADER STYLE */
header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: var(--panel-bg);
    padding: 10px 18px;
    border-radius: 16px;
    border: var(--glass-border);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.back-btn {
    text-decoration: none;
    color: var(--neon-blue);
    font-weight: 800;
    font-size: 13px;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid var(--neon-blue);
    padding: 6px 14px;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.back-btn:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
    transform: translateY(-2px);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

.user-profile span {
    font-weight: 700;
    font-size: 14px;
    color: #f2f3f5;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 42px;
    height: auto;
    filter: drop-shadow(0 0 8px var(--neon-blue));
}

.brand-text {
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
    text-transform: uppercase;
}

.balance-container {
    justify-self: end;
    text-align: right;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.balance-container .label {
    display: block;
    font-size: 9px;
    color: #4da6ff;
    letter-spacing: 1px;
    font-weight: 800;
}

#balance-amount {
    font-size: 18px;
    font-weight: 800;
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(0, 255, 102, 0.3);
}

/* FREE SPINS PROGRESSION TRACK - SMOOTH COLLAPSIBLE GLASS HUD */
.multiplier-track {
    background: rgba(4, 18, 30, 0.92);
    border: 2px solid rgba(0, 242, 254, 0.25);
    border-radius: 20px;
    padding: 0 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255,255,255,0.1), 0 0 15px rgba(0, 242, 254, 0.05);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.4s ease, 
                margin 0.5s ease, 
                padding 0.5s ease;
}

.multiplier-track.visible {
    max-height: 150px;
    opacity: 1;
    margin: 8px 0;
    padding: 14px 20px;
}

.track-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.3);
}

.fs-badge {
    background: linear-gradient(135deg, #ffcc00 0%, #ff9900 100%);
    color: #000;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 900;
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.4);
    font-size: 10px;
    letter-spacing: 0.5px;
}

.progress-bar-container {
    position: relative;
    height: 34px;
    background: transparent;
    border-radius: 6px;
    margin: 6px 0 14px 0;
}

/* Visible bar track + fill share the exact same horizontal band as the dots. */
.progress-bar-track {
    position: absolute;
    left: 13px;
    right: 13px;
    top: 50%;
    height: 12px;
    margin-top: -6px;
    background: #050f1a;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
    z-index: 0;
}

/* Fill uses transform: scaleX from the left edge so it scales 1:1 with the dot band. */
.progress-bar-fill {
    position: absolute;
    left: 13px;
    right: 13px;
    top: 50%;
    height: 12px;
    margin-top: -6px;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, #00f2fe 0%, #00ff66 100%);
    border-radius: 6px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px #00ff66;
    z-index: 1;
}

.milestones {
    display: none;
}

/* Dots band shares the same inset as the bar so left:0% aligns with bar start. */
.meter-dots {
    position: absolute;
    left: 13px;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    height: 0;
    pointer-events: none;
    z-index: 2;
}

.dot {
    position: absolute;
    top: 0;
    width: 18px;
    height: 18px;
    margin-left: -9px; /* center horizontally on the left:% point */
    margin-top: -9px;  /* center vertically on the bar */
    border-radius: 50%;
    background: #0a1826;
    border: 2px solid #203a54;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 900;
    color: #4c6a8a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.dot.active {
    background: #00ff66;
    border-color: #fff;
    color: #000;
    box-shadow: 0 0 12px #00ff66;
    transform: scale(1.15);
}

.milestone-dot {
    width: 26px;
    height: 26px;
    margin-left: -13px;
    margin-top: -13px;
    background: #1c1503;
    border: 2.5px solid #cc9900;
    color: #ffcc00;
    font-size: 9px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.6);
}

.milestone-dot.active {
    background: radial-gradient(circle, #ffcc00 0%, #ff9900 100%);
    border-color: #fff;
    color: #000;
    box-shadow: 0 0 15px #ffcc00, 0 3px 6px rgba(0,0,0,0.6);
    transform: scale(1.2);
}

.milestone-dot::after {
    content: attr(data-label);
    position: absolute;
    top: -20px;
    font-size: 8px;
    font-weight: 900;
    background: #1c1503;
    color: #ffcc00;
    border: 1px solid #cc9900;
    padding: 1px 5px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.milestone-dot.active::after {
    background: #ffcc00;
    color: #000;
    border-color: #fff;
    box-shadow: 0 0 8px #ffcc00;
}

.fs-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: #a0c0e0;
}

/* CENTRAL SLOT REEL GRID */
.grid-section {
    position: relative;
    flex-grow: 1;
    background: rgba(0, 10, 20, 0.65);
    border: 4px solid #00334d;
    border-color: var(--neon-blue);
    border-radius: 20px;
    overflow: hidden;
    margin: 8px 0;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.9), 0 0 20px rgba(0, 242, 254, 0.1);
    backdrop-filter: blur(4px);
}

/* CANVAS FOR FISHING ROPE PULL ANIMATIONS */
#fishing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9;
}

#payline-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.reels-viewport {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 100%;
    width: 100%;
}

.reel-column {
    height: 100%;
    overflow: hidden;
    position: relative;
    transition: background 0.3s;
}

/* AUTHENTIC BUBBLE STREAMS RISING BETWEEN REELS */
.reel-column::after {
    content: '';
    position: absolute;
    top: 0;
    right: -6px;
    width: 12px;
    height: 100%;
    background-image: radial-gradient(circle, rgba(0, 243, 255, 0.45) 8%, transparent 12%),
                      radial-gradient(circle, rgba(255, 255, 255, 0.55) 12%, transparent 18%),
                      radial-gradient(circle, rgba(0, 243, 255, 0.3) 10%, transparent 16%);
    background-size: 12px 45px;
    background-position: 0 0, 4px 15px, 8px 30px;
    z-index: 5;
    animation: bubbleFloatVertical 3.2s infinite linear;
    opacity: 0.8;
    pointer-events: none;
}

.reel-column:last-child::after {
    display: none;
}

@keyframes bubbleFloatVertical {
    0% { background-position: 0 0, 4px 15px, 8px 30px; }
    100% { background-position: 0 -45px, 4px -30px, 8px -15px; }
}

.reel-column.near-miss-highlight {
    background: rgba(255, 0, 102, 0.15);
    box-shadow: inset 0 0 20px rgba(255, 0, 102, 0.3);
    animation: goldFlasher 0.5s infinite alternate;
}

@keyframes goldFlasher {
    from { outline: 1px solid rgba(255,0,102,0.3); }
    to { outline: 3px solid rgba(255,0,102,0.8); }
}

.reel-strip {
    display: flex;
    flex-direction: column;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    transition: transform 0s linear;
}

/* REALTIME SPINNING MOTION BLUR & TRANSLATION */
.reel-strip.spinning {
    animation: infiniteSpin 0.12s infinite linear;
    filter: blur(2px) brightness(1.08);
}

@keyframes infiniteSpin {
    0% { transform: translateY(calc(-3 * var(--cell-height))); }
    100% { transform: translateY(0); }
}

/* REEL CELLS - RESPONSIVE 1/3 OF CONTAINER */
.grid-cell {
    height: var(--cell-height, 110px);
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    border-bottom: 1px solid rgba(0, 242, 254, 0.08);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s;
}

/* PREMIUM SCALED GRAPHIC RENDERING */
.cell-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(var(--cell-height) * 0.88);
    height: calc(var(--cell-height) * 0.88);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cell-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.6));
}

/* HIGH-END TEXT RENDER FOR BALLOON CARD RANKS */
.card-rank {
    font-family: 'Rowdies', 'Outfit', 'Impact', sans-serif;
    font-size: calc(var(--cell-height) * 0.72);
    font-weight: 900;
    line-height: 1;
    text-align: center;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
    animation: balloonBounce 3s infinite ease-in-out alternate;
    -webkit-text-stroke: 2.5px #071220;
}

@keyframes balloonBounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-4px) scale(1.05); }
}

.card-rank.A {
    background: radial-gradient(circle at 30% 30%, #e680ff 0%, #bd00ff 60%, #6b0099 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)) drop-shadow(0 0 10px rgba(189,0,255,0.45));
    -webkit-text-stroke: 3px #1c0030;
}

.card-rank.K {
    background: radial-gradient(circle at 30% 30%, #80b3ff 0%, #0066ff 60%, #003d99 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)) drop-shadow(0 0 10px rgba(0,102,255,0.45));
    -webkit-text-stroke: 3px #001230;
}

.card-rank.Q {
    background: radial-gradient(circle at 30% 30%, #ff8080 0%, #ff1a1a 60%, #b30000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)) drop-shadow(0 0 10px rgba(255,26,26,0.45));
    -webkit-text-stroke: 3px #300000;
}

.card-rank.J {
    background: radial-gradient(circle at 30% 30%, #99ff99 0%, #00ff00 60%, #008000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)) drop-shadow(0 0 10px rgba(0,255,0,0.45));
    -webkit-text-stroke: 3px #002600;
}

.card-rank.T {
    background: radial-gradient(circle at 30% 30%, #ffe680 0%, #ffcc00 60%, #b38f00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)) drop-shadow(0 0 10px rgba(255,204,0,0.45));
    -webkit-text-stroke: 3px #2e2400;
}

/* Hiding generic labels underneath custom graphics to match Pragmatic slots */
.cell-label {
    display: none !important;
}

/* Money Fish specific values bubble */
.money-bubble {
    position: absolute;
    bottom: 6px;
    background: linear-gradient(135deg, #00ff66 0%, #006622 100%);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 9px;
    padding: 2px 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5), 0 0 6px rgba(0,255,102,0.4);
    letter-spacing: 0.5px;
}

/* Highlight winning cells - static border, only icon/rank pulses */
.grid-cell.win-pulse {
    z-index: 2;
}

.grid-cell.win-pulse .cell-icon,
.grid-cell.win-pulse .card-rank {
    animation: winPulse 0.4s infinite ease-in-out alternate;
}

@keyframes winPulse {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.12); filter: brightness(1.35) drop-shadow(0 0 12px var(--primary-gold)); }
}

/* STATUS MESSAGE BOX */
.status-message-box {
    text-align: center;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid rgba(255,255,255,0.03);
}

#status-text {
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-blue);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

/* BOTTOM HUD PANEL */
.control-hud {
    background: var(--panel-bg);
    border: var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px; /* Added breathing space between buttons & bars */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.control-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 200px;
}

.control-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 200px;
}

.hud-label {
    display: block;
    font-size: 10px;
    color: #4da6ff;
    letter-spacing: 1.8px;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(77, 166, 255, 0.3);
}

.bet-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bet-controls button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--neon-blue);
    background: rgba(0, 68, 102, 0.4);
    color: var(--neon-blue);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bet-controls button:hover:not(:disabled) {
    background: var(--neon-blue);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.5);
}

.bet-controls button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#bet-display {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    min-width: 60px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* BET PRESELECTOR CHIPS CONTAINER */
.bet-chips-container {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.bet-chip {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 26, 38, 0.6);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: rgba(0, 242, 254, 0.8);
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bet-chip:hover {
    border-color: var(--neon-blue);
    color: #fff;
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 4px 10px rgba(0, 242, 254, 0.4);
}

.bet-chip.active {
    background: radial-gradient(circle, #00f2fe 0%, #007799 100%);
    border-color: #fff;
    color: #000;
    font-weight: 900;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.6), 0 2px 4px rgba(0,0,0,0.4);
    transform: scale(1.05);
}

/* Circular golden/teal spin button + side-by-side toggle chips */
.control-center {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#spin-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Spinning outer dashed gold ring */
.spin-outer-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px dashed var(--primary-gold);
    box-sizing: border-box;
    animation: rotateOuterRing 15s infinite linear;
    pointer-events: none;
    transition: animation-duration 0.3s ease;
}

/* Metallic gold 3D core */
.spin-inner-core {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff 0%, #ffe680 20%, #cc9900 65%, #664d00 100%);
    border: 2px solid #997300;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5), inset 0 2px 4px rgba(255,255,255,0.6), inset 0 -4px 8px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.2s ease;
}

.spin-lightning {
    font-size: 22px;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 10px #ffcc00, 0 0 20px #ff9900;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4));
    animation: lightningPulse 1.5s infinite ease-in-out;
}

.spin-text {
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-weight: 700;
    font-size: 11px;
    color: #1a1300;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

#spin-btn:hover:not(:disabled) {
    transform: scale(1.06);
}

#spin-btn:hover:not(:disabled) .spin-outer-ring {
    animation-duration: 4s; /* Rotates faster on hover */
    border-color: #fff;
    filter: drop-shadow(0 0 6px #ffcc00);
}

#spin-btn:hover:not(:disabled) .spin-inner-core {
    background: radial-gradient(circle at 35% 35%, #fff 0%, #fff0b3 20%, #e6b800 65%, #806000 100%);
    box-shadow: 0 10px 22px rgba(0,0,0,0.6), 0 0 15px rgba(255, 204, 0, 0.4), inset 0 2px 4px rgba(255,255,255,0.8);
}

#spin-btn:active:not(:disabled) {
    transform: scale(0.92);
}

#spin-btn:active:not(:disabled) .spin-inner-core {
    box-shadow: 0 4px 8px rgba(0,0,0,0.5), inset 0 4px 8px rgba(0,0,0,0.6);
    background: radial-gradient(circle at 35% 35%, #ffe680 0%, #cc9900 40%, #806000 100%);
}

#spin-btn:disabled {
    /* Don't fully grey out in free spins - use JS class instead for that */
    filter: grayscale(0.4);
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

/* Free Spins count badge floating to the right of spin button */
.fs-count-badge {
    position: absolute;
    right: -46px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #00ff66 0%, #009933 100%);
    border: 2px solid #fff;
    border-radius: 20px;
    color: #000;
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-weight: 900;
    font-size: 13px;
    min-width: 38px;
    padding: 4px 10px;
    text-align: center;
    box-shadow: 0 0 12px rgba(0,255,102,0.7), 0 4px 8px rgba(0,0,0,0.4);
    animation: fsBadgePulse 1.4s infinite ease-in-out;
    z-index: 20;
    white-space: nowrap;
}

@keyframes fsBadgePulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0,255,102,0.5); }
    50% { box-shadow: 0 0 20px rgba(0,255,102,0.9), 0 0 30px rgba(0,255,102,0.3); }
}

/* Spinner active spin rotation */
.spin-active-spin .spin-outer-ring {
    animation: rotateOuterRing 0.4s infinite linear !important;
}

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

@keyframes lightningPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px #ffcc00); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 10px #ff9900); }
}

.win-display {
    background: rgba(0, 0, 0, 0.55);
    border: 1.5px solid var(--neon-green);
    border-radius: 12px;
    padding: 8px 16px;
    text-align: center;
    min-width: 130px;
    max-width: 170px;
    width: max-content; /* Prevent stretching across full column */
    box-shadow: inset 0 0 12px rgba(0, 255, 102, 0.15), 0 0 10px rgba(0, 255, 102, 0.05);
}

#win-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.4);
}

/* FLOATING INFO BUTTON & PAYTABLE MODAL */
.info-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 38, 59, 0.65);
    border: 1.5px solid var(--neon-blue);
    color: var(--neon-blue);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.info-btn:hover {
    background: var(--neon-blue);
    color: #000;
    transform: scale(1.12);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.6);
}

.info-modal {
    position: absolute;
    bottom: 50px;
    left: 12px;
    width: 380px;
    background: rgba(0, 20, 31, 0.95);
    border: 2px solid var(--neon-blue);
    border-radius: 16px;
    padding: 16px;
    z-index: 20;
    box-shadow: 0 15px 30px rgba(0,0,0,0.8), 0 0 20px rgba(0, 242, 254, 0.2);
    backdrop-filter: blur(16px);
    animation: slideUpFade 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
    color: #e0f2fe;
}

.info-modal.hidden {
    display: none !important;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    padding-bottom: 6px;
}

.info-modal-header h3 {
    font-family: 'Rowdies', sans-serif;
    font-size: 13px;
    color: var(--neon-blue);
    margin: 0;
    letter-spacing: 0.5px;
}

#info-close-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

#info-close-btn:hover {
    color: #fff;
}

.info-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Scrollbar for Info Modal */
.info-modal-body::-webkit-scrollbar {
    width: 6px;
}
.info-modal-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}
.info-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.3);
    border-radius: 3px;
}

.info-symbol-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-symbol-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 38, 59, 0.4);
    border-radius: 8px;
    padding: 8px;
    border: 1px solid rgba(0, 242, 254, 0.1);
}

.info-symbol-card img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.info-symbol-card span {
    font-size: 10px;
    line-height: 1.3;
}

.info-payout-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 10px;
}

.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 9px;
}

.label-gold { background: rgba(255, 204, 0, 0.15); border: 1px solid #ffcc00; color: #ffcc00; }
.label-blue { background: rgba(0, 153, 255, 0.15); border: 1px solid #0099ff; color: #0099ff; }
.label-cyan { background: rgba(0, 242, 254, 0.15); border: 1px solid #00f2fe; color: #00f2fe; }
.label-green { background: rgba(0, 255, 102, 0.15); border: 1px solid #00ff66; color: #00ff66; }
.label-grey { background: rgba(150, 150, 150, 0.15); border: 1px solid #969696; color: #b4b4b4; }

/* DIFFERENTIATED LANDING EFFECTS */
/* Normal Payout Win Matches (Golden outline glow) */
.win-match-glow {
    position: relative;
    animation: goldGlowPulse 1.2s infinite ease-in-out !important;
}

.win-match-glow img {
    animation: goldSymbolScale 1.2s infinite ease-in-out;
}

@keyframes goldGlowPulse {
    0%, 100% {
        box-shadow: inset 0 0 15px rgba(255, 204, 0, 0.2), 0 0 10px rgba(255, 204, 0, 0.15);
        border-color: rgba(255, 204, 0, 0.4);
    }
    50% {
        box-shadow: inset 0 0 25px rgba(255, 204, 0, 0.45), 0 0 20px rgba(255, 204, 0, 0.45);
        border-color: rgba(255, 204, 0, 0.9);
        background: rgba(255, 204, 0, 0.05);
    }
}

@keyframes goldSymbolScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Scatter Landing Pulse (Pink electric water bubble warp) */
.scatter-land-pulse {
    animation: scatterHitWarp 1.0s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    border-color: #ff00ff !important;
    z-index: 5;
}

@keyframes scatterHitWarp {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 0, 255, 0);
    }
    15% {
        transform: scale(1.22) rotate(-4deg);
        box-shadow: 0 0 25px rgba(255, 0, 255, 0.8);
        background: rgba(255, 0, 255, 0.15);
    }
    40% {
        transform: scale(1.15) rotate(3deg);
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
    }
    70% {
        transform: scale(1.18) rotate(-1deg);
        box-shadow: 0 0 22px rgba(255, 0, 255, 0.7);
    }
    100% {
        transform: scale(1.15);
        box-shadow: 0 0 15px rgba(255, 0, 255, 0.5), inset 0 0 10px rgba(255,0,255,0.2);
    }
}


/* BIG WIN CELEBRATION OVERLAY */
.bigwin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bigwin-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.bigwin-card {
    background: radial-gradient(circle, #002233 0%, #000810 100%);
    border: 3px solid var(--primary-gold);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    width: 85%;
    max-width: 360px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), var(--gold-glow);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.bigwin-overlay.active .bigwin-card {
    transform: scale(1);
}

#bigwin-header {
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-size: 42px;
    color: var(--primary-gold);
    margin-bottom: 8px;
    animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
    from { text-shadow: 0 0 10px rgba(255, 204, 0, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 204, 0, 0.9), 0 0 45px var(--primary-gold); }
}

#bigwin-coins {
    font-size: 48px;
    font-weight: 800;
    color: var(--neon-green);
    margin-bottom: 12px;
    text-shadow: 0 0 12px rgba(0,255,102,0.4);
}

#bigwin-close-btn {
    background: linear-gradient(135deg, #ffcc00 0%, #cc9900 100%);
    border: none;
    border-radius: 10px;
    color: #000;
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-weight: 700;
    padding: 12px 32px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
}

#bigwin-close-btn:hover {
    filter: brightness(1.15);
    transform: scale(1.05);
}

/* FREE SPINS TRIGGER OVERLAY */
.fstrigger-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 5, 12, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fstrigger-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* UTILITY FOR CONDITIONAL HIDING (e.g. Fisherman Progression track) */
.hidden {
    display: none !important;
}

.fstrigger-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 90%;
    max-width: 480px;
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fstrigger-overlay.active .fstrigger-wrapper {
    transform: scale(1);
}

.wood-sign {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.wood-plank {
    background: linear-gradient(180deg, #b07d4c 0%, #704424 40%, #4a270f 100%);
    border: 4px solid #361b0a;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.65), inset 0 3px 6px rgba(255,255,255,0.22);
    width: 100%;
    padding: 16px 20px;
    text-align: center;
    font-family: 'Rowdies', 'Outfit', 'Impact', sans-serif;
    color: #ffffff;
    text-shadow: 3px 3px 0px #210d03, 0 0 10px rgba(255,255,255,0.25);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
}

.wood-plank::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.06), rgba(0,0,0,0.06) 20px, rgba(255,255,255,0.02) 20px, rgba(255,255,255,0.02) 40px);
    pointer-events: none;
    border-radius: 10px;
}

.plank-top {
    font-size: 30px;
    font-weight: 800;
    transform: rotate(-1.5deg);
}

.plank-middle {
    font-size: 34px;
    font-weight: 900;
    transform: rotate(1.2deg);
    padding: 10px 24px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.7), inset 0 3px 6px rgba(255,255,255,0.22);
}

.plank-bottom {
    font-size: 26px;
    font-weight: 800;
    transform: rotate(-0.8deg);
}

.plank-avatar {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 5px 8px rgba(0,0,0,0.5));
    animation: floatAvatar 2s infinite ease-in-out alternate;
}

.plank-fish {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 5px 8px rgba(0,0,0,0.5));
    animation: floatAvatar 2s infinite ease-in-out alternate-reverse;
}

@keyframes floatAvatar {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-4px) scale(1.06); }
}

.plank-text {
    color: #00f3ff;
    text-shadow: 3px 3px 0px #002244, 0 0 15px rgba(0,242,254,0.65);
}

#fs-won-count {
    color: #00ff66;
    text-shadow: 3px 3px 0px #003300, 0 0 15px rgba(0,255,102,0.7);
}

.fs-explanation-card {
    background: rgba(0, 10, 20, 0.85);
    border: 1.5px solid rgba(0, 242, 254, 0.3);
    border-radius: 16px;
    padding: 16px;
    width: 100%;
    box-shadow: inset 0 0 15px rgba(0, 242, 254, 0.1), 0 8px 24px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    backdrop-filter: blur(10px);
}

.explanation-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.exp-icon {
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.exp-text {
    font-size: 11px;
    line-height: 1.5;
    color: #e0f2fe;
}

.exp-text strong {
    color: var(--neon-blue);
}

#fs-start-btn {
    background: linear-gradient(135deg, #00ff66 0%, #009933 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-weight: 700;
    padding: 14px 36px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 6px 15px rgba(0, 255, 102, 0.4);
    letter-spacing: 1px;
}

#fs-start-btn:hover {
    filter: brightness(1.15);
    transform: scale(1.05);
}

/* FREE SPINS SUMMARY OVERLAY STATS */
.fs-summary-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 10, 20, 0.85);
    border: 1.5px solid rgba(0, 242, 254, 0.25);
    border-radius: 16px;
    padding: 18px 24px;
    width: 100%;
    margin: 10px 0;
}

.summary-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.summary-stat:last-child {
    border-bottom: none;
}

.summary-total {
    padding-top: 12px;
}

.summary-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #a0c0e0;
    text-transform: uppercase;
}

.summary-value {
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
}

.summary-total .summary-value {
    font-size: 32px;
}

.summary-unit {
    font-size: 11px;
    font-weight: 700;
    color: #a0c0e0;
    letter-spacing: 1px;
    align-self: flex-end;
    padding-bottom: 4px;
}

.glow-yellow {
    color: var(--primary-gold);
    text-shadow: 0 0 12px rgba(255, 204, 0, 0.6);
}

.glow-green {
    color: var(--neon-green);
    text-shadow: 0 0 12px rgba(0, 255, 102, 0.6);
}

#fs-summary-btn {
    background: linear-gradient(135deg, #ffcc00 0%, #cc7700 100%);
    border: none;
    border-radius: 10px;
    color: #000;
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-weight: 700;
    padding: 14px 36px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 6px 15px rgba(255, 204, 0, 0.4);
    letter-spacing: 1px;
    font-size: 16px;
}

#fs-summary-btn:hover {
    filter: brightness(1.15);
    transform: scale(1.05);
}

/* Dynamic CSS Rain Particles */

.rain-coin {
    position: absolute;
    top: -25px;
    font-size: 24px;
    pointer-events: none;
    animation: rain 3s infinite linear;
}

@keyframes rain {
    0% {
        transform: translateY(0) rotate(0);
        opacity: 1;
    }
    100% {
        transform: translateY(105vh) rotate(360deg);
        opacity: 0;
    }
}

/* RESPONSIVENESS AND MOBILE ADAPTABILITY */
@media (max-width: 768px) {
    #cabinet {
        padding: 8px;
        border: 4px solid #002233;
    }
    header {
        padding: 6px 12px;
        border-radius: 12px;
    }
    .brand-text {
        font-size: 16px;
    }
    .user-profile span {
        display: none;
    }
    #balance-amount {
        font-size: 15px;
    }
    .grid-cell {
        height: 80px;
    }
    .cell-icon {
        width: 50px;
        height: 50px;
    }
    .card-rank {
        font-size: 26px;
    }
    .control-hud {
        padding: 8px 12px;
        border-radius: 14px;
    }
    #spin-btn {
        width: 65px;
        height: 65px;
        font-size: 11px;
    }
    .bet-controls button {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }
    #bet-display {
        font-size: 14px;
        min-width: 40px;
    }
    #win-amount {
        font-size: 14px;
    }
    .win-display {
        min-width: 70px;
        padding: 4px 8px;
    }
}

/* ====================================================
   TURBO SWITCH GLASSMORPHIC SYSTEM
   ==================================================== */
.turbo-container,
.auto-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(7, 18, 32, 0.7);
    border: 1px solid rgba(0, 242, 254, 0.25);
    padding: 6px 10px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    min-width: 64px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 10;
    user-select: none;
}

.turbo-container:hover,
.auto-container:hover {
    border-color: rgba(255, 204, 0, 0.4);
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.15);
}

.turbo-label {
    font-family: 'Rowdies', 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    transition: color 0.2s, text-shadow 0.2s;
}

.turbo-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    cursor: pointer;
}

.turbo-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.turbo-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #122030;
    transition: .25s ease-in-out;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.turbo-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #8fa0b5;
    transition: .25s cubic-bezier(0.25, 1, 0.5, 1.1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.turbo-switch input:checked + .turbo-slider {
    background-color: #cc6600;
    border-color: #ffaa00;
    box-shadow: 0 0 10px rgba(255, 153, 0, 0.4);
}

.turbo-switch input:checked + .turbo-slider:before {
    transform: translateX(22px);
    background-color: #ffcc00;
    box-shadow: 0 0 8px #ffcc00;
}

.turbo-switch input:checked ~ .turbo-label {
    color: #ff9900;
    text-shadow: 0 0 8px rgba(255, 153, 0, 0.6);
}

@media (max-width: 768px) {
    .turbo-container,
    .auto-container {
        min-width: 56px;
        padding: 5px 8px;
    }
}

@media (max-width: 480px) {
    .control-center {
        gap: 6px;
    }
    .turbo-container,
    .auto-container {
        min-width: 48px;
        padding: 4px 6px;
        border-radius: 8px;
    }
    .turbo-label,
    .auto-label {
        font-size: 8px;
    }
    .turbo-switch,
    .auto-switch {
        width: 34px;
        height: 18px;
    }
    .turbo-slider,
    .auto-slider {
        border-radius: 18px;
    }
    .turbo-slider:before,
    .auto-slider::before {
        height: 10px;
        width: 10px;
        left: 3px;
        bottom: 3px;
    }
    .turbo-switch input:checked + .turbo-slider:before,
    .auto-switch input:checked + .auto-slider::before {
        transform: translateX(16px);
    }
}

/* SCATTER ICONS ROW IN FSTRIGGER OVERLAY */
.scatters-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}

.scatters-row img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(0, 242, 254, 0.8)) drop-shadow(0 6px 12px rgba(0,0,0,0.6));
    animation: scatterFloat 1.8s infinite ease-in-out alternate;
}

.scatters-row img:nth-child(2) { animation-delay: 0.2s; }
.scatters-row img:nth-child(3) { animation-delay: 0.4s; }
.scatters-row img:nth-child(4) { animation-delay: 0.6s; }
.scatters-row img:nth-child(5) { animation-delay: 0.8s; }

@keyframes scatterFloat {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(-8px) scale(1.08); }
}

/* ============================================================
   BIG WIN TIER STYLING (BIG / HUGE / MEGA / EPIC / LEGEND)
   ============================================================ */
#bigwin-header.tier-big {
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.6);
}
#bigwin-header.tier-huge {
    color: #ff9933;
    font-size: 48px;
    text-shadow: 0 0 14px rgba(255, 153, 51, 0.7), 0 0 30px rgba(255, 102, 0, 0.5);
}
#bigwin-header.tier-mega {
    color: #ff3366;
    font-size: 54px;
    text-shadow: 0 0 18px rgba(255, 51, 102, 0.8), 0 0 36px rgba(255, 0, 102, 0.6);
    animation: pulseGlow 0.9s infinite alternate;
}
#bigwin-header.tier-epic {
    background: linear-gradient(90deg, #ff00cc, #ffcc00, #00ffaa, #ff00cc);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 60px;
    animation: epicShimmer 2s infinite linear, pulseGlow 0.6s infinite alternate;
}
#bigwin-header.tier-legend {
    background: linear-gradient(90deg, #ffd700, #ff4500, #ffd700, #ffffff, #ffd700);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 68px;
    animation: epicShimmer 1.4s infinite linear, legendShake 0.18s infinite;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.9);
}

@keyframes epicShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
@keyframes legendShake {
    0%, 100% { transform: translate(0,0) rotate(0); }
    25% { transform: translate(-2px, 1px) rotate(-1deg); }
    50% { transform: translate(2px, -1px) rotate(1deg); }
    75% { transform: translate(-1px, 2px) rotate(-0.5deg); }
}

/* ============================================================
   COLLECTION SEQUENCE (grid dim + highlight + bubble fly)
   ============================================================ */
.reels-viewport.grid-dim .reel-column {
    filter: brightness(0.42) saturate(0.55);
    transition: filter 0.25s ease;
}
.reels-viewport.grid-dim .grid-cell.collect-highlight {
    filter: none !important;
}
.grid-cell.collect-highlight {
    z-index: 3;
}
.grid-cell.collect-highlight::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 3px solid #ffaa00;
    border-radius: 10px;
    box-shadow: 0 0 18px 4px rgba(255, 170, 0, 0.85), inset 0 0 10px rgba(255, 204, 0, 0.6);
    pointer-events: none;
    animation: collectPulse 0.7s infinite alternate;
}
@keyframes collectPulse {
    0% { box-shadow: 0 0 14px 2px rgba(255, 170, 0, 0.7), inset 0 0 8px rgba(255, 204, 0, 0.4); }
    100% { box-shadow: 0 0 24px 6px rgba(255, 220, 0, 1), inset 0 0 14px rgba(255, 220, 0, 0.8); }
}

.money-bubble.bubble-pop {
    transform: scale(1.35);
    transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: linear-gradient(135deg, #ffe680 0%, #ffaa00 100%);
    color: #2a1700;
    box-shadow: 0 0 16px rgba(255, 204, 0, 0.95);
}
.money-bubble.bubble-fly {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.55, 0, 0.55, 1), opacity 0.5s ease;
}

/* Money bubble dimmed slightly in base game (multiplier shown for UX, not paid). */
body.bigbass-base-game .money-bubble {
    opacity: 0.78;
}

/* ============================================================
   FISHERMAN PROGRESSION PARTICLE (bubble flies to progress bar)
   ============================================================ */
.fisherman-particle {
    position: fixed;
    z-index: 9998;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffe680 0%, #ff9900 60%, #cc6600 100%);
    box-shadow: 0 0 18px 6px rgba(255, 170, 0, 0.9), 0 0 30px 12px rgba(255, 204, 0, 0.5);
    pointer-events: none;
    transition: transform 0.7s cubic-bezier(0.55, 0, 0.45, 1), opacity 0.7s ease;
}

/* ============================================================
   MULTIPLIER QUEUE RETRIGGER OVERLAY
   ============================================================ */
#retrigger-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(60, 0, 80, 0.85) 0%, rgba(0, 0, 0, 0.95) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.3s ease;
}
#retrigger-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.retrigger-headline {
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-size: 62px;
    font-weight: 900;
    color: #ffcc00;
    text-shadow: 0 0 20px #ff6600, 0 0 40px #cc3300;
    letter-spacing: 4px;
    animation: retriggerShake 0.12s infinite, pulseGlow 0.6s infinite alternate;
    margin-bottom: 18px;
    text-align: center;
}
.retrigger-detail {
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-size: 24px;
    color: #fff;
    text-shadow: 0 0 8px #ffcc00;
    text-align: center;
}
.retrigger-detail strong {
    color: #ffcc00;
    font-size: 30px;
}
@keyframes retriggerShake {
    0% { transform: translate(0,0); }
    25% { transform: translate(-3px, 1px); }
    50% { transform: translate(3px, -2px); }
    75% { transform: translate(-2px, 3px); }
    100% { transform: translate(0,0); }
}

/* ============================================================
   DYNAMITE FAIL-SAFE ANIMATION
   ============================================================ */
.dynamite-particle {
    position: fixed;
    z-index: 9998;
    font-size: 48px;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.5, -0.5, 0.5, 1.5), opacity 0.3s ease;
    text-shadow: 0 0 12px #ff0000, 0 0 24px #cc0000;
}
.grid-section.dynamite-flash {
    animation: dynamiteFlash 0.4s ease-out;
}
@keyframes dynamiteFlash {
    0% { box-shadow: inset 0 0 40px rgba(0,0,0,0.9), 0 0 20px rgba(0, 242, 254, 0.1); }
    30% { box-shadow: inset 0 0 80px rgba(255, 80, 0, 0.85), 0 0 60px rgba(255, 100, 0, 0.9); background: rgba(80, 20, 0, 0.4); }
    100% { box-shadow: inset 0 0 40px rgba(0,0,0,0.9), 0 0 20px rgba(0, 242, 254, 0.1); }
}
.smoke-puff {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle, rgba(180, 180, 180, 0.95) 0%, rgba(80, 80, 80, 0.6) 50%, transparent 80%);
    border-radius: 50%;
    animation: smokeFade 0.6s ease-out forwards;
    z-index: 4;
}
@keyframes smokeFade {
    0% { opacity: 1; transform: scale(0.4); }
    50% { opacity: 0.85; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(1.4); }
}

/* ============================================================
   FISHERMAN TIER TINTING (no asset swap - CSS filter only)
   ============================================================ */
.fisherman-tier-2 .cell-icon img[src*="fisherman"],
.cell-icon img.fisherman-tier-2 {
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.6)) hue-rotate(190deg) saturate(1.4) drop-shadow(0 0 8px #00aaff);
}
.fisherman-tier-3 .cell-icon img[src*="fisherman"],
.cell-icon img.fisherman-tier-3 {
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.6)) hue-rotate(260deg) saturate(1.5) drop-shadow(0 0 10px #aa00ff);
}
.fisherman-tier-10 .cell-icon img[src*="fisherman"],
.cell-icon img.fisherman-tier-10 {
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.6)) hue-rotate(40deg) saturate(2) brightness(1.2) drop-shadow(0 0 14px #ffcc00);
}

body.fs-tier-2 #bubble-bg,
body.fs-tier-2 .grid-section {
    filter: hue-rotate(25deg) saturate(1.2);
    transition: filter 1.5s ease;
}
body.fs-tier-3 #bubble-bg,
body.fs-tier-3 .grid-section {
    filter: hue-rotate(55deg) saturate(1.3);
    transition: filter 1.5s ease;
}
body.fs-tier-10 #bubble-bg,
body.fs-tier-10 .grid-section {
    filter: hue-rotate(-25deg) saturate(1.5) brightness(1.1);
    transition: filter 1.5s ease;
}

/* Insufficient-balance affordability indicators. */
#spin-btn.disabled-broke .spin-inner-core {
    filter: grayscale(0.8) brightness(0.7);
    cursor: not-allowed;
}
#spin-btn.disabled-broke .spin-outer-ring {
    border-color: #ff3366;
    animation-duration: 60s;
}
#bet-display.bet-warning {
    color: #ff3366;
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.6);
    animation: pulseGlow 0.8s infinite alternate;
}

/* MAX bet chip — visually distinct from the numeric chips. */
.bet-chip.max-chip {
    background: linear-gradient(135deg, #ff9933 0%, #cc3300 100%);
    color: #fff;
    font-weight: 900;
    letter-spacing: 1px;
    border-color: #ffaa00;
}
.bet-chip.max-chip:hover {
    filter: brightness(1.15);
}

/* Bonus-trigger callout — sits above the wood-sign card so it's the first thing players read */
.fs-trigger-callout {
    font-family: 'Rowdies', 'Impact', sans-serif;
    font-size: 38px;
    font-weight: 900;
    color: #ffcc00;
    text-shadow: 0 0 14px rgba(255, 204, 0, 0.85), 0 0 30px rgba(255, 102, 0, 0.6);
    letter-spacing: 2px;
    text-align: center;
    margin: 8px 0 12px 0;
    animation: pulseGlow 0.8s infinite alternate;
}
#fs-scatter-count {
    color: #fff;
    font-size: 48px;
    text-shadow: 0 0 18px #fff, 0 0 30px #ffcc00;
}

/* ============================================================
   AUTO + SOUND toggles — visually identical to TURBO chip.
   .auto-container layout/box is unified with .turbo-container above.
   ============================================================ */
.auto-label {
    font-family: 'Rowdies', 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    transition: color 0.2s, text-shadow 0.2s;
    white-space: nowrap;
}
.auto-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    cursor: pointer;
}
.auto-switch input { opacity: 0; width: 0; height: 0; }
.auto-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #122030;
    transition: .25s ease-in-out;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}
.auto-slider::before {
    position: absolute;
    content: '';
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #8fa0b5;
    transition: .25s cubic-bezier(0.25, 1, 0.5, 1.1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.auto-switch input:checked + .auto-slider {
    background-color: #007733;
    border-color: #00ff66;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.4);
}
.auto-switch input:checked + .auto-slider::before {
    transform: translateX(22px);
    background-color: #00ff66;
    box-shadow: 0 0 8px #00ff66;
}
.auto-switch input:checked ~ .auto-label {
    color: #00ff99;
    text-shadow: 0 0 8px rgba(0, 255, 102, 0.6);
}

/* Sound toggle uses the same .auto-* skin but with a teal accent when active. */
#sound-toggle:checked + .auto-slider {
    background-color: #005577;
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}
#sound-toggle:checked + .auto-slider::before {
    background-color: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue);
}
