body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    margin: 0;
    display: flex;
    justify-content: center;
}

#app {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #333;
    padding: 15px;
    border-radius: 8px;
}

.variant-selector label {
    margin-right: 15px;
    cursor: pointer;
}

#bankroll-display {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
}

/* Roulette Wheel & History */
#roulette-wheel-container {
    text-align: center;
    margin-bottom: 30px;
}

#last-number {
    font-size: 4em;
    font-weight: bold;
    width: 100px;
    height: 100px;
    line-height: 100px;
    margin: 0 auto;
    border-radius: 50%;
    background: #444;
    border: 5px solid #fff;
}

#last-number.red { background-color: #d32f2f; }
#last-number.black { background-color: #212121; }
#last-number.green { background-color: #388e3c; }

#history {
    margin-top: 10px;
    color: #aaa;
}

/* Betting Table Layout */
#betting-table {
    display: grid;
    grid-template-columns: 50px 1fr;
    grid-template-rows: auto auto auto;
    gap: 5px;
    background-color: #006400; /* Green Felt */
    padding: 20px;
    border-radius: 10px;
    border: 5px solid #8b4513; /* Wood border */
    position: relative;
}

.bet-area {
    border: 1px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
    user-select: none;
    min-height: 40px;
}

.bet-area:hover {
    background-color: rgba(255,255,255,0.2);
}

.bet-chip {
    position: absolute;
    width: 24px;
    height: 24px;
    background: gold;
    border-radius: 50%;
    color: black;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 2px rgba(0,0,0,0.5);
    pointer-events: none;
}

.zero {
    grid-column: 1;
    grid-row: 1 / span 3; /* Spans the height of the numbers grid */
    background-color: transparent;
    border-radius: 50px 0 0 50px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.numbers-grid {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(13, 1fr); /* 12 numbers + column bet */
    grid-template-rows: repeat(3, 1fr);
    grid-auto-flow: column; /* Fill columns first */
    gap: 2px;
}

.bet-area.red { background-color: #d32f2f; color: white; }
.bet-area.black { background-color: #212121; color: white; }
.bet-area.col-bet { background-color: transparent; border: 1px solid rgba(255,255,255,0.3); }

.dozens-grid {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2px;
    margin-top: 5px;
    margin-right: 7%; /* Align roughly with numbers 1-36, excluding col bets */
}

.even-money-grid {
    grid-column: 2;
    grid-row: 3;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 2px;
    margin-top: 5px;
    margin-right: 7%;
}

.red-bet { background-color: #d32f2f; }
.black-bet { background-color: #212121; }

/* Controls */
#controls {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #333;
    border-radius: 8px;
}

.chip {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px dashed #fff;
    margin-right: 5px;
    cursor: pointer;
    font-weight: bold;
}
.chip[data-value="1"] { background: white; color: black; }
.chip[data-value="5"] { background: red; color: white; }
.chip[data-value="10"] { background: blue; color: white; }
.chip[data-value="25"] { background: green; color: white; }
.chip[data-value="100"] { background: black; color: white; border: 2px solid gold; }

.chip.selected {
    transform: scale(1.1);
    box-shadow: 0 0 10px gold;
    border-style: solid;
}

#spin-btn {
    padding: 10px 30px;
    font-size: 1.2em;
    background: gold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

#spin-btn:hover { background: #ffed4a; }

/* Strategies */
#strategies {
    margin-top: 20px;
    background: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
}

.strategy-controls button {
    padding: 8px 15px;
    margin-right: 10px;
    background: #444;
    color: white;
    border: 1px solid #666;
    cursor: pointer;
}

.strategy-controls button.active {
    background: #4caf50;
    border-color: #4caf50;
}

#strategy-info {
    margin-top: 10px;
    font-style: italic;
    color: #ccc;
}


/* Navigation */
.main-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: #444;
    border: none;
    color: #aaa;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #555;
    color: #fff;
}

.nav-btn.active {
    background: #2196f3;
    color: white;
}

.hidden {
    display: none !important;
}

/* Live Assistant Styles */
.live-container {
    max-width: 600px;
    margin: 0 auto;
}

.panel {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    background: #333;
    border: 1px solid #555;
    color: white;
    border-radius: 5px;
    font-size: 1em;
}

#btn-start-live {
    width: 100%;
    padding: 15px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

#btn-start-live:hover { background: #45a049; }

/* Live Game UI */
.live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.live-stat {
    font-size: 1.2em;
    font-weight: bold;
}

#live-instruction-box {
    text-align: center;
    background: #333;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #2196f3;
}

.instruction-big {
    font-size: 2em;
    font-weight: bold;
    color: #fff;
    margin-top: 10px;
}

.live-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.win-btn, .loss-btn {
    flex: 1;
    padding: 20px;
    font-size: 1.5em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: transform 0.1s;
}

.win-btn { background: #2e7d32; box-shadow: 0 4px 0 #1b5e20; }
.loss-btn { background: #c62828; box-shadow: 0 4px 0 #b71c1c; }

.win-btn:active, .loss-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.alert-box {
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
    min-height: 20px;
}

.alert-success { color: #4caf50; }
.alert-danger { color: #f44336; }
.alert-warning { color: #ff9800; }

.live-history {
    background: #222;
    padding: 10px;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
}

#live-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#live-history-list li {
    padding: 5px 0;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
}

.result-win { color: #4caf50; }
.result-loss { color: #f44336; }

.small-btn {
    padding: 5px 10px;
    background: #555;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.disclaimer {
    margin-top: 20px;
    font-size: 0.8em;
    color: #888;
    text-align: center;
    padding: 10px;
    border-top: 1px solid #333;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: #444;
    border: none;
    color: #aaa;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #555;
    color: #fff;
}

.nav-btn.active {
    background: #2196f3;
    color: white;
}

.hidden {
    display: none !important;
}

/* Live Assistant Styles */
.live-container {
    max-width: 600px;
    margin: 0 auto;
}

.panel {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    background: #333;
    border: 1px solid #555;
    color: white;
    border-radius: 5px;
    font-size: 1em;
}

#btn-start-live {
    width: 100%;
    padding: 15px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

#btn-start-live:hover { background: #45a049; }

/* Live Game UI */
.live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.live-stat {
    font-size: 1.2em;
    font-weight: bold;
}

#live-instruction-box {
    text-align: center;
    background: #333;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #2196f3;
}

.instruction-big {
    font-size: 2em;
    font-weight: bold;
    color: #fff;
    margin-top: 10px;
}

.live-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.win-btn, .loss-btn {
    flex: 1;
    padding: 20px;
    font-size: 1.5em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: transform 0.1s;
}

.win-btn { background: #2e7d32; box-shadow: 0 4px 0 #1b5e20; }
.loss-btn { background: #c62828; box-shadow: 0 4px 0 #b71c1c; }

.win-btn:active, .loss-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.alert-box {
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
    min-height: 20px;
}

.alert-success { color: #4caf50; }
.alert-danger { color: #f44336; }
.alert-warning { color: #ff9800; }

.live-history {
    background: #222;
    padding: 10px;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
}

#live-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#live-history-list li {
    padding: 5px 0;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
}

.result-win { color: #4caf50; }
.result-loss { color: #f44336; }

.small-btn {
    padding: 5px 10px;
    background: #555;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.disclaimer {
    margin-top: 20px;
    font-size: 0.8em;
    color: #888;
    text-align: center;
    padding: 10px;
    border-top: 1px solid #333;
}
