    /* ============ RESET & BASE ============ */
    * { 
        margin: 0; 
        padding: 0; 
        box-sizing: border-box; 
    }
    
    body {
        font-family: 'Orbitron', sans-serif;
        background: #000;
        color: white;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
    }
    
    /* ============ MAIN CONTAINER ============ */
    .slot-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #000;
        display: flex;
        flex-direction: row;
    }
    
    /* ============ VIDEO BACKGROUND ============ */
    .background-video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
    }
    
    .fallback-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
    }

    /* ============ GAME LAYOUT: LEFT = SLOT, RIGHT = CONTROLS ============ */
    .game-left-panel {
        position: relative;
        z-index: 10;
        width: 55%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .game-right-panel {
        position: relative;
        z-index: 10;
        width: 45%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 20px 30px;
        gap: 16px;
    }

    /* ============ TOP LEFT: BALANCE, MODE & INFO ============ */
    .top-controls {
        position: absolute;
        top: 20px;
        left: 20px;
        z-index: 20;
        background: rgba(10, 5, 0, 0.6);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 12px 18px;
        border-radius: 14px;
        border: 1px solid rgba(255, 215, 0, 0.25);
        box-shadow: 0 0 20px rgba(184, 134, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
        display: flex;
        gap: 20px;
        align-items: center;
    }
    
    .balance-display {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 18px;
        font-weight: bold;
        color: #FFD700;
        text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    }
    
    .balance-display i {
        color: #39FF14;
        text-shadow: 0 0 6px #39FF14;
    }
    
    .mode-container {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    #modeText {
        color: #FFD700;
        font-weight: bold;
        font-size: 14px;
        text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    
    /* Info icon for rules */
    .info-icon {
        background: none;
        border: none;
        color: #FFD700;
        font-size: 24px;
        cursor: pointer;
        padding: 5px;
        transition: transform 0.2s;
        text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    
    .info-icon:hover {
        transform: scale(1.2);
        color: #fff;
        text-shadow: 0 0 15px #FFD700;
    }
    
    /* Toggle Switch */
    .switch {
        position: relative;
        display: inline-block;
        width: 54px;
        height: 28px;
    }
    
    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }
    
    .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(30, 15, 0, 0.8);
        transition: .3s;
        border-radius: 34px;
        border: 2px solid #B8860B;
        box-shadow: 0 0 8px rgba(184, 134, 11, 0.3);
    }
    
    .slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 3px;
        bottom: 3px;
        background: linear-gradient(135deg, #FFD700, #B8860B);
        transition: .3s;
        border-radius: 50%;
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    }
    
    input:checked + .slider {
        background-color: rgba(60, 30, 0, 0.8);
        border-color: #FFD700;
    }
    
    input:checked + .slider:before {
        transform: translateX(24px);
        background: linear-gradient(135deg, #39FF14, #00CC00);
        box-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
    }
    
    /* ============ REELS CONTAINER ============ */
    #slotReels {
        width: 85%;
        aspect-ratio: 1 / 1;
        max-height: 75vh;
        max-width: 75vh;
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 16px;
        padding: 8px;
        border: 1px solid rgba(255, 215, 0, 0.15);
        box-shadow: 
            0 0 40px rgba(184, 134, 11, 0.1),
            inset 0 0 30px rgba(0, 0, 0, 0.5);
    }
    
    /* ============ REEL ROWS ============ */
    .paid-reel-row {
        display: flex;
        gap: 4px;
        flex: 1;
    }
    
    /* ============ INDIVIDUAL REELS ============ */
    .paid-reel {
        flex: 1;
        border: 0px solid transparent;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background: rgba(10, 5, 0, 0.3);
        transition: all 0.3s ease;
    }
    
    .slot-symbol {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    /* ============ GLAMOROUS CSS GAME BUTTONS ============ */
    .game-btn {
        position: relative;
        border: none;
        cursor: pointer;
        font-family: 'Orbitron', sans-serif;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 2px;
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    /* Mirror/glass reflection overlay */
    .game-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            120deg,
            transparent 30%,
            rgba(255, 255, 255, 0.15) 38%,
            rgba(255, 255, 255, 0.25) 40%,
            rgba(255, 255, 255, 0.15) 42%,
            transparent 50%
        );
        transition: left 0.6s ease;
        z-index: 2;
    }

    .game-btn:hover::before {
        left: 100%;
    }

    /* Glow ring on hover */
    .game-btn::after {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        border-radius: inherit;
        background: linear-gradient(45deg, #FFD700, #B8860B, #FFD700, #DAA520);
        background-size: 300% 300%;
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
        animation: borderGlow 3s ease infinite;
    }

    .game-btn:hover::after {
        opacity: 1;
    }

    @keyframes borderGlow {
        0%, 100% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
    }

    /* ---- SPIN BUTTON ---- */
    .spin-btn {
        width: 100%;
        padding: 20px 30px;
        font-size: 22px;
        border-radius: 16px;
        background: linear-gradient(180deg, #FFD700 0%, #B8860B 40%, #8B6914 100%);
        color: #1a0a00;
        box-shadow: 
            0 6px 20px rgba(255, 215, 0, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            inset 0 -2px 0 rgba(0, 0, 0, 0.2);
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    }

    .spin-btn:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 
            0 10px 30px rgba(255, 215, 0, 0.6),
            0 4px 8px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 0 40px rgba(255, 215, 0, 0.3);
    }

    .spin-btn:active {
        transform: translateY(1px) scale(0.98);
        box-shadow: 
            0 2px 8px rgba(255, 215, 0, 0.3),
            inset 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .spin-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        filter: grayscale(0.5);
    }

    .spin-btn i {
        margin-right: 8px;
        font-size: 20px;
    }

    /* ---- AUTO SPIN BUTTON ---- */
    .auto-btn {
        flex: 1;
        padding: 14px 16px;
        font-size: 11px;
        border-radius: 12px;
        background: linear-gradient(180deg, rgba(255, 215, 0, 0.15) 0%, rgba(184, 134, 11, 0.25) 100%);
        color: #FFD700;
        border: 1px solid rgba(255, 215, 0, 0.3);
        box-shadow: 
            0 4px 15px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(8px);
    }

    .auto-btn:hover {
        transform: translateY(-2px);
        background: linear-gradient(180deg, rgba(255, 215, 0, 0.25) 0%, rgba(184, 134, 11, 0.35) 100%);
        box-shadow: 
            0 6px 20px rgba(255, 215, 0, 0.2),
            0 0 20px rgba(255, 215, 0, 0.1);
        border-color: rgba(255, 215, 0, 0.5);
    }

    .auto-btn.auto-play-active {
        background: linear-gradient(180deg, rgba(57, 255, 20, 0.2) 0%, rgba(0, 200, 0, 0.3) 100%);
        border-color: rgba(57, 255, 20, 0.5);
        color: #39FF14;
        box-shadow: 
            0 0 20px rgba(57, 255, 20, 0.2),
            inset 0 0 10px rgba(57, 255, 20, 0.05);
        animation: autoPlayPulse 2s ease-in-out infinite;
    }

    @keyframes autoPlayPulse {
        0%, 100% { box-shadow: 0 0 20px rgba(57, 255, 20, 0.2); }
        50% { box-shadow: 0 0 30px rgba(57, 255, 20, 0.4), 0 0 60px rgba(57, 255, 20, 0.1); }
    }

    .auto-btn i {
        margin-right: 6px;
    }

    /* ---- SPEED BUTTON ---- */
    .speed-btn {
        flex: 1;
        padding: 14px 16px;
        font-size: 11px;
        border-radius: 12px;
        background: linear-gradient(180deg, rgba(255, 215, 0, 0.15) 0%, rgba(184, 134, 11, 0.25) 100%);
        color: #FFD700;
        border: 1px solid rgba(255, 215, 0, 0.3);
        box-shadow: 
            0 4px 15px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(8px);
    }

    .speed-btn:hover {
        transform: translateY(-2px);
        background: linear-gradient(180deg, rgba(255, 215, 0, 0.25) 0%, rgba(184, 134, 11, 0.35) 100%);
        box-shadow: 
            0 6px 20px rgba(255, 215, 0, 0.2),
            0 0 20px rgba(255, 215, 0, 0.1);
        border-color: rgba(255, 215, 0, 0.5);
    }

    .speed-btn.speed-fast {
        background: linear-gradient(180deg, rgba(255, 100, 0, 0.2) 0%, rgba(200, 50, 0, 0.3) 100%);
        border-color: rgba(255, 140, 0, 0.5);
        color: #FF8C00;
    }

    .speed-btn i {
        margin-right: 6px;
    }

    /* ---- INFO BUTTON ---- */
    .info-btn {
        padding: 14px 16px;
        font-size: 11px;
        border-radius: 12px;
        background: linear-gradient(180deg, rgba(255, 215, 0, 0.15) 0%, rgba(184, 134, 11, 0.25) 100%);
        color: #FFD700;
        border: 1px solid rgba(255, 215, 0, 0.3);
        box-shadow: 
            0 4px 15px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(8px);
    }

    .info-btn:hover {
        transform: translateY(-2px);
        background: linear-gradient(180deg, rgba(255, 215, 0, 0.25) 0%, rgba(184, 134, 11, 0.35) 100%);
        box-shadow: 
            0 6px 20px rgba(255, 215, 0, 0.2),
            0 0 20px rgba(255, 215, 0, 0.1);
        border-color: rgba(255, 215, 0, 0.5);
    }

    .info-btn i {
        margin-right: 6px;
    }

    /* ---- BUTTON ROW ---- */
    .btn-row {
        display: flex;
        gap: 10px;
    }

    /* ============ RIGHT PANEL CONTROLS ============ */
    .controls-wrapper {
        display: flex;
        flex-direction: column;
        gap: 14px;
        background: rgba(10, 5, 0, 0.6);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-radius: 20px;
        padding: 24px;
        border: 1px solid rgba(255, 215, 0, 0.15);
        box-shadow: 
            0 0 40px rgba(184, 134, 11, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    /* ============ SLIDER GROUPS ============ */
    .slider-group {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .slider-label-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .slider-title {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: rgba(255, 215, 0, 0.7);
        font-family: 'Orbitron', sans-serif;
    }

    .slider-title i {
        margin-right: 4px;
        font-size: 10px;
    }

    .slider-value {
        font-size: 16px;
        font-weight: 900;
        color: #fff;
        font-family: 'Orbitron', sans-serif;
        text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    }

    .slider-value.rr-value {
        color: #FFD700;
        text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    }

    .slider-track-wrapper {
        position: relative;
        padding: 4px 0;
    }

    /* ---- BET SLIDER ---- */
    .bet-slider-track {
        position: relative;
        width: 100%;
        height: 6px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        cursor: pointer;
        overflow: visible;
    }

    #betSliderFill, .rr-fill {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        background: linear-gradient(90deg, #B8860B, #FFD700);
        border-radius: 8px;
        pointer-events: none;
        box-shadow: 0 0 10px rgba(184, 134, 11, 0.4);
        width: 0%;
        transition: width 0.1s ease;
    }

    .rr-fill {
        background: linear-gradient(90deg, #B8860B, #FFD700, #39FF14);
    }

    .slider-thumb, .rr-thumb {
        position: absolute;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 20px;
        height: 20px;
        background: radial-gradient(circle at 40% 40%, #FFD700, #B8860B);
        border: 2px solid #fff;
        border-radius: 50%;
        cursor: grab;
        z-index: 10;
        box-shadow: 0 0 12px rgba(255, 215, 0, 0.6), 0 0 4px #fff;
        transition: box-shadow 0.2s, transform 0.15s;
    }

    .rr-thumb {
        background: radial-gradient(circle at 40% 40%, #66ccff, #0088cc);
    }

    .slider-thumb:hover,
    .slider-thumb.dragging,
    .rr-thumb:hover,
    .rr-thumb.dragging {
        cursor: grabbing;
        transform: translate(-50%, -50%) scale(1.2);
        box-shadow: 0 0 24px rgba(255, 215, 0, 0.9), 0 0 8px #fff;
    }

    /* ---- RISK/REWARD SLIDER ---- */
    .rr-slider-track {
        position: relative;
        width: 100%;
        height: 6px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        cursor: pointer;
        overflow: visible;
    }

    .slider-range-labels {
        display: flex;
        justify-content: space-between;
        font-size: 9px;
        color: rgba(255, 255, 255, 0.35);
        font-weight: 600;
        font-family: 'Orbitron', sans-serif;
    }

    /* ---- COMPACT MULTIPLIER BAR ---- */
    .multiplier-compact {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .multiplier-compact-label {
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        color: rgba(255, 215, 0, 0.6);
        font-family: 'Orbitron', sans-serif;
        white-space: nowrap;
    }

    .multiplier-compact-label i {
        margin-right: 3px;
    }

    .multiplier-compact-bar {
        flex: 1;
        height: 6px;
        background: rgba(255, 255, 255, 0.06);
        border-radius: 6px;
        position: relative;
        overflow: hidden;
    }

    .multiplier-compact-bar .multiplier-bar-fill {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        border-radius: 6px;
        width: 0%;
        background: linear-gradient(90deg, #B8860B 0%, #FFD700 30%, #39FF14 60%, #FF6600 80%, #FF0044 100%);
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
        transition: width 0.15s ease;
    }

    .multiplier-compact-bar .multiplier-bar-fill.animating {
        transition: width 0.08s linear;
        animation: multiplierPulse 0.3s infinite;
    }

    .multiplier-compact-value {
        font-size: 14px;
        font-weight: 900;
        color: #39FF14;
        font-family: 'Orbitron', sans-serif;
        text-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
        min-width: 50px;
        text-align: right;
        transition: all 0.3s ease;
    }

    /* Multiplier value color states */
    .multiplier-compact-value.tier-low { color: #FFD700; text-shadow: 0 0 12px rgba(255, 215, 0, 0.6); }
    .multiplier-compact-value.tier-mid { color: #39FF14; text-shadow: 0 0 12px rgba(57, 255, 20, 0.6); }
    .multiplier-compact-value.tier-high { color: #FFFF00; text-shadow: 0 0 12px rgba(255, 255, 0, 0.6); }
    .multiplier-compact-value.tier-epic { color: #FF6600; text-shadow: 0 0 12px rgba(255, 102, 0, 0.6); }
    .multiplier-compact-value.tier-legendary { color: #FF0044; text-shadow: 0 0 16px rgba(255, 0, 68, 0.8); font-size: 16px; }

    @keyframes multiplierPulse {
        0%, 100% { opacity: 0.8; }
        50% { opacity: 1; }
    }

    /* ---- LAST WIN DISPLAY ---- */
    .last-win-display {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 25;
        display: flex;
        align-items: center;
        gap: 6px;
        background: rgba(10, 5, 0, 0.85);
        backdrop-filter: blur(8px);
        padding: 8px 16px;
        border-radius: 20px;
        border: 1px solid rgba(255, 215, 0, 0.4);
        font-family: 'Orbitron', sans-serif;
        font-size: 12px;
        color: rgba(255, 255, 255, 0.7);
        letter-spacing: 1px;
        animation: lastWinFadeIn 0.5s ease;
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
    }

    .last-win-display i {
        color: #FFD700;
        font-size: 12px;
    }

    .last-win-amount {
        color: #39FF14;
        font-weight: 900;
        font-size: 13px;
        text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
    }

    @keyframes lastWinFadeIn {
        from { opacity: 0; transform: translateX(-50%) translateY(10px); }
        to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }
    
    /* ============ WIN POPUP SYSTEM ============ */
    .win-popup-overlay {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1000;
        font-family: 'Orbitron', sans-serif;
        animation: winPopupEntry 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }

    .win-popup-overlay.win-popup-exit {
        animation: winPopupExit 0.4s ease-in forwards;
    }

    .win-popup-card {
        position: relative;
        background: radial-gradient(ellipse at center, rgba(30, 20, 0, 0.97) 0%, rgba(10, 5, 0, 0.98) 100%);
        border: 2px solid rgba(255, 215, 0, 0.6);
        border-radius: 24px;
        padding: 36px 48px;
        text-align: center;
        overflow: hidden;
        min-width: 300px;
        backdrop-filter: blur(20px);
    }

    .win-popup-glow {
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle at center, rgba(255, 215, 0, 0.15) 0%, transparent 60%);
        animation: glowRotate 4s linear infinite;
        pointer-events: none;
    }

    .win-popup-ring {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 120%;
        height: 120%;
        transform: translate(-50%, -50%);
        border: 1px solid rgba(255, 215, 0, 0.2);
        border-radius: 50%;
        animation: ringPulse 2s ease-in-out infinite;
        pointer-events: none;
    }

    .win-popup-ring.ring-2 {
        width: 140%;
        height: 140%;
        animation-delay: 0.5s;
        border-color: rgba(184, 134, 11, 0.15);
    }

    .win-popup-particles {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: 
            radial-gradient(2px 2px at 20% 30%, rgba(255, 215, 0, 0.8), transparent),
            radial-gradient(2px 2px at 80% 20%, rgba(184, 134, 11, 0.8), transparent),
            radial-gradient(2px 2px at 40% 80%, rgba(255, 200, 50, 0.8), transparent),
            radial-gradient(2px 2px at 70% 60%, rgba(255, 215, 0, 0.8), transparent);
        animation: particleFloat 3s ease-in-out infinite;
        pointer-events: none;
    }

    .win-popup-icon {
        position: relative;
        z-index: 2;
        margin-bottom: 8px;
    }

    .win-popup-icon img {
        width: 64px;
        height: 64px;
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
        animation: iconBounce 1.5s ease-in-out infinite;
    }

    .win-popup-icon.bonus-icon {
        font-size: 48px;
        filter: drop-shadow(0 0 20px rgba(255, 140, 0, 0.8));
        animation: iconBounce 1.5s ease-in-out infinite;
    }

    .win-popup-icon.total-icon {
        font-size: 56px;
        filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.9));
        animation: iconBounce 1.2s ease-in-out infinite;
    }

    .win-popup-title {
        position: relative;
        z-index: 2;
        font-size: 32px;
        font-weight: 900;
        color: #FFD700;
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(184, 134, 11, 0.4);
        letter-spacing: 3px;
        margin-bottom: 12px;
        animation: titleShimmer 2s ease-in-out infinite;
    }

    .win-popup-amount {
        position: relative;
        z-index: 2;
        font-size: 44px;
        font-weight: 900;
        color: #39FF14;
        text-shadow: 0 0 30px rgba(57, 255, 20, 0.8), 0 0 60px rgba(57, 255, 20, 0.3);
        letter-spacing: 2px;
        animation: amountPulse 1.5s ease-in-out infinite;
    }

    .win-popup-label {
        position: relative;
        z-index: 2;
        font-size: 11px;
        letter-spacing: 4px;
        color: rgba(255, 255, 255, 0.4);
        margin-top: 8px;
        text-transform: uppercase;
    }

    .win-popup-sparks {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        overflow: hidden;
    }

    .spark {
        position: absolute;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: #FFD700;
        box-shadow: 0 0 6px #FFD700;
        animation: sparkFly 2s ease-out infinite;
    }

    .spark:nth-child(1) { top: 50%; left: 50%; animation-delay: 0s; --spark-angle: 30deg; }
    .spark:nth-child(2) { top: 50%; left: 50%; animation-delay: 0.3s; --spark-angle: 90deg; }
    .spark:nth-child(3) { top: 50%; left: 50%; animation-delay: 0.6s; --spark-angle: 150deg; }
    .spark:nth-child(4) { top: 50%; left: 50%; animation-delay: 0.9s; --spark-angle: 210deg; }
    .spark:nth-child(5) { top: 50%; left: 50%; animation-delay: 1.2s; --spark-angle: 270deg; }
    .spark:nth-child(6) { top: 50%; left: 50%; animation-delay: 1.5s; --spark-angle: 330deg; }

    /* ---- Bonus Theme ---- */
    .win-popup-card.bonus-theme {
        border-color: rgba(255, 140, 0, 0.6);
        background: radial-gradient(ellipse at center, rgba(40, 20, 0, 0.97) 0%, rgba(15, 5, 0, 0.98) 100%);
    }

    .bonus-glow { background: radial-gradient(circle at center, rgba(255, 140, 0, 0.15) 0%, transparent 60%); }
    .bonus-ring { border-color: rgba(255, 140, 0, 0.25) !important; }
    .bonus-title-text { color: #FF8C00 !important; text-shadow: 0 0 20px rgba(255, 140, 0, 0.8) !important; }
    .bonus-amount { color: #FFD700 !important; text-shadow: 0 0 30px rgba(255, 215, 0, 0.8) !important; }

    /* ---- Total Theme ---- */
    .win-popup-card.total-theme {
        border-color: rgba(255, 215, 0, 0.6);
        background: radial-gradient(ellipse at center, rgba(30, 25, 0, 0.97) 0%, rgba(10, 5, 0, 0.98) 100%);
        padding: 30px 40px;
    }

    .total-glow { background: radial-gradient(circle at center, rgba(255, 215, 0, 0.12) 0%, transparent 60%); }
    .total-ring { border-color: rgba(255, 215, 0, 0.2) !important; }
    .total-title-text { color: #FFD700 !important; text-shadow: 0 0 25px rgba(255, 215, 0, 0.8) !important; }

    .total-win-breakdown {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
    }

    .total-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 16px;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 700;
    }

    .total-row.first-row {
        background: rgba(255, 215, 0, 0.1);
        border: 1px solid rgba(255, 215, 0, 0.3);
    }

    .total-row.first-row .total-row-label { color: rgba(255, 215, 0, 0.7); }
    .total-row.first-row .total-row-value { color: #FFD700; text-shadow: 0 0 8px rgba(255, 215, 0, 0.5); }

    .total-row.bonus-row {
        background: rgba(255, 140, 0, 0.1);
        border: 1px solid rgba(255, 140, 0, 0.3);
    }

    .total-row.bonus-row .total-row-label { color: rgba(255, 140, 0, 0.7); }
    .total-row.bonus-row .total-row-value { color: #FF8C00; text-shadow: 0 0 8px rgba(255, 140, 0, 0.5); }

    .total-divider {
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
        margin: 4px 0;
    }

    .total-amount-value {
        font-size: 36px !important;
        color: #FFD700 !important;
        text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.3) !important;
    }

    /* ---- Bonus Unlocked Popup ---- */
    .bonus-popup-overlay {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 9999;
        font-family: 'Orbitron', sans-serif;
        animation: winPopupEntry 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        pointer-events: none;
    }

    .bonus-popup-overlay.bonus-popup-exit {
        animation: winPopupExit 0.4s ease-in forwards;
    }

    .bonus-popup-card {
        position: relative;
        background: radial-gradient(ellipse at center, rgba(40, 20, 0, 0.95) 0%, rgba(10, 5, 0, 0.98) 100%);
        border: 2px solid rgba(255, 215, 0, 0.6);
        border-radius: 20px;
        padding: 30px 50px;
        text-align: center;
        overflow: hidden;
    }

    .bonus-popup-glow {
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle at center, rgba(255, 215, 0, 0.15) 0%, transparent 60%);
        animation: glowRotate 3s linear infinite;
        pointer-events: none;
    }

    .bonus-popup-ring {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 130%;
        height: 130%;
        transform: translate(-50%, -50%);
        border: 1px solid rgba(255, 215, 0, 0.2);
        border-radius: 50%;
        animation: ringPulse 1.5s ease-in-out infinite;
        pointer-events: none;
    }

    .bonus-popup-icon {
        font-size: 48px;
        margin-bottom: 8px;
        animation: iconBounce 1s ease-in-out infinite;
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    }

    .bonus-popup-title {
        font-size: 28px;
        font-weight: 900;
        color: #FFD700;
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
        letter-spacing: 3px;
        margin-bottom: 6px;
    }

    .bonus-popup-subtitle {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.6);
        letter-spacing: 1px;
    }

    /* ---- Popup Animations ---- */
    @keyframes winPopupEntry {
        0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
        60% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
        100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    }

    @keyframes winPopupExit {
        0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
        100% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
    }

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

    @keyframes ringPulse {
        0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
        50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.6; }
    }

    @keyframes particleFloat {
        0%, 100% { transform: translateY(0); opacity: 0.6; }
        50% { transform: translateY(-8px); opacity: 1; }
    }

    @keyframes iconBounce {
        0%, 100% { transform: translateY(0) scale(1); }
        50% { transform: translateY(-6px) scale(1.05); }
    }

    @keyframes titleShimmer {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.85; text-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 60px rgba(184, 134, 11, 0.4); }
    }

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

    @keyframes sparkFly {
        0% { transform: translate(0, 0) scale(1); opacity: 1; }
        100% { 
            transform: translate(
                calc(cos(var(--spark-angle)) * 120px), 
                calc(sin(var(--spark-angle)) * 120px)
            ) scale(0);
            opacity: 0;
        }
    }

/* Banana Rain Effect for Big Wins */
#banana-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
    overflow: hidden;
    display: none;
}

.banana {
    position: absolute;
    font-size: 30px;
    top: -50px;
    animation: bananaFall linear forwards;
    z-index: 9997;
}

@keyframes bananaFall {
    to {
        transform: translateY(calc(100vh + 50px)) rotate(360deg);
    }
}

/* Win Transition Effect */
.win-transition {
    animation: winFlash 0.5s ease-out;
}

@keyframes winFlash {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.5); }
    100% { filter: brightness(1); }
}

/* Flying Symbol Animation */
.flying-symbol {
    position: fixed;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

/* Column Glow Effect */
.column-glowing {
    border-left: 3px solid #FFD700 !important;
    border-right: 3px solid #FFD700 !important;
    box-shadow: 
        inset 0 0 20px rgba(255, 215, 0, 0.4),
        0 0 25px rgba(255, 215, 0, 0.7) !important;
    animation: columnGlow 1s infinite alternate !important;
}

@keyframes columnGlow {
    from { 
        border-left-color: #FFD700;
        border-right-color: #FFD700;
        box-shadow: 
            inset 0 0 15px rgba(255, 215, 0, 0.3),
            0 0 20px rgba(255, 215, 0, 0.5);
    }
    to { 
        border-left-color: #39FF14;
        border-right-color: #39FF14;
        box-shadow: 
            inset 0 0 25px rgba(57, 255, 20, 0.6),
            0 0 30px rgba(57, 255, 20, 0.9);
    }
}

/* Machine Glow during Spin */
.machine-glowing {
    box-shadow: 
        0 0 20px #FFD700,
        0 0 40px #B8860B,
        0 0 60px #39FF14 !important;
    transition: box-shadow 0.3s ease;
}

/* Button Glow during Win */
.button-glowing {
    animation: buttonPulse 1s infinite alternate;
    box-shadow: 0 0 20px #FFD700 !important;
}

@keyframes buttonPulse {
    from { box-shadow: 0 0 10px #FFD700; }
    to { box-shadow: 0 0 30px #FFD700, 0 0 40px #B8860B; }
}

/* Anticipation Effect */
.anticipation {
    animation: anticipationPulse 0.5s infinite;
}

@keyframes anticipationPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

/* Pattern Effects */
.pattern-horizontal .paid-reel-row:first-child .paid-reel {
    animation: rowGlow 1s infinite alternate;
}

.pattern-vertical .paid-reel {
    animation: columnPulse 1s infinite alternate;
}

.pattern-diagonal .paid-reel {
    animation: diagonalShimmer 1.5s infinite alternate;
}

@keyframes rowGlow {
    from { background: rgba(255, 215, 0, 0.3); }
    to { background: rgba(57, 255, 20, 0.3); }
}

@keyframes columnPulse {
    from { transform: scaleY(1); }
    to { transform: scaleY(1.05); }
}

@keyframes diagonalShimmer {
    from { background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.3), transparent); }
    to { background: linear-gradient(45deg, transparent, rgba(57, 255, 20, 0.3), transparent); }
}

    
    /* ============ RULES MODAL POPUP ============ */
    .rules-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.9);
        z-index: 1000;
        display: flex;
        justify-content: center;
        align-items: center;
        display: none;
    }
    
    .rules-modal.active {
        display: flex;
    }
    
    .rules-content {
        background: rgba(10, 5, 0, 0.95);
        border: 2px solid #FFD700;
        border-radius: 20px;
        padding: 30px;
        width: 70%;
        height: 70%;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.2);
    }
    
    .rules-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    }
    
    .rules-title {
        color: #FFD700;
        font-size: 24px;
        font-weight: bold;
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    
    .close-rules {
        background: none;
        border: 2px solid #FFD700;
        color: #FFD700;
        font-size: 24px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
    }
    
    .close-rules:hover {
        background: #FFD700;
        color: #000;
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    }
    
    #powerStructureGrid {
        flex: 1;
        overflow-y: auto;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 10px;
    }
    
    .power-item {
        background: rgba(10, 5, 0, 0.7);
        border: 1px solid rgba(255, 215, 0, 0.3);
        border-radius: 12px;
        padding: 15px;
        text-align: center;
        transition: all 0.3s;
    }

    .power-item:hover {
        transform: translateY(-3px);
        border-color: rgba(255, 215, 0, 0.6);
        box-shadow: 0 5px 20px rgba(255, 215, 0, 0.15);
    }
    
    .symbol-preview {
        width: 60px;
        height: 60px;
        margin: 0 auto 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .symbol-preview img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    
    .symbol-name {
        color: #FFD700;
        font-weight: bold;
        margin-bottom: 10px;
        font-size: 14px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .symbol-power {
        font-size: 12px;
        color: #39FF14;
        opacity: 0.8;
    }
    
    .payouts {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .payout {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 13px;
        color: #39FF14;
        background: rgba(0, 0, 0, 0.3);
        padding: 6px 10px;
        border-radius: 6px;
        transition: all 0.3s;
    }

    .payout:hover {
        background: rgba(255, 215, 0, 0.1);
        transform: translateX(3px);
    }

    .symbol-count {
        color: #FFFFFF;
    }

    /* Payout color coding */
    .multiplier {
        font-weight: bold;
    }

    .multiplier.payout-common {
        color: #FFD700;
        text-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
    }

    .multiplier.payout-uncommon {
        color: #39FF14;
        text-shadow: 0 0 5px #39FF14;
    }

    .multiplier.payout-rare {
        color: #FF8C00;
        text-shadow: 0 0 7px #FF8C00;
    }

    .multiplier.payout-epic {
        color: #FF0044;
        text-shadow: 0 0 10px #FF0044;
        animation: epicGlow 1.5s infinite alternate;
    }

    @keyframes epicGlow {
        from { text-shadow: 0 0 5px #FFD700, 0 0 10px #FFD700; }
        to { text-shadow: 0 0 10px #FFD700, 0 0 20px #FFA500, 0 0 30px #FF8C00; }
    }
    
    /* ============ MESSAGE AREA ============ */
    #spinMessageExtra {
        position: absolute;
        top: 100px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(10, 5, 0, 0.9);
        color: #FFD700;
        padding: 10px 20px;
        border-radius: 12px;
        border: 1px solid rgba(255, 215, 0, 0.4);
        z-index: 20;
        text-align: center;
        text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
    }
    
    /* ============ UTILITY ============ */
    .hidden {
        display: none !important;
    }
    
    /* ============ VERSION ============ */
    .version {
        position: fixed;
        bottom: 5px;
        right: 5px;
        font-size: 12px;
        color: rgba(255, 255, 255, 0.3);
        z-index: 1000;
    }
    
    /* Scrollbar styling */
    #powerStructureGrid::-webkit-scrollbar {
        width: 8px;
    }
    
    #powerStructureGrid::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 4px;
    }
    
    #powerStructureGrid::-webkit-scrollbar-thumb {
        background: #B8860B;
        border-radius: 4px;
    }
    
    #powerStructureGrid::-webkit-scrollbar-thumb:hover {
        background: #FFD700;
    }

/* ============ PRE-GAME INTRO VIDEO ============ */
.intro-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.intro-video {
    width: 100vw !important;
    height: auto !important;
    max-width: 100%;
    object-fit: cover;
    background: #000;
    display: none;
}

@media (orientation: portrait) or (max-aspect-ratio: 16/9) {
    .intro-video {
        width: auto !important;
        height: 100vh !important;
    }
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
}

.play-content {
    text-align: center;
    padding: 40px;
    background: rgba(10, 5, 0, 0.8);
    border: 2px solid #FFD700;
    border-radius: 15px;
    max-width: 600px;
}

.play-content h2 {
    color: #FFD700;
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.play-content p {
    color: #B8860B;
    font-size: 20px;
    margin-bottom: 30px;
}

.play-intro-btn {
    background: linear-gradient(135deg, #FFD700, #B8860B);
    color: #1a0a00;
    border: none;
    padding: 15px 40px;
    font-size: 22px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin: 10px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.play-intro-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.skip-intro-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: rgba(10, 5, 0, 0.7);
    color: #FFD700;
    border: 2px solid #FFD700;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100001;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skip-intro-btn:hover {
    background: #FFD700;
    color: #1a0a00;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.intro-fallback {
    text-align: center;
    color: #B8860B;
    padding: 40px;
}

.intro-fallback h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.intro-fallback p {
    font-size: 24px;
    margin-bottom: 30px;
}

.intro-fallback button {
    background: linear-gradient(135deg, #FFD700, #B8860B);
    color: #1a0a00;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* Target BOTH video elements */
.background-video.desktop-video,
.background-video.mobile-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Target BOTH fallback images */
.fallback-bg.desktop-fallback,
.fallback-bg.mobile-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    display: none;
}

/* Hide mobile by default */
.background-video.mobile-video,
.fallback-bg.mobile-fallback {
    display: none;
}

/* Show mobile, hide desktop on mobile */
@media (max-width: 768px) {
    .background-video.desktop-video,
    .fallback-bg.desktop-fallback {
        display: none;
    }
    
    .background-video.mobile-video,
    .fallback-bg.mobile-fallback {
        display: block;
    }
}

/* ============ TAB SYSTEM FOR RULES/PAYOUTS ============ */
.tab-system {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-shrink: 0;
    justify-content: center;
}

.tab-btn {
    padding: 12px 20px;
    background: rgba(10, 5, 0, 0.5);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 10px;
    color: #FFD700;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    min-width: 120px;
    text-align: center;
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

.tab-btn.active {
    background: linear-gradient(135deg, #B8860B, #FFD700);
    color: #1a0a00;
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.tab-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.tab-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rules-panel {
    background: rgba(10, 5, 0, 0.7);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.rules-panel h1,
.rules-panel h2,
.rules-panel h3 {
    color: #FFD700;
    margin: 15px 0 10px 0;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.4);
}

.rules-panel h1 { font-size: 24px; }
.rules-panel h2 { font-size: 20px; }
.rules-panel h3 { font-size: 18px; }

.rules-panel p {
    color: #FFFFFF;
    line-height: 1.5;
    margin-bottom: 10px;
    font-size: 14px;
}

.rules-panel strong {
    color: #FFD700;
}

.rules-panel ul,
.rules-panel ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.rules-panel li {
    margin-bottom: 5px;
    color: #FFFFFF;
}

.payouts-panel {
    padding: 10px;
}

.power-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 5px;
}

.tab-panel::-webkit-scrollbar {
    width: 8px;
}

.tab-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.tab-panel::-webkit-scrollbar-thumb {
    background: #B8860B;
    border-radius: 4px;
}

.tab-panel::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}

/* ============ MODAL ADJUSTMENTS ============ */
.rules-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#powerStructureGrid {
    flex: 1;
    overflow: hidden;
}

/* ===== WIN HIGHLIGHT / PATTERN EFFECTS ===== */
.win-highlight {
    position: relative;
    z-index: 2;
    filter: brightness(1.4) drop-shadow(0 0 12px rgba(255, 215, 0, 0.9));
    border: 2px solid rgba(255, 215, 0, 0.8) !important;
    border-radius: 10px;
    box-shadow:
        0 0 15px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(184, 134, 11, 0.4),
        inset 0 0 10px rgba(255, 215, 0, 0.15);
    animation: winHighlightPulse 1.2s ease-in-out infinite;
}

@keyframes winHighlightPulse {
    0%, 100% {
        filter: brightness(1.4) drop-shadow(0 0 12px rgba(255, 215, 0, 0.9));
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 0 30px rgba(184, 134, 11, 0.4), inset 0 0 10px rgba(255, 215, 0, 0.15);
    }
    50% {
        filter: brightness(1.8) drop-shadow(0 0 20px rgba(255, 215, 0, 1));
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.9), 0 0 50px rgba(184, 134, 11, 0.6), inset 0 0 15px rgba(255, 215, 0, 0.3);
    }
}

.big-win-highlight {
    filter: brightness(2) drop-shadow(0 0 20px rgba(255, 215, 0, 1)) !important;
    border-color: rgba(255, 215, 0, 0.9) !important;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(184, 134, 11, 0.5),
        inset 0 0 15px rgba(255, 215, 0, 0.2);
    animation: bigWinPulse 0.8s ease-in-out infinite;
}

@keyframes bigWinPulse {
    0%, 100% {
        filter: brightness(2) drop-shadow(0 0 20px rgba(255, 215, 0, 1));
        transform: scale(1);
    }
    50% {
        filter: brightness(2.5) drop-shadow(0 0 30px rgba(255, 215, 0, 1));
        transform: scale(1.08);
    }
}

.winning-symbol-3d-spin {
    animation: symbol3dSpin 2s ease-in-out infinite, winHighlightPulse 1.2s ease-in-out infinite;
}

.winning-symbol-3d-spin-medium {
    animation: symbol3dSpinMedium 1.5s ease-in-out infinite, winHighlightPulse 1.2s ease-in-out infinite;
}

.winning-symbol-3d-spin-fast {
    animation: symbol3dSpinFast 1s ease-in-out infinite, winHighlightPulse 1.2s ease-in-out infinite;
}

@keyframes symbol3dSpin {
    0% { transform: perspective(400px) rotateY(0deg) scale(1); }
    25% { transform: perspective(400px) rotateY(15deg) scale(1.05); }
    50% { transform: perspective(400px) rotateY(0deg) scale(1.1); }
    75% { transform: perspective(400px) rotateY(-15deg) scale(1.05); }
    100% { transform: perspective(400px) rotateY(0deg) scale(1); }
}

@keyframes symbol3dSpinMedium {
    0% { transform: perspective(400px) rotateY(0deg) scale(1); }
    25% { transform: perspective(400px) rotateY(20deg) scale(1.08); }
    50% { transform: perspective(400px) rotateY(0deg) scale(1.12); }
    75% { transform: perspective(400px) rotateY(-20deg) scale(1.08); }
    100% { transform: perspective(400px) rotateY(0deg) scale(1); }
}

@keyframes symbol3dSpinFast {
    0% { transform: perspective(400px) rotateY(0deg) scale(1); }
    25% { transform: perspective(400px) rotateY(30deg) scale(1.1); }
    50% { transform: perspective(400px) rotateY(0deg) scale(1.15); }
    75% { transform: perspective(400px) rotateY(-30deg) scale(1.1); }
    100% { transform: perspective(400px) rotateY(0deg) scale(1); }
}

/* Pattern-specific color overrides */
.win-pattern-horizontal {
    border-color: rgba(0, 255, 255, 0.8) !important;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.6), 0 0 30px rgba(0, 255, 255, 0.3);
}

.win-pattern-vertical {
    border-color: rgba(57, 255, 20, 0.8) !important;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.6), 0 0 30px rgba(57, 255, 20, 0.3);
}

.win-pattern-diagonal {
    border-color: rgba(255, 215, 0, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.3);
}

/* ============ MOBILE RESPONSIVE (768px and under) ============ */
@media (max-width: 768px) {
    /* Switch to vertical layout */
    .slot-container {
        flex-direction: column;
    }

    .game-left-panel {
        width: 100%;
        height: auto;
        flex: 0 0 auto;
        padding-top: 100px; /* Space for top controls */
    }

    .game-right-panel {
        width: 100%;
        height: auto;
        flex: 1;
        padding: 10px 15px;
        gap: 10px;
        overflow-y: auto;
    }

    /* Reels */
    #slotReels {
        width: 75%;
        max-height: 40vh;
        max-width: 40vh;
        padding: 6px;
        gap: 3px;
    }

    .paid-reel-row {
        gap: 3px;
    }

    /* Top Controls */
    .top-controls {
        top: 8px;
        left: 8px;
        right: auto;
        padding: 8px 14px;
        gap: 12px;
        border-radius: 12px;
    }
    
    .balance-display {
        font-size: 14px;
    }
    
    #modeText {
        font-size: 12px;
    }
    
    .switch {
        width: 44px;
        height: 22px;
    }
    
    .slider:before {
        height: 16px;
        width: 16px;
    }
    
    input:checked + .slider:before {
        transform: translateX(20px);
    }

    /* Controls wrapper */
    .controls-wrapper {
        padding: 14px;
        border-radius: 16px;
        gap: 10px;
    }

    /* Buttons */
    .spin-btn {
        padding: 16px 24px;
        font-size: 18px;
        border-radius: 14px;
    }

    .auto-btn, .speed-btn, .info-btn {
        padding: 12px 14px;
        font-size: 10px;
    }

    .slider-title { font-size: 8px; letter-spacing: 1px; }
    .slider-value { font-size: 13px; }
    .slider-value.rr-value { font-size: 13px; }
    
    .bet-slider-track, .rr-slider-track { height: 5px; }
    .slider-thumb, .rr-thumb { width: 18px; height: 18px; }
    .slider-range-labels { font-size: 8px; }

    .multiplier-compact-label { font-size: 8px; }
    .multiplier-compact-bar { height: 5px; }
    .multiplier-compact-value { font-size: 12px; min-width: 42px; }
    .multiplier-compact-value.tier-legendary { font-size: 14px; }

    .last-win-display {
        bottom: auto;
        top: 65px;
        font-size: 10px;
        padding: 4px 10px;
    }
    .last-win-amount { font-size: 11px; }
    
    /* Win Popup - Smaller */
    .win-popup-card {
        padding: 24px 30px;
        min-width: 260px;
        background: radial-gradient(ellipse at center, rgba(30, 20, 0, 0.5) 0%, rgba(10, 5, 0, 0.5) 100%);
    }
    .win-popup-card.bonus-theme {
        background: radial-gradient(ellipse at center, rgba(40, 20, 0, 0.5) 0%, rgba(15, 5, 0, 0.5) 100%);
    }
    .win-popup-card.total-theme {
        background: radial-gradient(ellipse at center, rgba(30, 25, 0, 0.5) 0%, rgba(10, 5, 0, 0.5) 100%);
    }

    .win-popup-title { font-size: 24px; }
    .win-popup-amount { font-size: 32px; }
    
    /* Rules Modal */
    .rules-content {
        width: 90%;
        height: 80%;
        padding: 20px;
    }
    
    .rules-title {
        font-size: 18px;
    }
    
    /* Message Area */
    #spinMessageExtra {
        top: 80px;
        padding: 8px 15px;
        font-size: 14px;
        width: 90%;
    }

    /* Tab system mobile */
    .tab-buttons {
        margin-bottom: 15px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 12px;
        min-width: 100px;
    }
    
    .rules-panel {
        padding: 15px;
        max-height: 40vh;
    }
    
    .rules-panel h1 { font-size: 20px; }
    .rules-panel h2 { font-size: 18px; }
    .rules-panel h3 { font-size: 16px; }
    
    .rules-panel p {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .power-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .power-item {
        padding: 10px;
    }
    
    .symbol-preview {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }
    
    .symbol-name {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .payout {
        font-size: 10px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        padding: 8px 12px;
        font-size: 11px;
        min-width: 80px;
    }
    
    .power-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 8px;
    }
    
    .power-item {
        padding: 8px;
    }
    
    .symbol-preview {
        width: 35px;
        height: 35px;
    }
    
    .payout {
        font-size: 9px;
        padding: 3px 6px;
    }

    #slotReels {
        width: 85%;
    }

    .spin-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* ============ SPINNING STATE ============ */
.paid-reel.spinning {
    animation: reelSpin 0.3s ease-in-out infinite;
}

@keyframes reelSpin {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.3; }
}

/* Symbol landed bounce */
.paid-reel.symbol-landed {
    animation: symbolLand 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes symbolLand {
    0% { transform: scale(0.8); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ============ WIN VIDEO ============ */
.win-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.win-video.playing {
    display: block;
    opacity: 1;
}
