:root {
    --bg-color: #2d0a0a;
    --gold: #ffd700;
    --gold-dark: #b8860b;
    --container-bg: rgba(45, 10, 10, 0.95);
    --text-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.8);
    --button-bg: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
    --ladder-line: #b8860b;
    --active-line: #ff0000;
}

[data-theme="dark"] {
    --bg-color: #0a0a0a;
    --container-bg: rgba(20, 20, 20, 0.98);
}

body {
    font-family: 'Pretendard', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: #1a0505;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    color: var(--text-color);
    overflow-y: auto;
    padding: 2rem 0;
}

.casino-frame {
    padding: 20px;
    background: #4a0000;
    border: 10px solid #b8860b;
    border-radius: 40px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.container {
    text-align: center;
    background: var(--container-bg);
    padding: 2.5rem;
    border-radius: 30px;
    border: 2px solid var(--gold);
    width: 95%;
    max-width: 800px;
}

.neon-sign {
    font-size: 2rem;
    font-weight: 900;
    color: #ff0000;
    text-shadow: 0 0 10px #ff0000;
    margin-bottom: 1rem;
}

h1 { color: var(--gold); margin-bottom: 2rem; }

.setup-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    background: #000;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--gold-dark);
}

.setup-section select {
    padding: 5px 10px;
    background: #222;
    color: white;
    border: 1px solid var(--gold);
}

.ladder-wrapper {
    overflow-x: auto;
    padding: 20px 0;
    margin-bottom: 30px;
}

#ladder-container {
    position: relative;
    margin: 0 auto;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 40px 0;
}

.ladder-column {
    position: absolute;
    width: 4px;
    background: var(--ladder-line);
    top: 0;
    bottom: 0;
    transition: background 0.3s;
}

.ladder-horizontal {
    position: absolute;
    height: 4px;
    background: var(--ladder-line);
    transition: background 0.3s;
}

.player-node, .result-node {
    position: absolute;
    width: 60px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    background: #333;
    border: 1px solid var(--gold);
    left: 50%;
    transform: translateX(-50%);
}

.player-node { top: -50px; background: var(--button-bg); color: #3e2723; }
.result-node { bottom: -50px; background: #111; color: var(--gold); cursor: default; }

.player-node:hover { transform: translateX(-50%) scale(1.1); }

.active-path {
    background: var(--active-line) !important;
    box-shadow: 0 0 10px var(--active-line);
    z-index: 5;
}

#result-message {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--gold);
    height: 1.5rem;
}

#reset-ladder {
    background: #ff0000;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.divider { border: 0; height: 1px; background: var(--gold-dark); margin: 3rem 0; }
#theme-toggle { position: absolute; top: 1rem; right: 1rem; background: rgba(255,255,255,0.1); color: white; border: 1px solid white; padding: 5px 10px; font-size: 0.7rem; border-radius: 20px; }
.contact-section h2 { color: var(--gold); }
input, textarea { background: rgba(255,255,255,0.05); color: white; border: 1px solid var(--gold-dark); width: 100%; padding: 10px; box-sizing: border-box; margin-bottom: 10px; }
.submit-btn { width: 100%; padding: 10px; background: var(--button-bg); color: #3e2723; font-weight: bold; border: none; border-radius: 5px; cursor: pointer; }