/* Simple Slot Machine Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto Mono', monospace;
    background: #121212;
    color: #f0f0f0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 800px;
    width: 100%;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* No login section needed - using main site auth */

/* Game Section */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 30, 30, 0.9);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #444;
}

.player-info {
    display: flex;
    gap: 20px;
}

.player-info span {
    color: #f0f0f0;
}

.player-info strong {
    color: #d4af37;
}

/* Free Spins Indicator */
#free-spins-indicator {
    margin-top: 10px;
    padding: 8px 15px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 20px;
    border: 2px solid #FFD700;
    color: #000;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
    animation: freespinGlow 2s ease-in-out infinite alternate;
}

#free-spins-indicator.active {
    box-shadow: 0 0 20px #FFD700, 0 0 30px rgba(255, 215, 0, 0.6);
}

@keyframes freespinGlow {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

#logout-btn, #home-btn {
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
}

#logout-btn {
    background: #c62828;
}

#logout-btn:hover {
    background: #d32f2f;
}

#home-btn {
    background: #7e57c2;
}

#home-btn:hover {
    background: #9575cd;
}

/* Slot Machine */
.slot-machine {
    background: #0a5f20;
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #d4af37;
    position: relative;
    margin-bottom: 20px;
}

.reels {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.reel {
    width: 80px;
    height: 240px;
    background: #fff;
    border: 2px solid #222;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

/* Paylines */
.paylines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.payline {
    position: absolute;
    height: 2px;
    background: rgba(255, 0, 0, 0.3);
    left: 30px;
    right: 30px;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

/* Individual payline positions */
.top-line {
    top: 20%;
}

.middle-line {
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 0, 0, 0.6);
    opacity: 0.6;
}

.bottom-line {
    top: 80%;
}

.v-line, .inverted-v-line {
    display: none; /* Hide complex lines for now - they need SVG paths */
}

/* Active payline highlighting */
.payline.active {
    background: #ff0000;
    opacity: 1;
    height: 3px;
    box-shadow: 0 0 10px #ff0000;
    animation: paylinePulse 1s ease-in-out infinite alternate;
}

@keyframes paylinePulse {
    0% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Controls */
.controls {
    text-align: center;
    background: rgba(30, 30, 30, 0.9);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #444;
}

/* Paylines Info */
.paylines-info {
    margin-bottom: 15px;
    padding: 8px 12px;
    background: rgba(0, 100, 0, 0.2);
    border: 1px solid #00FF00;
    border-radius: 5px;
    color: #00FF00;
    font-size: 14px;
    font-weight: bold;
}

.bet-section {
    margin-bottom: 20px;
    font-size: 18px;
}

.bet-section input {
    width: 80px;
    padding: 8px;
    margin: 0 10px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #222;
    color: #f0f0f0;
    text-align: center;
    font-size: 16px;
}

.spin-button {
    padding: 15px 40px;
    font-size: 24px;
    font-weight: bold;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.spin-button:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.spin-button:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Free Spin Mode Button */
.spin-button.free-spin-mode {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
    animation: freeSpinPulse 1.5s ease-in-out infinite alternate;
}

.spin-button.free-spin-mode:hover {
    background: linear-gradient(45deg, #FFA500, #FFD700);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(255, 215, 0, 0.4);
}

@keyframes freeSpinPulse {
    0% { box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3); }
    100% { box-shadow: 0 6px 20px rgba(255, 215, 0, 0.8); }
}

#result-message {
    font-size: 20px;
    font-weight: bold;
    min-height: 30px;
    color: #d4af37;
}

/* IMPROVED SLOT MACHINE ANIMATIONS */

/* Symbol strip for continuous scrolling */
.reel .symbol-strip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.1s ease-out;
}

/* Individual symbols */
.symbol {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    user-select: none;
}

.symbol:last-child {
    border-bottom: none;
}

/* SPINNING ANIMATIONS WITH REALISTIC PHYSICS */

/* Phase 1: Acceleration */
.reel.spinning.accelerating .symbol-strip {
    animation: spinAccelerate 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Phase 2: High-speed spinning */
.reel.spinning.fast .symbol-strip {
    animation: spinFast 0.05s linear infinite;
}

/* Phase 3: Deceleration */
.reel.spinning.decelerating .symbol-strip {
    animation: spinDecelerate 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Phase 4: Final positioning */
.reel.spinning.stopping .symbol-strip {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Keyframe animations */
@keyframes spinAccelerate {
    0% { 
        transform: translateY(0);
    }
    100% { 
        transform: translateY(-160px);
    }
}

@keyframes spinFast {
    0% { transform: translateY(0); }
    100% { transform: translateY(-320px); }
}

@keyframes spinDecelerate {
    0% { 
        transform: translateY(0);
    }
    100% { 
        transform: translateY(-80px);
    }
}

/* ENHANCED WINNING ANIMATION */
.winning {
    animation: winGlow 1.5s ease-in-out infinite alternate;
    z-index: 10;
    position: relative;
}

@keyframes winGlow {
    0% { 
        background: #fff;
        box-shadow: 0 0 5px #fff;
        transform: scale(1);
    }
    50% {
        background: #FFD700;
        box-shadow: 0 0 25px #FFD700, 0 0 35px rgba(255, 215, 0, 0.5);
        transform: scale(1.05);
    }
    100% { 
        background: #FFFF00;
        box-shadow: 0 0 30px #FFFF00, 0 0 40px rgba(255, 255, 0, 0.7);
        transform: scale(1.1);
    }
}

/* SCATTER SYMBOL ANIMATION */
.scatter {
    animation: scatterGlow 2s ease-in-out infinite alternate;
    z-index: 15;
    position: relative;
}

@keyframes scatterGlow {
    0% { 
        background: #fff;
        box-shadow: 0 0 8px #00BFFF;
        transform: scale(1) rotate(0deg);
    }
    50% {
        background: #00BFFF;
        box-shadow: 0 0 30px #00BFFF, 0 0 40px rgba(0, 191, 255, 0.6);
        transform: scale(1.1) rotate(5deg);
    }
    100% { 
        background: #87CEEB;
        box-shadow: 0 0 35px #87CEEB, 0 0 45px rgba(135, 206, 235, 0.8);
        transform: scale(1.15) rotate(-5deg);
    }
}

/* Reel highlight effect during spin */
.reel.spinning {
    box-shadow: 
        inset 0 0 10px rgba(0,0,0,0.3),
        0 0 15px rgba(76, 175, 80, 0.5);
    border-color: #4CAF50;
}

/* Staggered animation delays for realistic effect */
.reel:nth-child(1).spinning { animation-delay: 0s; }
.reel:nth-child(2).spinning { animation-delay: 0.1s; }
.reel:nth-child(3).spinning { animation-delay: 0.2s; }
.reel:nth-child(4).spinning { animation-delay: 0.3s; }
.reel:nth-child(5).spinning { animation-delay: 0.4s; }

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .player-info {
        flex-direction: column;
        gap: 10px;
    }
    
    #free-spins-indicator {
        margin-top: 5px;
        padding: 5px 10px;
        font-size: 14px;
    }
    
    .reels {
        gap: 5px;
    }
    
    .reel {
        width: 60px;
        height: 180px;
    }
    
    .symbol {
        height: 60px;
        font-size: 35px;
    }
    
    .slot-machine {
        padding: 20px;
    }
}

