* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* ============================================
   INTERACTIVE ENVIRONMENT - CRYPTO MINING CONSOLE (PIXEL ART)
   ============================================ */

.environment-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

/* --- CRYPTO MINING CONSOLE ENVIRONMENT --- */
.env-crypto {
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a2e 50%, #0d1117 100%);
    font-family: 'Courier New', monospace;
}

/* Mining console grid background */
.env-crypto .console-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridPulse 4s ease-in-out infinite;
}

/* Matrix rain effect container */
.env-crypto .matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.15;
}

.env-crypto .matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 20px;
    color: #00ff88;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
    white-space: nowrap;
    animation: matrixFall linear infinite;
}

@keyframes matrixFall {
    0% { transform: translateY(0); }
    100% { transform: translateY(200vh); }
}

/* Mining rigs (pixel art style) */
.env-crypto .mining-rig {
    position: absolute;
    bottom: 10%;
    width: 80px;
    height: 120px;
    image-rendering: pixelated;
    animation: rigGlow 3s ease-in-out infinite;
}

.env-crypto .mining-rig::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        /* Mining rig pixel art using box-shadow */
        linear-gradient(90deg, #2d2d2d 0%, #1a1a1a 100%);
    clip-path: polygon(
        20% 100%, 20% 80%, 10% 80%, 10% 60%, 15% 60%, 15% 40%, 10% 40%, 10% 20%,
        20% 20%, 20% 0%, 80% 0%, 80% 20%, 90% 20%, 90% 40%, 85% 40%, 85% 60%,
        90% 60%, 90% 80%, 80% 80%, 80% 100%
    );
}

.env-crypto .mining-rig::after {
    content: '';
    position: absolute;
    top: 25%;
    left: 25%;
    right: 25%;
    bottom: 35%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 8px,
        rgba(0, 255, 136, 0.3) 8px,
        rgba(0, 255, 136, 0.3) 10px
    );
    animation: hashScroll 0.5s linear infinite;
}

@keyframes hashScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

.env-crypto .mining-rig:nth-child(3) { left: 5%; animation-delay: 0s; }
.env-crypto .mining-rig:nth-child(4) { left: 15%; animation-delay: 0.5s; }
.env-crypto .mining-rig:nth-child(5) { right: 15%; animation-delay: 1s; }
.env-crypto .mining-rig:nth-child(6) { right: 5%; animation-delay: 1.5s; }

@keyframes rigGlow {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 10px rgba(0, 255, 136, 0.3)); }
    50% { filter: brightness(1.2) drop-shadow(0 0 20px rgba(0, 255, 136, 0.6)); }
}

/* Floating crypto symbols */
.env-crypto .floating-crypto {
    position: absolute;
    font-size: 24px;
    opacity: 0.1;
    animation: floatCrypto 8s ease-in-out infinite;
    image-rendering: pixelated;
}

.env-crypto .floating-crypto:nth-child(7) { left: 10%; top: 20%; animation-delay: 0s; }
.env-crypto .floating-crypto:nth-child(8) { left: 25%; top: 60%; animation-delay: 2s; }
.env-crypto .floating-crypto:nth-child(9) { right: 20%; top: 30%; animation-delay: 4s; }
.env-crypto .floating-crypto:nth-child(10) { right: 10%; top: 70%; animation-delay: 6s; }

@keyframes floatCrypto {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.1; }
    50% { transform: translateY(-30px) rotate(5deg); opacity: 0.2; }
}

/* Hash rate display */
.env-crypto .hash-display {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    opacity: 0.6;
}

.env-crypto .hash-display::before {
    content: 'HASH RATE: ';
}

.env-crypto .hash-value {
    animation: hashUpdate 2s steps(10) infinite;
}

@keyframes hashUpdate {
    0% { content: '145.23 TH/s'; }
    10% { content: '146.89 TH/s'; }
    20% { content: '144.12 TH/s'; }
    30% { content: '148.45 TH/s'; }
    40% { content: '142.78 TH/s'; }
    50% { content: '147.33 TH/s'; }
    60% { content: '143.91 TH/s'; }
    70% { content: '149.67 TH/s'; }
    80% { content: '141.55 TH/s'; }
    90% { content: '150.12 TH/s'; }
    100% { content: '145.23 TH/s'; }
}

/* Win state - enhanced glow */
.env-crypto.win-active {
    background: linear-gradient(180deg, #0a0a0a 0%, #1a2e1a 50%, #0d1117 100%);
}

.env-crypto.win-active .console-grid {
    background-image: 
        linear-gradient(rgba(255, 215, 0, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 215, 0, 0.08) 1px, transparent 1px);
    animation: gridWinPulse 0.5s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes gridWinPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 1.5; }
}

/* Matrix Rain Win Effect */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.matrix-confetti {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
    animation: matrixConfettiFall linear forwards;
    will-change: transform, opacity;
}

.matrix-confetti.gold {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.matrix-confetti.crypto-symbol {
    font-size: 24px;
}

@keyframes matrixConfettiFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) rotate(90deg);
        opacity: 0.9;
    }
    50% {
        transform: translateY(50vh) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(75vh) rotate(270deg);
        opacity: 0.6;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

/* Game container - slots centered, rules absolute positioned */
.game-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    position: relative;
    z-index: 100;
    padding: 20px;
}

.game-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 700px;
    position: relative;
}

/* Rules panel - absolute on right side, wider towards game */
.rules-panel {
    position: absolute;
    right: -200px;
    top: 0;
    display: block;
    background: linear-gradient(145deg, rgba(0,0,0,0.8) 0%, rgba(30,30,30,0.9) 100%);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 15px;
    width: 320px;
}

.slot-machine {
    position: relative;
    z-index: 100;
    background: linear-gradient(145deg, #1a1a2e 0%, #0d1117 50%, #161b22 100%);
    border-radius: 4px;
    padding: 25px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 4px #2d2d2d,
        0 0 0 6px #00ff88,
        0 0 30px rgba(0, 255, 136, 0.3);
    width: 400px;
    flex-shrink: 0;
    margin: 0 auto;
    image-rendering: pixelated;
    border: 2px solid #00ff88;
}

.slot-machine::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px dashed rgba(0, 255, 136, 0.2);
    pointer-events: none;
    border-radius: 2px;
}

.rules-panel h3 {
    color: #ffd700;
    font-size: 16px;
    margin-bottom: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rules-panel ul {
    list-style: none;
    color: #fff;
    font-size: 13px;
}

.rules-panel li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.rules-panel li:last-child {
    border-bottom: none;
}

.rules-panel li.highlight {
    background: rgba(255, 215, 0, 0.2);
    border-radius: 5px;
    padding: 6px;
    margin: 2px 0;
    animation: highlightPulse 0.5s ease 3;
}

@keyframes highlightPulse {
    0%, 100% { background: rgba(255, 215, 0, 0.2); }
    50% { background: rgba(255, 215, 0, 0.5); }
}

.rules-panel .symbol-preview {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
}

.rules-panel .symbol-preview img {
    width: 35px;
    height: 35px;
    margin: 0 2px;
}

.rules-panel .payout {
    color: #ffd700;
    font-weight: bold;
}

@media (max-width: 768px) {
    body {
        overflow: hidden;
        min-height: 100vh;
        height: 100vh;
    }
    
    .game-container {
        padding: 3px;
        min-height: 100vh;
        height: 100vh;
        align-items: flex-start;
        padding-top: 5px;
    }
    
    .game-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        width: 100%;
        max-width: 100%;
    }
    
    .slot-machine {
        width: 100%;
        max-width: 360px;
        padding: 8px;
        transform: scale(0.93);
        transform-origin: top center;
    }
    
    .machine-header {
        margin-bottom: 6px;
    }
    
    .game-title {
        font-size: 16px;
    }
    
    .crypto-logo {
        width: 120px;
        height: 24px;
    }
    
    .reel {
        width: 65px;
        height: 130px;
    }
    
    .reel-strip {
        transform: translateY(-32px);
    }
    
    @keyframes smoothSpin {
        0% { transform: translateY(-32px); }
        100% { transform: translateY(-98px); }
    }
    
    @keyframes reelBlur {
        0% { transform: translateY(-32px); }
        50% { transform: translateY(-34px); }
        100% { transform: translateY(-32px); }
    }
    
    .symbol {
        width: 65px;
        height: 65px;
        font-size: 32px;
    }
    
    .symbol img {
        max-width: 42px;
        max-height: 42px;
    }
    
    .slot-grid {
        gap: 4px;
        margin-bottom: 6px;
    }
    
    .payline {
        top: 63px;
        height: 3px;
    }
    
    .result-panel {
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        padding: 6px 8px;
        margin-bottom: 6px;
    }
    
    .result-text {
        font-size: 11px;
    }
    
    .win-amount {
        font-size: 14px;
    }
    
    .bet-panel {
        padding: 6px;
        margin-bottom: 6px;
        gap: 6px;
    }
    
    .bet-input {
        padding: 6px;
        font-size: 14px;
    }
    
    .quick-bets {
        flex-wrap: wrap;
        gap: 0px !important;
    }
    
    .bet-btn {
        min-width: 40px;
        padding: 4px 2px;
        font-size: 9px;
    }
    
    .controls {
        gap: 8px;
    }
    
    .balance-display {
        padding: 6px 10px;
    }
    
    .balance-label {
        font-size: 9px;
        margin-bottom: 2px;
    }
    
    .balance-value {
        font-size: 14px;
    }
    
    .spin-btn {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .rules-panel {
        display: none;
    }
    
    .rules-btn {
        display: block;
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .mute-btn {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .header-buttons {
        gap: 6px;
    }
}

/* Desktop - hide modal button */
@media (min-width: 769px) {
    .rules-btn {
        display: none;
    }
    
    .rules-modal {
        display: none !important;
    }
}

.machine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* Game title - pixel art crypto style */
.game-title {
    color: #00ff88;
    font-size: 20px;
    font-weight: 900;
    text-shadow: 
        0 0 10px rgba(0, 255, 136, 0.5),
        2px 2px 0 #008f4c,
        -1px -1px 0 #00ff88;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

/* Pixel art buttons (rules, mute) */
.rules-btn, .mute-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 2px solid #00ff88;
    background: linear-gradient(145deg, #1a1a2e 0%, #0d1117 100%);
    color: #00ff88;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 
        0 3px 0 #008f4c,
        0 0 10px rgba(0, 255, 136, 0.3);
    image-rendering: pixelated;
}

.rules-btn:hover, .mute-btn:hover {
    background: #00ff88;
    color: #0d1117;
    transform: translateY(-1px);
    box-shadow: 
        0 4px 0 #008f4c,
        0 0 15px rgba(0, 255, 136, 0.5);
}

.rules-btn:active, .mute-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #008f4c;
}

.mute-btn.muted {
    border-color: #666;
    color: #666;
    box-shadow: 0 3px 0 #444;
}

/* Logo container - pixel art crypto style */
.logo-container {
    display: flex;
    align-items: center;
}

.crypto-logo {
    width: 160px;
    height: 32px;
    image-rendering: pixelated;
}

/* Result panel - crypto terminal style */
.result-panel {
    background: linear-gradient(145deg, rgba(13,17,23,0.9) 0%, rgba(22,27,34,0.95) 100%);
    border: 3px solid #00ff88;
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 12px;
    text-align: center;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(0, 255, 136, 0.1);
}

.result-panel.win {
    border-color: #ffd700;
    background: linear-gradient(145deg, rgba(255,215,0,0.1) 0%, rgba(13,17,23,0.9) 100%);
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.4), 
        inset 0 0 10px rgba(255, 215, 0, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    animation: winPulseStrong 0.6s ease infinite;
}

.result-panel.lose {
    border-color: #ff4444;
    background: linear-gradient(145deg, rgba(255,0,0,0.1) 0%, rgba(13,17,23,0.9) 100%);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.result-text {
    color: #888;
    font-size: 14px;
    font-weight: 600;
}

.result-panel.win .result-text {
    color: #ffd700;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.result-panel.lose .result-text {
    color: #ff6b6b;
    font-weight: 600;
}

.win-amount {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Slot grid - 3 reels horizontal */
.slot-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
}

/* Single reel container - pixel art style */
.reel {
    width: 100px;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(145deg, #0d1117 0%, #161b22 100%);
    border: 3px solid #00ff88;
    border-radius: 4px;
    position: relative;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 255, 136, 0.4),
        inset 0 0 0 2px #1a1a2e;
    image-rendering: pixelated;
}

.reel::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 2px;
    pointer-events: none;
    z-index: 5;
}

/* Payline indicator - crypto style */
.payline {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 98px;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, #ff0044 30%, #ff0044 70%, transparent 100%);
    box-shadow: 0 0 10px rgba(255, 0, 68, 0.8), 0 0 20px rgba(255, 0, 68, 0.5);
    z-index: 10;
    pointer-events: none;
    animation: paylinePulse 2s ease-in-out infinite;
}

@keyframes paylinePulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Position reel-strip to show center row in the middle with partial top/bottom */
.reel-strip {
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translateY(-50px);
}

.reel-strip.spinning {
    animation: reelBlur 0.05s linear infinite;
}

/* No blur - just position change for crisp symbols */
@keyframes reelBlur {
    0% { transform: translateY(-50px); }
    50% { transform: translateY(-52px); }
    100% { transform: translateY(-50px); }
}

/* Symbol styles - pixel art */
.symbol {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    flex-shrink: 0;
    background: linear-gradient(145deg, #161b22 0%, #0d1117 100%);
    image-rendering: pixelated;
    position: relative;
}

.symbol::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px dashed rgba(0, 255, 136, 0.1);
    border-radius: 2px;
    pointer-events: none;
}

.symbol img {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 0 2px rgba(0, 255, 136, 0.3));
    border-radius: 4px;
}

.symbol.emoji {
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Win animation for symbols */
.symbol.win-glow {
    animation: symbolWinGlow 0.5s ease-in-out 3;
}

.symbol.win-pulse {
    animation: symbolWinPulse 0.6s ease-in-out 3;
}

.symbol.win-flash {
    animation: symbolWinFlash 0.3s ease-in-out 5;
}

@keyframes symbolWinGlow {
    0%, 100% { 
        box-shadow: inset 0 0 0 rgba(0, 255, 136, 0), 0 0 0 rgba(0, 255, 136, 0);
        filter: brightness(1);
    }
    50% { 
        box-shadow: inset 0 0 30px rgba(0, 255, 136, 0.5), 0 0 20px rgba(0, 255, 136, 0.8);
        filter: brightness(1.3);
    }
}

@keyframes symbolWinPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes symbolWinFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; background: #00ff88; }
}

/* Bet panel - crypto terminal style */
.bet-panel {
    background: linear-gradient(145deg, rgba(13,17,23,0.8) 0%, rgba(22,27,34,0.9) 100%);
    border: 2px solid #00ff88;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

.bet-label {
    color: #00ff88;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
}

.bet-input {
    background: linear-gradient(145deg, #0d1117 0%, #161b22 100%);
    border: 2px solid #00ff88;
    border-radius: 4px;
    padding: 10px;
    color: #00ff88;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    width: 100%;
    font-family: 'Courier New', monospace;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.bet-input:focus {
    outline: none;
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(0, 255, 136, 0.3);
}

.quick-bets {
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

/* Bet buttons - pixel art style */
.bet-btn {
    flex: 1;
    padding: 8px 5px;
    background: linear-gradient(145deg, #1a1a2e 0%, #0d1117 100%);
    border: 2px solid #00ff88;
    border-radius: 4px;
    color: #00ff88;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Courier New', monospace;
    box-shadow: 0 3px 0 #008f4c;
}

.bet-btn:hover {
    background: #00ff88;
    color: #0d1117;
    transform: translateY(-1px);
    box-shadow: 0 4px 0 #008f4c;
}

.bet-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #008f4c;
}

.bet-btn.reset-btn {
    background: linear-gradient(145deg, #3d1f1f 0%, #2d1515 100%);
    border-color: #ff4444;
    color: #ff4444;
    box-shadow: 0 3px 0 #aa2222;
}

.bet-btn.reset-btn:hover {
    background: #ff4444;
    color: #0d1117;
    box-shadow: 0 4px 0 #aa2222;
}

.bet-btn.active {
    background: #00ff88;
    border-color: #00ff88;
    color: #0d1117;
    box-shadow: 
        0 3px 0 #008f4c,
        0 0 15px rgba(0, 255, 136, 0.5);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Balance display - crypto terminal style */
.balance-display {
    background: linear-gradient(145deg, #0d1117 0%, #161b22 100%);
    border-radius: 4px;
    padding: 12px 20px;
    border: 2px solid #00ff88;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 
        0 4px 0 #008f4c,
        0 0 15px rgba(0, 255, 136, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.balance-label {
    color: #888;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 4px;
    font-family: 'Courier New', monospace;
}

.balance-value {
    color: #00ff88;
    font-size: 22px;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    transition: transform 0.3s ease;
    font-family: 'Courier New', monospace;
}

.balance-value.pulse {
    animation: balancePulse 0.5s ease;
}

@keyframes balancePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Win amount fly animation */
.win-fly {
    position: fixed;
    color: #ffd700;
    font-size: 24px;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    pointer-events: none;
    z-index: 1000;
    transition: all 1s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Pixel art buttons */
.spin-btn {
    flex: 1;
    padding: 18px 35px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 3px;
    color: #0d1117;
    background: linear-gradient(145deg, #00ff88 0%, #00cc6a 100%);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    box-shadow: 
        0 6px 0 #008f4c,
        0 10px 20px rgba(0, 255, 136, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    image-rendering: pixelated;
    font-family: 'Courier New', monospace;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.spin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 0 #008f4c,
        0 12px 25px rgba(0, 255, 136, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.spin-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #008f4c,
        0 5px 10px rgba(0, 255, 136, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.spin-btn:disabled {
    background: linear-gradient(145deg, #444 0%, #333 100%);
    box-shadow: 0 6px 0 #222;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 2px solid #ffd700;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.rules-modal {
    max-width: 950px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    color: #ffd700;
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.result-symbols {
    font-size: 50px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.result-symbols img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.result-symbols .emoji {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

#resultMessage {
    color: #fff;
    font-size: 18px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-btn {
    padding: 15px 50px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    background: linear-gradient(145deg, #ffd700 0%, #ffed4e 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.close-rules {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-rules:hover {
    color: #fff;
}

.rules-image-container {
    display: none;
    margin: 20px 0;
}

.rules-image-container.active {
    display: block;
}

.rules-image-container img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.rules-fallback {
    display: none;
}

.rules-fallback.active {
    display: block;
}

.rules-fallback h3 {
    color: #ffd700;
    margin-bottom: 20px;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.rules-fallback ul {
    list-style: none;
    text-align: left;
    color: #fff;
}

.rules-fallback li {
    padding: 15px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    min-height: 60px;
}

.rules-fallback li:last-child {
    border-bottom: none;
}

.rules-fallback .symbol-preview {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    vertical-align: middle;
}

.rules-fallback .symbol-preview img {
    width: 40px;
    height: 40px;
    margin: 0 3px;
}

.rules-fallback .payout {
    color: #ffd700;
    font-weight: bold;
}

.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

.loader.active {
    display: flex;
}

.loader span {
    color: #ffd700;
    font-size: 16px;
    letter-spacing: 2px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes spinReel {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Smooth spin animation for reels */
.reel.spinning .reel-strip {
    animation: smoothSpin 0.15s linear infinite;
}

@keyframes smoothSpin {
    0% { transform: translateY(-50px); }
    100% { transform: translateY(-150px); }
}

.win-animation {
    animation: winPulse 0.5s ease 3;
}

@keyframes winPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: inset 0 0 40px rgba(255, 215, 0, 1), 0 0 30px rgba(255, 215, 0, 0.5);
    }
}

/* Reel win animation */
.reel.win-animation {
    animation: reelWinPulse 0.5s ease 3;
}

@keyframes reelWinPulse {
    0%, 100% { 
        box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% { 
        box-shadow: inset 0 0 40px rgba(255, 215, 0, 1), 0 0 40px rgba(255, 215, 0, 0.6);
    }
}
