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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(10px);
}

h1 {
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-board {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(45deg, #ffd700, #ffed4a);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 30px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.balance, .bet {
    font-weight: bold;
    font-size: 1.2em;
    color: #2d3748;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.slot-machine {
    background: linear-gradient(145deg, #2d3748, #4a5568);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 
        inset 0 -10px 20px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.2);
}

.reel-container {
    display: flex;
    justify-content: space-around;
    gap: 15px;
}

.reel {
    background: linear-gradient(145deg, #ffffff, #f7fafc);
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.reel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(255, 255, 255, 0.6) 50%, transparent 51%);
    pointer-events: none;
}

.symbol {
    font-size: 3em;
    transition: transform 0.1s ease;
    z-index: 1;
}

.reel.spinning {
    animation: spin-glow 0.1s infinite;
}

.reel.spinning .symbol {
    animation: symbol-blur 0.1s infinite;
}

@keyframes spin-glow {
    0%, 100% { 
        box-shadow: 
            inset 0 2px 5px rgba(0, 0, 0, 0.1),
            0 5px 15px rgba(0, 0, 0, 0.1),
            0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% { 
        box-shadow: 
            inset 0 2px 5px rgba(0, 0, 0, 0.1),
            0 5px 15px rgba(0, 0, 0, 0.1),
            0 0 30px rgba(255, 215, 0, 0.8);
    }
}

@keyframes symbol-blur {
    0%, 100% { 
        filter: blur(0px);
        transform: scale(1);
    }
    50% { 
        filter: blur(2px);
        transform: scale(1.1);
    }
}

.controls {
    margin-bottom: 20px;
}

.spin-button {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(72, 187, 120, 0.6);
    background: linear-gradient(45deg, #38a169, #2f855a);
}

.spin-button:active:not(:disabled) {
    transform: translateY(0);
}

.spin-button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    box-shadow: none;
}

.bet-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.bet-btn {
    background: linear-gradient(45deg, #4299e1, #3182ce);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.bet-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(66, 153, 225, 0.4);
}

.bet-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.result {
    margin-bottom: 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#message {
    font-size: 1.2em;
    font-weight: bold;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.jackpot-message {
    background: linear-gradient(45deg, #ffd700, #ffed4a);
    color: #2d3748;
    animation: jackpot-flash 1s infinite alternate;
    transform: scale(1.05);
}

.win-message {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
    animation: win-pulse 0.5s ease;
}

.lose-message {
    background: linear-gradient(45deg, #f56565, #e53e3e);
    color: white;
}

.game-over-message {
    background: linear-gradient(45deg, #805ad5, #6b46c1);
    color: white;
    animation: game-over-shake 0.5s ease;
}

@keyframes jackpot-flash {
    0% { 
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    100% { 
        box-shadow: 0 0 30px rgba(255, 215, 0, 1);
    }
}

@keyframes win-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes game-over-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.rules {
    background: rgba(74, 85, 104, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: left;
}

.rules h3 {
    text-align: center;
    color: #4a5568;
    margin-bottom: 15px;
}

.rules p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.win-animation {
    animation: win-screen-flash 2s ease;
}

@keyframes win-screen-flash {
    0%, 100% { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    25% { background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%); }
    50% { background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); }
    75% { background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%); }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
        width: 95%;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .reel {
        width: 80px;
        height: 80px;
    }
    
    .symbol {
        font-size: 2.5em;
    }
    
    .spin-button {
        padding: 12px 30px;
        font-size: 1.1em;
    }
}