/* =================================== */
/* CASINO SLOT MACHINE STYLES         */
/* =================================== */

.slot-machine-container {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 3px solid #bdc3c7;
}

/* Game Stats Bar */
.slot-stats-bar {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(90deg, #34495e, #2c3e50);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #95a5a6;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    color: #f1c40f;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Slot Machine Reels */
.slot-machine {
    position: relative;
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 4px solid #34495e;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.2);
    perspective: 1000px;
    height: 280px;
    overflow: hidden;
}

/* Machine Flip Mechanism */
.machine-front,
.machine-back {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    backface-visibility: hidden;
    transition: transform 0.8s ease;
    border-radius: 6px;
}

.machine-front {
    transform: rotateY(0deg);
}

.machine-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

.slot-machine.flipped .machine-front {
    transform: rotateY(-180deg);
}

.slot-machine.flipped .machine-back {
    transform: rotateY(0deg);
}

/* Hide control panel when viewing payouts */
.slot-machine.flipped ~ .control-panel {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Flip Button */
.flip-button {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 15;
}

.flip-button:hover {
    background: linear-gradient(135deg, #e67e22, #d68910);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.flip-button .flip-text {
    display: block;
}

.slot-machine.flipped .flip-button .flip-text::before {
    content: "REELS ";
}

.slot-machine.flipped .flip-button .flip-text {
    display: none;
}

.slot-machine.flipped .flip-button::after {
    content: "REELS";
}

.reel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.reel {
    width: 120px;
    height: 180px;
    background: white;
    border: 3px solid #2c3e50;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.reel-separator {
    width: 8px;
    height: 180px;
    background: linear-gradient(to bottom, #27ae60, #2ecc71, #27ae60);
    border: 2px solid #1e8449;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.symbol {
    font-size: 3rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-bottom: 1px solid #ecf0f1;
    transition: transform 0.1s ease;
    flex-shrink: 0;
}

.symbol.winning {
    animation: symbolWin 2s ease-in-out;
    background: linear-gradient(45deg, #f1c40f, #f39c12);
    border-radius: 8px;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.8);
    z-index: 5;
    position: relative;
}

@keyframes symbolWin {
    0%, 100% { 
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(241, 196, 15, 0.8);
    }
    50% { 
        transform: scale(1.15);
        box-shadow: 0 0 30px rgba(241, 196, 15, 1);
    }
}

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

/* Reel Animation States */
.reel {
    overflow: hidden;
}

.reel .symbols-container {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.1s ease;
}

.reel.accelerating .symbols-container {
    animation: reelAccelerate 0.8s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.reel.spinning .symbols-container {
    animation: reelSpinFast 0.1s linear infinite;
}

.reel.stopping .symbols-container {
    animation: reelSlowDown 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.reel.bounce .symbols-container {
    animation: reelBounce 0.6s ease-out forwards;
}

/* Acceleration phase - smooth start like real slots */
@keyframes reelAccelerate {
    0% { 
        transform: translateY(0);
        filter: blur(0px);
    }
    20% {
        transform: translateY(-20px);
        filter: blur(0.5px);
    }
    40% {
        transform: translateY(-60px);
        filter: blur(1px);
    }
    60% {
        transform: translateY(-120px);
        filter: blur(1.5px);
    }
    80% {
        transform: translateY(-200px);
        filter: blur(2px);
    }
    100% { 
        transform: translateY(-360px);
        filter: blur(3px);
    }
}

/* Fast spinning animation - symbols blur past */
@keyframes reelSpinFast {
    0% { transform: translateY(0); }
    100% { transform: translateY(-360px); }
}

/* Realistic slow-down with overshoot and settle */
@keyframes reelSlowDown {
    0% { 
        transform: translateY(-360px);
        filter: blur(3px);
    }
    30% {
        transform: translateY(-540px);
        filter: blur(2px);
    }
    60% {
        transform: translateY(-600px);
        filter: blur(1px);
    }
    75% {
        transform: translateY(-570px);
        filter: blur(0px);
    }
    85% {
        transform: translateY(-585px);
    }
    95% {
        transform: translateY(-577px);
    }
    100% { 
        transform: translateY(-580px);
        filter: blur(0px);
    }
}

/* Bounce effect after stopping */
@keyframes reelBounce {
    0% { transform: translateY(-580px) scale(1); }
    15% { transform: translateY(-588px) scale(1.03); }
    30% { transform: translateY(-575px) scale(0.98); }
    45% { transform: translateY(-582px) scale(1.01); }
    60% { transform: translateY(-578px) scale(0.99); }
    75% { transform: translateY(-580px) scale(1.005); }
    90% { transform: translateY(-579px) scale(0.998); }
    100% { transform: translateY(-580px) scale(1); }
}

/* Win Overlay */
.win-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(241, 196, 15, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    z-index: 10;
}

.win-overlay.show {
    display: flex;
    animation: winPulse 2s ease-in-out;
}

.big-win-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: #e74c3c;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 10px;
    animation: winTextGlow 1s ease-in-out infinite alternate;
}

.win-amount {
    font-size: 2rem;
    font-weight: bold;
    color: #27ae60;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

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

@keyframes winTextGlow {
    0% { text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
    100% { text-shadow: 2px 2px 8px rgba(231, 76, 60, 0.8), 0 0 20px rgba(231, 76, 60, 0.6); }
}

/* Claim Button */
.claim-section {
    text-align: center;
    margin-bottom: 20px;
}

.claim-button {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.claim-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.claim-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.claim-button.pulsing {
    animation: claimPulse 1s ease-in-out infinite;
}

@keyframes claimPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Control Panel */
.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #34495e, #2c3e50);
    border-radius: 8px;
    padding: 15px;
    color: white;
    flex-wrap: wrap;
    gap: 10px;
}

.control-item {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.control-label {
    display: block;
    font-size: 0.8rem;
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 5px;
}

.control-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #f1c40f;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Bet Controls */
.bet-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bet-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.bet-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-1px);
}

.bet-btn:active {
    transform: translateY(0);
}

/* Spin Button */
.spin-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.spin-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.spin-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.spin-button.spinning {
    animation: spinButtonPulse 0.5s ease-in-out infinite alternate;
}

@keyframes spinButtonPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .slot-machine-container {
        margin: 10px;
        padding: 15px;
    }
    
    .reel {
        width: 90px;
        height: 135px;
    }
    
    .reel-separator {
        width: 6px;
        height: 135px;
    }
    
    .symbol {
        font-size: 2rem;
        height: 45px;
    }
    
    .control-panel {
        flex-direction: column;
        gap: 15px;
    }
    
    .control-item {
        min-width: auto;
    }
    
    .big-win-text {
        font-size: 2rem;
    }
    
    .win-amount {
        font-size: 1.5rem;
    }
}

/* ============================= */
/* PAYOUT TABLE STYLES           */
/* ============================= */

.payout-table {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px 10px;
}

.payout-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: space-between;
    max-height: 100%;
}

.payout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(52, 73, 94, 0.8);
    border-radius: 4px;
    padding: 6px 10px;
    border: 1px solid #7f8c8d;
    transition: all 0.3s ease;
    flex: 1;
    min-height: 0;
}

.payout-row:hover {
    background: rgba(52, 73, 94, 1);
    transform: translateX(3px);
    border-color: #f39c12;
}

.payout-row.jackpot {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    border-color: #f1c40f;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

.payout-row.high {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #f39c12;
}

.payout-row.low {
    background: rgba(52, 73, 94, 0.6);
    border-color: #95a5a6;
}

.payout-row.consolation {
    background: rgba(127, 140, 141, 0.5);
    border-color: #bdc3c7;
    font-style: italic;
}

.combo {
    font-size: 1rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    flex: 1;
    text-align: left;
}

.credits {
    font-size: 1.1rem;
    font-weight: bold;
    color: #f1c40f;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #f39c12;
    min-width: 40px;
    text-align: center;
}

.credits.special {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: #fff;
    border-color: #f1c40f;
    font-size: 0.9rem;
    font-weight: bold;
}

/* BIG WIN styles */
.payout-row.bigwin {
    background: linear-gradient(135deg, #f39c12, #e67e22) !important;
    border-color: #f1c40f;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.5);
}

.bigwin-image {
    height: 18px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
}

/* Better contrast for "any" symbols */
.any-symbol {
    color: #ecf0f1;
    font-weight: bold;
    font-size: 0.7rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.3);
    padding: 1px 3px;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Mobile Payout Table */
@media (max-width: 768px) {
    .payout-header h3 {
        font-size: 1rem;
    }
    
    .payout-row {
        padding: 6px 8px;
    }
    
    .combo {
        font-size: 0.9rem;
    }
    
    .credits {
        font-size: 1rem;
        padding: 1px 6px;
    }
    
    .payout-footer p {
        font-size: 0.7rem;
    }
}

/* Special Effects */
.symbol.winning {
    animation: symbolWin 1s ease-in-out infinite;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    border-radius: 8px;
}

@keyframes symbolWin {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(241, 196, 15, 0); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px rgba(241, 196, 15, 0.8); }
}

/* Login Prompt for Demo Users */
.login-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.login-prompt-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
    border: 3px solid #f39c12;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 400px;
    margin: 20px;
}

.login-prompt-content h3 {
    color: #f1c40f;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.login-prompt-content p {
    margin-bottom: 15px;
    color: #ecf0f1;
}

.login-prompt-content button {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 12px 20px;
    margin: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.login-prompt-content button:first-of-type {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.login-prompt-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

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

