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

.slot-machine-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.slot-machine {
    width: 100%;
    max-width: 600px;
    margin: 40px auto 20px; /* Top margin for spacing from header */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform-origin: center;
}

/* Header Removed */

/* Game Area - Center reels, lever positioned absolutely */
.slot-game-area {
    display: flex;
    justify-content: center; /* Center the reels container */
    align-items: center;
    margin: 0;
    position: relative; /* For absolute positioning of lever */
}

/* Reels Container - Clear grid structure */
.slot-reels-container {
    display: inline-flex;
    gap: 16px; /* Increased for better separation */
    padding: 16px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 24px;
    border: 4px solid #f1c40f; 
    position: relative;
    overflow: visible; /* Allow separator overflow */
    box-shadow: 
        0 15px 50px rgba(0,0,0,0.9),
        inset 0 0 30px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

/* Premium Prize Line Frame - Full rectangular frame */
.slot-reels-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -8px;  /* Extend beyond container */
    right: -8px;
    height: 128px; /* Slightly larger than symbol */
    transform: translateY(-50%);
    
    /* Premium golden frame */
    border: 4px solid #f1c40f;
    border-radius: 8px;
    
    /* Inner glow */
    background: 
        linear-gradient(90deg, 
            rgba(241, 196, 15, 0) 0%,
            rgba(241, 196, 15, 0.15) 50%,
            rgba(241, 196, 15, 0) 100%),
        linear-gradient(180deg,
            rgba(241, 196, 15, 0.08) 0%,
            rgba(241, 196, 15, 0.12) 50%,
            rgba(241, 196, 15, 0.08) 100%);
    
    /* Outer glow */
    box-shadow: 
        0 0 30px rgba(241, 196, 15, 0.4),
        inset 0 0 20px rgba(241, 196, 15, 0.1),
        0 0 60px rgba(241, 196, 15, 0.2);
    
    pointer-events: none;
    z-index: 10;
}

/* Corner accents for premium frame */
.slot-reels-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -8px;
    right: -8px;
    height: 128px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 11;
    
    /* Corner decorations */
    background-image:
        /* Top-left corner */
        linear-gradient(135deg, #f1c40f 0%, transparent 30%),
        /* Top-right corner */
        linear-gradient(225deg, #f1c40f 0%, transparent 30%),
        /* Bottom-left corner */
        linear-gradient(45deg, #f1c40f 0%, transparent 30%),
        /* Bottom-right corner */
        linear-gradient(315deg, #f1c40f 0%, transparent 30%);
    
    background-size: 20px 20px;
    background-position:
        left top,
        right top,
        left bottom,
        right bottom;
    background-repeat: no-repeat;
    border-radius: 8px;
}

/* Individual Reel */
.slot-reel {
    width: 180px; /* Increased from 140px */
    height: 494px; /* 3 symbols (150px) + 2 gaps (22px) = 494px */
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,1);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Vertical separator between reels */
.slot-reel:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: -9px; /* Half of gap (16px/2 + 1px for centering) */
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(241, 196, 15, 0) 0%,
        rgba(241, 196, 15, 0.6) 15%,
        rgba(241, 196, 15, 0.6) 85%,
        rgba(241, 196, 15, 0) 100%);
    z-index: 5;
    pointer-events: none;
}

/* Reel Strip */
.reel-strip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: translateY(0); 
    will-change: transform;
}

.reel-strip.spinning {
    animation: reelSpin 0.15s linear infinite;
    filter: blur(4px);
}

@keyframes reelSpin {
    0% { transform: translateY(0); }
    100% { transform: translateY(-860px); /* 5 * 172px */ }
}

/* Reel Symbol */
.reel-symbol {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Fixed Dimensions - INCREASED */
    width: 180px !important; 
    height: 150px !important;
    
    /* Vertical Spacing - INCREASED */
    margin: 0 0 22px 0 !important; /* 22px bottom gap */
    
    padding: 10px;
    user-select: none;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px; /* Rounded corners for isolated feel */
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

/* Highlight middle symbol slightly */
.slot-reel .reel-symbol:nth-child(2) {
    background: rgba(241, 196, 15, 0.05);
}

.reel-symbol img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.reel-symbol span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.8);
    margin-top: 5px;
    text-align: center;
}

/* Win Animation */
.slot-reels-container.win-animation {
    animation: winPulse 0.5s ease-in-out 3;
}

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

/* Responsive Scaling - Organized by viewport width */

/* Large tablets and small desktops */
@media (max-width: 768px) {
    .slot-machine {
        transform: scale(0.65);
        margin: 15px auto 10px;
    }
    
    .slot-game-area {
        margin: 0;
    }
    
    .slot-spin-button {
        width: 140px;
        height: 140px;
    }
    
    .button-text {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
}

/* Tablets and larger phones */
@media (max-width: 600px) {
    .slot-machine {
        transform: scale(0.55);
        margin: 10px auto 5px;
    }
    
    .slot-spin-button {
        width: 120px;
        height: 120px;
    }
    
    .button-text {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
}

/* Larger phones (429px+) */
@media (min-width: 429px) and (max-width: 480px) {
    .slot-machine {
        transform: scale(0.48);
        margin: 5px auto 0;
    }
    
    .slot-spin-button {
        width: 100px;
        height: 100px;
    }
    
    .button-text {
        font-size: 1.2rem;
    }
}

/* iPhone 12 Pro Max and similar (391px to 428px) */
@media (min-width: 391px) and (max-width: 428px) {
    .slot-machine {
        transform: scale(0.50) !important;
        margin: 15px auto 0 !important;
    }
    
    .slot-spin-button {
        width: 95px;
        height: 95px;
    }
    
    .button-text {
        font-size: 1.1rem;
    }
}

/* iPhone 12 Pro and smaller (up to 390px) */
@media (max-width: 390px) {
    .slot-machine {
        transform: scale(0.38) !important;
        margin: 0 auto !important;
    }
    
    .slot-spin-button {
        width: 90px;
        height: 90px;
    }
    
    .button-text {
        font-size: 1rem;
    }
}

/* Height-based adjustments (only for taller devices) */
@media (min-height: 801px) and (max-width: 768px) {
    .slot-machine {
        transform: scale(0.85);
    }
}

@media (max-height: 700px) {
    .slot-machine {
        transform: scale(0.7);
        margin: 10px auto 5px;
    }
}

@media (max-height: 600px) and (max-width: 480px) {
    .slot-machine {
        transform: scale(0.45);
        margin: 5px auto 0;
    }
}

/* Landscape orientation for mobile devices */
@media (orientation: landscape) and (max-height: 500px) {
    .slot-machine {
        transform: scale(0.65) !important;
        margin: 0 auto !important;
    }
    
    .slot-spin-button {
        width: 80px;
        height: 80px;
    }
    
    .button-text {
        font-size: 0.9rem;
    }
}


.slot-spin-button {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid #1a1a1a; /* Black border */
    cursor: pointer;
    position: relative;
    background: radial-gradient(circle at 30% 30%, #f4d03f, #c9a426); /* Gold gradient */
    box-shadow: 
        0 8px 0 #8b7220,
        0 12px 20px rgba(0,0,0,0.5),
        inset 0 -6px 12px rgba(0,0,0,0.3),
        inset 0 6px 12px rgba(255,255,255,0.3);
    transition: all 0.1s ease;
    transform: translateY(0);
}

.slot-spin-button:hover {
    background: radial-gradient(circle at 30% 30%, #f6e05e, #d4af37);
    box-shadow: 
        0 8px 0 #8b7220,
        0 14px 25px rgba(0,0,0,0.6),
        inset 0 -6px 12px rgba(0,0,0,0.3),
        inset 0 6px 12px rgba(255,255,255,0.4);
}

/* Press effect */
.slot-spin-button:active,
.slot-spin-button.pressing {
    transform: translateY(4px);
    box-shadow: 
        0 4px 0 #8b7220,
        0 6px 12px rgba(0,0,0,0.5),
        inset 0 -3px 6px rgba(0,0,0,0.4),
        inset 0 3px 6px rgba(255,255,255,0.2);
}

.button-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(26, 26, 26, 0.5); /* Inner black ring */
}

.button-text {
    font-size: 2.4rem;
    font-weight: 900;
    color: #1a1a1a; /* Black text */
    text-shadow: 
        0 2px 4px rgba(255,255,255,0.3),
        0 -1px 2px rgba(0,0,0,0.3);
    letter-spacing: 4px;
    user-select: none;
}

/* Disabled state */
.slot-spin-button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Hand Tracking Compatibility - Larger hit area */
body.hand-tracking-active .slot-spin-button {
    width: 200px;
    height: 200px;
}

body.hand-tracking-active .button-text {
    font-size: 2.6rem;
}

/* Result Message */
.slot-result-message {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 15px;
    padding: 10px;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.slot-result-message.show {
    opacity: 1;
    transform: translateY(0);
}

.slot-result-message.win {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid rgba(76, 175, 80, 0.3);
}

.slot-result-message.lose {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
    border: 2px solid rgba(255, 152, 0, 0.3);
}


