/* --- CSS VARIABLES & THEME --- */
:root {
    --neon-blue: #00f2ff;
    --neon-purple: #bc13fe;
    --neon-yellow: #fff200; /* Primary color for Balance, Bet, and Progress */
    --gold: #ffcf10;
    --symbol-height: 120px;
}

/* --- GLOBAL STYLES --- */
body {
    /* Immersive Casino Background */
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), 
                url('https://images.unsplash.com/photo-1596838132731-3301c3fd4317?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

/* --- MACHINE CONTAINER --- */
.casino-container {
    background: #11111d;
    padding: 25px;
    border-radius: 40px;
    border: 5px solid #222;
    box-shadow: 0 0 60px #000, 0 0 20px var(--neon-blue);
    width: 440px;
    text-align: center;
    position: relative;
}

.neon-title {
    color: white;
    text-shadow: 0 0 10px var(--neon-blue);
    letter-spacing: 5px;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

/* --- REEL GRID (3x3) --- */
.slot-machine {
    display: flex;
    gap: 10px;
    background: #000;
    padding: 15px;
    border-radius: 15px;
    height: 360px; /* Exactly 3 symbols high */
    position: relative;
    overflow: hidden;
    border: 2px solid #333;
}

.reel-window {
    flex: 1;
    height: 360px;
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
    border-radius: 8px;
}

.reel { 
    position: absolute; 
    width: 100%; 
    top: 0; 
    left: 0; 
}

.symbol { 
    height: var(--symbol-height); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 3.5rem; 
}

.spinning { 
    filter: blur(6px); 
}

/* --- PAYLINE OVERLAYS --- */
.payline {
    position: absolute;
    left: 0; 
    width: 100%; 
    height: 4px;
    background: var(--neon-yellow);
    z-index: 10; 
    opacity: 0.05; /* Dim when inactive */
    transition: opacity 0.3s, filter 0.3s;
    pointer-events: none;
}

.d-line { 
    width: 140%; 
    left: -20%; 
}

.payline.active {
    opacity: 1;
    filter: drop-shadow(0 0 12px var(--neon-yellow)) brightness(1.5);
    animation: flash 0.5s infinite alternate;
}

@keyframes flash { 
    from { opacity: 0.5; } 
    to { opacity: 1; } 
}

/* --- BONUS PROGRESS BAR (YELLOW THEME) --- */
.bonus-area {
    margin: 15px 0;
    background: rgba(0,0,0,0.5);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #333;
}

.bonus-label {
    color: var(--neon-yellow);
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 242, 0, 0.4);
}

.progress-container {
    height: 12px;
    background: #111;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #333;
    box-shadow: inset 0 0 5px #000;
}

.progress-fill {
    width: 0%; 
    height: 100%;
    background: linear-gradient(90deg, #fffb00, var(--neon-yellow));
    box-shadow: 0 0 15px var(--neon-yellow);
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 5px;
}

/* --- HORIZONTAL DASHBOARD (BALANCE & BET) --- */
.ui-panel {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 15px;
}

.stat-group { 
    width: 48%; 
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: var(--neon-yellow);
    font-size: 0.85rem;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 0 5px rgba(255, 242, 0, 0.3);
}

.display-box {
    background: #000;
    border: 2px solid var(--neon-purple);
    padding: 10px;
    border-radius: 12px;
    box-shadow: inset 0 0 10px rgba(188, 19, 254, 0.2);
}

#balance { 
    color: #00ff88; /* Emerald green for money */
    font-size: 1.4rem; 
    font-weight: bold; 
}

#bet-select {
    background: transparent; 
    color: var(--gold);
    border: none; 
    font-size: 1.4rem; 
    font-weight: bold;
    width: 100%; 
    text-align-last: center; 
    outline: none;
    cursor: pointer;
    appearance: none;
}

/* --- BUTTONS & CONTROLS --- */
.main-btn {
    width: 100%; 
    padding: 20px;
    font-size: 1.8rem; 
    font-weight: 900;
    background: linear-gradient(var(--neon-blue), #0066ff);
    border: none; 
    border-radius: 15px; 
    color: white;
    cursor: pointer; 
    box-shadow: 0 5px 0 #0044bb;
    transition: transform 0.1s;
}

.main-btn:active { 
    transform: translateY(3px); 
    box-shadow: 0 2px 0 #0044bb; 
}

.side-btn {
    background: transparent; 
    color: #555; 
    border: none;
    margin-top: 10px; 
    cursor: pointer; 
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.side-btn.active { 
    color: var(--neon-purple); 
    text-shadow: 0 0 5px var(--neon-purple);
}

/* --- WIN OVERLAY --- */
.overlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.92); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    z-index: 100; 
}

.win-content { 
    text-align: center; 
    border: 4px solid var(--gold); 
    padding: 40px; 
    border-radius: 30px; 
    background: #111;
    box-shadow: 0 0 30px var(--gold);
}

.win-content h1 { 
    font-size: 4rem; 
    color: var(--gold); 
    margin: 0; 
    text-shadow: 0 0 20px var(--gold); 
}

.payout-sum { 
    color: #888; 
    letter-spacing: 2px; 
    margin-top: 10px; 
    text-transform: uppercase;
}

#win-value { 
    font-size: 5rem; 
    color: white; 
    margin: 15px 0; 
}

.collect-btn { 
    padding: 12px 50px; 
    background: var(--neon-blue); 
    border: none; 
    border-radius: 12px; 
    font-weight: bold; 
    cursor: pointer; 
    color: white; 
    font-size: 1.2rem;
    box-shadow: 0 4px 0 #0044bb;
}

.hidden { 
    display: none; 
}