:root {
    --primary: #ffb300;
    --secondary: #d32f2f;
    --accent: #ffd54f;
    --dark-bg: #1a0000;
    --reel-bg: #2c0000;
    --text-color: #fff8e1;
    --gold-gradient: linear-gradient(180deg, #ffecb3, #ffb300, #ff8f00);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at center, #4a0000, #1a0000);
    overflow-x: hidden;
}

.casino-container {
    width: 95%;
    max-width: 1100px;
    background: rgba(20, 0, 0, 0.8);
    border: 3px solid #ffb300;
    box-shadow: 0 0 40px rgba(255, 179, 0, 0.4), inset 0 0 20px rgba(255, 179, 0, 0.2);
    border-radius: 20px;
    padding: 20px;
    position: relative;
}

/* Header */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 2px solid rgba(255, 179, 0, 0.3);
    padding-bottom: 15px;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.wallet-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.amount {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(255, 213, 79, 0.5);
}

.action-btn {
    background: var(--gold-gradient);
    color: #3e2723;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
}
.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary);
}
.action-btn.danger {
    background: linear-gradient(180deg, #ef5350, #c62828);
    color: white;
}
.action-btn.danger:hover {
    box-shadow: 0 0 15px #c62828;
}

/* Pots Area */
.pots-area {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 180px;
    margin-bottom: 20px;
    padding: 0 50px;
}

.pot-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
}

.pot-label {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px #000;
    background: rgba(0,0,0,0.5);
    padding: 2px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
}

.pot-img {
    width: 120px;
    height: auto;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
}

/* Tinting the pots */
.red-pot { filter: sepia(1) hue-rotate(-50deg) saturate(3) brightness(0.8); }
.blue-pot { filter: sepia(1) hue-rotate(180deg) saturate(3) brightness(0.8); }
.green-pot { filter: sepia(1) hue-rotate(90deg) saturate(3) brightness(0.8); }

.pot-glow {
    position: absolute;
    bottom: 10px;
    width: 100px;
    height: 50px;
    border-radius: 50%;
    filter: blur(20px);
    z-index: 1;
    opacity: 0.6;
    animation: pulseGlow 2s infinite alternate;
}
.pot-glow.red { background: #ff1744; }
.pot-glow.blue { background: #29b6f6; }
.pot-glow.green { background: #69f0ae; }

@keyframes pulseGlow {
    from { opacity: 0.4; transform: scale(1); }
    to { opacity: 0.8; transform: scale(1.2); }
}

/* Slot Machine Area */
.slot-machine {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.glass-frame {
    background: #111;
    border: 8px solid #ffb300;
    border-radius: 15px;
    box-shadow: inset 0 0 30px #000, 0 10px 30px rgba(0,0,0,0.8);
    padding: 10px;
    margin-bottom: 15px;
    width: 100%;
    position: relative;
}

.reels-container {
    display: flex;
    justify-content: space-around;
    height: 360px; /* 3 rows of 120px */
    background: var(--reel-bg);
    overflow: hidden;
    border-radius: 5px;
    position: relative;
}

.reel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 2px solid rgba(255, 179, 0, 0.2);
    position: relative;
}
.reel:last-child {
    border-right: none;
}

.reel-strip {
    display: flex;
    flex-direction: column;
    width: 100%;
    /* Transform applied via JS */
}

.symbol {
    width: 100%;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 10px;
}

.symbol img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.6));
    border-radius: 10px;
}

/* Win Presentation */
.win-presentation {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(3px);
}
.win-text {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    color: #ffeb3b;
    text-shadow: 0 0 20px #ff9800, 0 0 40px #ff5722;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.win-amount {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 0 10px #000;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.machine-message {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 15px;
    min-height: 30px;
    color: var(--accent);
    text-shadow: 0 2px 4px #000;
    letter-spacing: 2px;
}

/* Controls */
.control-panel {
    display: flex;
    width: 100%;
    justify-content: space-between;
    background: linear-gradient(to bottom, #3e2723, #1b0000);
    padding: 15px 25px;
    border-radius: 15px;
    border: 2px solid #ffb300;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

.bet-controls {
    display: flex;
    align-items: center;
    gap: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.control-group label {
    font-size: 0.8rem;
    color: #ffcc80;
    margin-bottom: 8px;
    font-weight: bold;
    letter-spacing: 1px;
}

.stepper {
    display: flex;
    background: #000;
    border-radius: 20px;
    padding: 3px;
    border: 1px solid #ffb300;
}

.stepper button {
    background: linear-gradient(180deg, #5d4037, #3e2723);
    color: #ffb300;
    border: 1px solid #ffb300;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}
.stepper button:active { transform: scale(0.9); }
.stepper span {
    padding: 0 15px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    line-height: 30px;
    font-size: 1.2rem;
}

.info-display span {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--accent);
    background: #000;
    padding: 5px 15px;
    border-radius: 10px;
    border: 1px solid #ffb300;
}

.action-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.primary-btn {
    background: var(--gold-gradient);
    border: 2px solid #fff;
    color: #3e2723;
    padding: 15px 50px;
    font-size: 1.8rem;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 179, 0, 0.6);
    transition: transform 0.1s, filter 0.2s;
}
.primary-btn:active {
    transform: scale(0.95);
}
.primary-btn:disabled {
    filter: grayscale(1) brightness(0.5);
    cursor: not-allowed;
}

.secondary-btn {
    background: linear-gradient(180deg, #424242, #212121);
    color: #ffb300;
    border: 2px solid #ffb300;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
}
.secondary-btn:hover {
    background: linear-gradient(180deg, #616161, #424242);
}
.secondary-btn.active {
    background: var(--gold-gradient);
    color: #000;
}

/* Modals */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}
.hidden { display: none !important; }
.modal-content {
    background: linear-gradient(135deg, #3e2723, #1a0000);
    padding: 40px;
    border-radius: 15px;
    border: 3px solid #ffb300;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
    max-width: 500px;
}
.modal-content.large {
    max-width: 800px;
}
.modal-content h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    margin-top: 0;
    text-shadow: 0 2px 4px #000;
}
.gold-text { color: #ffb300; }
.blue-text { color: #4fc3f7; }
.green-text { color: #69f0ae; }

.amount-options {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    justify-content: center;
}
.fund-opt {
    background: var(--gold-gradient);
    border: none;
    padding: 15px 25px;
    color: #3e2723;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
}
.close-btn {
    background: transparent;
    border: 1px solid #aaa;
    color: #aaa;
    padding: 8px 20px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 10px;
}

/* Jackpot Pick Game */
.jackpot-meters {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.5);
    padding: 15px;
    border-radius: 10px;
}
.meter {
    font-weight: bold;
    font-size: 1.2rem;
}
#meter-mini { color: #4fc3f7; }
#meter-minor { color: #69f0ae; }
#meter-major { color: #ba68c8; }
#meter-grand { color: #ffb300; font-size: 1.4rem; }

.pick-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}
.pick-coin {
    width: 100px;
    height: 100px;
    background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Sycee.jpg/320px-Sycee.jpg') center/cover;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px #000;
}
.pick-coin:hover { transform: scale(1.1); }
.pick-coin.revealed {
    background: #222;
    border: 3px solid #ffb300;
    cursor: default;
    transform: scale(1);
}

/* Flying Coin Animation Class */
.flying-coin {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(255,255,255,0.8);
}

/* Win Animations */
.win-highlight {
    animation: flashBorder 1s infinite alternate;
    position: relative;
}
.win-highlight::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 4px solid #ffb300;
    border-radius: 10px;
    box-shadow: 0 0 15px #ffb300, inset 0 0 15px #ffb300;
    pointer-events: none;
}
@keyframes flashBorder {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Hold & Spin specific */
.cash-value-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 5px #000, 0 0 10px #000;
    z-index: 5;
    background: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 10px;
}
.locked-symbol {
    opacity: 0.8;
}
