/* Slot Machine Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.back-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #64b5f6;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(100, 181, 246, 0.1);
    border: 1px solid rgba(100, 181, 246, 0.3);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(100, 181, 246, 0.2);
    transform: translateY(-2px);
}

.title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: #b0bec5;
    font-weight: 400;
}

/* Game Container */
.game-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Slot Machine */
.slot-machine {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Spinning Reels - Sprite-based approach like Top Dollar */
.reels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.reel {
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border: 4px solid #f39c12;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Reel viewport - shows only center symbol */
.reel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* Reel symbols container */
.reel-symbols {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 600px; /* 6 symbols vertically */
    display: flex;
    flex-direction: column;
    transition: transform 0.1s ease-out;
}

.reel-symbol {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(145deg, #34495e, #2c3e50);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.reel-symbol:last-child {
    border-bottom: none;
}

/* Center payline indicator */
.payline {
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
    border-radius: 2px;
    margin: 0 auto 1rem;
    width: 80%;
    max-width: 300px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    position: relative;
    z-index: 3;
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-label {
    font-size: 1.1rem;
    color: #b0bec5;
    font-weight: 600;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #4caf50;
}

.currency {
    font-size: 1.5rem;
}

.reset-balance-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-balance-btn:hover:not(:disabled) {
    background: rgba(255, 193, 7, 0.3);
    transform: scale(1.1);
}

.reset-balance-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bet-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bet-controls label {
    font-size: 1.1rem;
    color: #b0bec5;
    font-weight: 600;
}

.bet-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.bet-btn {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    min-width: 60px;
}

.bet-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffd700;
    transform: translateY(-2px);
}

.bet-btn.selected {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.current-bet {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.spin-btn {
    padding: 1.5rem 3rem;
    border: none;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #4caf50, #45a049);
    color: white;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.4);
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.win-display {
    min-height: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.win-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #64b5f6;
}

.win-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #4caf50;
    animation: winPulse 0.5s ease-in-out;
}

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

/* Symbol Win Animation */
@keyframes symbolWin {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Paytable */
.paytable {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.paytable h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 1rem;
    text-align: center;
}

.paytable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.paytable-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.paytable-item .symbol {
    font-size: 1.5rem;
}

.payout {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4caf50;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: auto;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    margin-bottom: 0.5rem;
    color: #b0bec5;
}

.disclaimer {
    color: #ff9800 !important;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .reels {
        gap: 0.5rem;
    }
    
    .reel {
        width: 80px;
        height: 80px;
    }
    
    .reel-symbol {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .bet-buttons {
        gap: 0.25rem;
    }
    
    .bet-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-width: 50px;
    }
    
    .spin-btn {
        padding: 1rem 2rem;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .slot-machine {
        padding: 1rem;
    }
    
    .reel {
        width: 60px;
        height: 60px;
    }
    
    .reel-symbol {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .bet-buttons {
        gap: 0.25rem;
    }
    
    .bet-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-width: 50px;
    }
    
    .spin-btn {
        padding: 1rem 2rem;
        font-size: 1.2rem;
    }
}
