﻿:root {
    --machine-body: #1e1e1e;
    --machine-edge: #333333;
    --window-bg: #0f0f15;
    --gold-accent: #d4af37;
    --red-accent: #e63946;
    --text-main: #f8f9fa;
    --text-muted: #a0a5b5;
    --shadow-main: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-inset: inset 0 10px 20px rgba(0, 0, 0, 0.8);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #000000;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 2rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

.main-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 2rem 0;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-main);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mode-container {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.controls {
    display: flex;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.radio-label {
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s;
}

.radio-label:hover {
    color: var(--text-main);
}

.radio-label input {
    cursor: pointer;
    accent-color: var(--gold-accent);
}

.layout-container {
    display: flex;
    gap: 4rem;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    width: 100%;
}

.slot-machine {
    background: var(--machine-body);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 
        var(--shadow-main),
        inset 0 2px 0 rgba(255,255,255,0.1),
        inset 0 -2px 0 rgba(0,0,0,0.5),
        0 0 0 1px var(--machine-edge);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 380px;
}

.lights-container {
    position: absolute;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}
.lights-container.top { top: 15px; left: 30px; right: 30px; flex-direction: row; }
.lights-container.bottom { bottom: 15px; left: 30px; right: 30px; flex-direction: row; }
.lights-container.left { left: 15px; top: 30px; bottom: 30px; flex-direction: column; }
.lights-container.right { right: 15px; top: 30px; bottom: 30px; flex-direction: column; }

.casino-bulb {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    animation: elegantPulse 1.5s infinite alternate;
}

@keyframes elegantPulse {
    0% { background: #333; box-shadow: none; }
    100% { background: var(--gold-accent); box-shadow: 0 0 8px var(--gold-accent); }
}

.slot-window {
    background: var(--window-bg);
    width: 100%;
    height: 180px;
    border-radius: 12px;
    box-shadow: var(--shadow-inset), 0 2px 0 rgba(255,255,255,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #111;
    position: relative;
    overflow: hidden;
}

.slot-window::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
}

#result {
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #444; 
    transition: none; /* Removed so animation holds */
}

.spinning {
    color: var(--text-main) !important;
    animation: slotScroll 0.1s infinite linear;
}

@keyframes slotScroll {
    0% { transform: translateY(-40px); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(40px); opacity: 0; }
}

.yes { color: #4ade80 !important; text-shadow: 0 0 20px rgba(74, 222, 128, 0.4); }
.no { color: #f87171 !important; text-shadow: 0 0 20px rgba(248, 113, 113, 0.4); }
.maybe { color: #fbbf24 !important; text-shadow: 0 0 20px rgba(251, 191, 36, 0.4); }

.lever-container {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 180px;
    cursor: pointer;
    perspective: 800px;
    z-index: 10;
}

.lever-base {
    position: absolute;
    left: 0;
    top: 40px;
    width: 25px;
    height: 100px;
    background: linear-gradient(90deg, #111, #333 30%, #444 50%, #222 80%, #111 100%);
    border-radius: 0 12px 12px 0;
    box-shadow: 8px 0 15px rgba(0,0,0,0.5), inset 0 2px 5px rgba(255,255,255,0.1);
}

.lever-stick-wrapper {
    position: absolute;
    left: 12px;
    top: 0;
    width: 30px;
    height: 180px;
}

.lever-stick {
    position: absolute;
    bottom: 50%;
    left: 0;
    width: 14px;
    height: 130px;
    background: linear-gradient(90deg, #666, #aaa 40%, #ccc 50%, #888 80%, #555 100%);
    transform-origin: bottom center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 7px;
    transform: rotateX(15deg);
    box-shadow: 5px 0 10px rgba(0,0,0,0.3);
}

.lever-container.pulled .lever-stick {
    transform: rotateX(160deg);
    transition: transform 0.15s ease-in;
}

.lever-knob {
    position: absolute;
    top: -20px;
    left: -13px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff4b4b 0%, var(--red-accent) 40%, #8a1010 100%);
    box-shadow: 0 10px 15px rgba(0,0,0,0.4), inset -3px -3px 10px rgba(0,0,0,0.3);
}

.lever-knob::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 8px;
    width: 10px;
    height: 6px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    transform: rotate(-30deg);
}

.lever-container.disabled {
    cursor: not-allowed;
    filter: brightness(0.7) grayscale(0.2);
    pointer-events: none;
}

.pull-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 2rem;
}

.spin-counter {
    color: var(--gold-accent);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 600;
    display: none;
}
.spin-counter.active { display: block; }

.history-panel {
    background: var(--machine-body);
    border: 1px solid var(--machine-edge);
    border-radius: 20px;
    padding: 2rem;
    width: 280px;
    height: 380px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-main);
}

.history-title {
    color: var(--text-main);
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
    text-align: center;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 10px;
}

.history-list::-webkit-scrollbar { width: 6px; }
.history-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
.history-list::-webkit-scrollbar-thumb { background: var(--machine-edge); border-radius: 3px; }

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1rem;
    color: var(--text-muted);
}

.history-item span:last-child { 
    font-weight: 700; 
    color: var(--text-main);
}

.history-item.final-winner {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-accent);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
    font-weight: 700;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.btn-clear {
    background: transparent;
    color: var(--red-accent);
    border: 1px solid var(--red-accent);
    padding: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-clear:hover {
    background: var(--red-accent);
    color: white;
}

.theme-picker { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
} 

.theme-label { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-right: 5px; 
} 

.color-circle { 
    display: inline-block;
    width: 24px; 
    height: 24px; 
    border-radius: 50%; 
    border: 2px solid rgba(255,255,255,0.2); 
    cursor: pointer; 
    padding: 0; 
    outline: none; 
    transition: transform 0.2s, border-color 0.2s; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); 
} 

.color-circle:hover { 
    transform: scale(1.15); 
} 

.color-circle.active { 
    border-color: var(--gold-accent); 
    transform: scale(1.15); 
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4); 
}


