/* Top Dollar 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 test.html */
.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: 400px; /* 4 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;
}

/* Betting Controls */
.betting-controls {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bet-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.bet-amount {
    font-size: 1.5rem;
    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);
}

.bet-hint {
    font-size: 0.9rem;
    color: #64b5f6;
    font-weight: 600;
    opacity: 0.8;
}

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

.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);
}

/* Game Controls */
.game-controls {
    margin-bottom: 1.5rem;
}

.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 */
.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); }
}

/* Balance Section */
.balance-section {
    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;
    text-align: center;
}

.balance-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.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;
}

/* 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;
}

/* Bonus Modal */
.bonus-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.3s ease-out;
}

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

.bonus-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 25px;
    border: 3px solid #ffd700;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.bonus-header h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffd700;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

/* Bonus Intro */
.bonus-intro {
    margin-bottom: 2rem;
}

.light-chase {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.light {
    font-size: 2rem;
    animation: lightChase 1s infinite;
}

.light:nth-child(1) { animation-delay: 0s; }
.light:nth-child(2) { animation-delay: 0.2s; }
.light:nth-child(3) { animation-delay: 0.4s; }
.light:nth-child(4) { animation-delay: 0.6s; }
.light:nth-child(5) { animation-delay: 0.8s; }

@keyframes lightChase {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

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

/* Bonus Game */
.bonus-game {
    margin-bottom: 2rem;
}

.offer-display {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.offer-number {
    font-size: 1.1rem;
    color: #b0bec5;
    margin-bottom: 1rem;
}

.offer-amount {
    font-size: 4rem;
    font-weight: 900;
    color: #ffd700;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.offer-currency {
    font-size: 1.2rem;
    color: #4caf50;
    font-weight: 600;
}

/* Advisor Lamp */
.advisor-lamp {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lamp-light {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: lampGlow 2s infinite;
}

@keyframes lampGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.5) drop-shadow(0 0 20px currentColor); }
}

.lamp-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4caf50;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Bonus Buttons */
.bonus-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.bonus-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 150px;
}

.take-btn {
    background: linear-gradient(45deg, #4caf50, #45a049);
    color: white;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.take-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.try-btn {
    background: linear-gradient(45deg, #ff9800, #f57c00);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

.try-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
}

.continue-btn {
    background: linear-gradient(45deg, #2196f3, #1976d2);
    color: white;
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.continue-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

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

/* Offer History */
.offer-history {
    text-align: left;
}

.history-title {
    font-size: 1rem;
    color: #b0bec5;
    margin-bottom: 1rem;
    text-align: center;
}

.history-chips {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.history-chip {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 600;
}

.history-chip.taken {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
    color: #4caf50;
}

.history-chip.current {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
}

/* Bonus Result */
.bonus-result {
    text-align: center;
}

.result-message {
    font-size: 1.3rem;
    color: #64b5f6;
    margin-bottom: 1rem;
    font-weight: 600;
}

.result-amount {
    font-size: 3rem;
    font-weight: 900;
    color: #4caf50;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(76, 175, 80, 0.5);
}

/* 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;
    }
    
    .bonus-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .bonus-header h2 {
        font-size: 2rem;
    }
    
    .offer-amount {
        font-size: 3rem;
    }
    
    .bonus-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .bonus-btn {
        min-width: 200px;
    }
}

@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;
    }
}
