* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #1a472a;
    color: #fff;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #ffd700;
}

h2 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 1.3em;
}

h3 {
    color: #ffd700;
    margin-bottom: 8px;
    font-size: 1.1em;
}

/* Parameters Section */
.parameters {
    background-color: #0d2818;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.param-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.param-group label {
    font-weight: bold;
}

.param-group input {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ffd700;
    background-color: #2d5a3d;
    color: #fff;
    width: 100px;
}

#timeRemaining {
    font-size: 1.2em;
    color: #ffd700;
    font-weight: bold;
}

/* NEW: Spin Result Styles */
.spin-result {
    font-weight: bold;
    font-size: 1.1em;
    padding: 5px 15px;
    border-radius: 4px;
    display: inline-block;
    min-width: 120px;
    text-align: center;
    transition: all 0.3s ease;
}

.spin-result.win {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.spin-result.loss {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.spin-result.neutral {
    background-color: #e2e3e5;
    color: #383d41;
    border: 2px solid #6c757d;
}
/* END NEW */

/* Session Status */
.session-status {
    margin-left: auto;
}

.status-neutral {
    color: #ffd700;
}

.status-winning {
    color: #00ff00;
}

.status-losing {
    color: #ff0000;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.left-column, .right-column {
    background-color: #0d2818;
    padding: 20px;
    border-radius: 8px;
}

/* Current Bankroll */
.current-bankroll {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #2d5a3d;
    border-radius: 5px;
}

/* Betting Board */
.betting-board {
    margin-bottom: 20px;
}

.zero {
    background-color: #0f8a3d !important;
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 10px;
    height: 60px;
    aspect-ratio: auto;
}

.main-grid {
    display: flex;
    gap: 5px;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 3px;
    flex: 1;
    position: relative;
}

.number-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    border: 2px solid #ffd700;
    transition: all 0.2s;
}

.number-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px #ffd700;
}

.number-cell.red {
    background-color: #c41e3a;
}

.number-cell.black {
    background-color: #000;
}

.number-cell.has-bet {
    box-shadow: 0 0 15px #00ff00;
}

.bet-chip {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 215, 0, 0.9);
    color: #000;
    border-radius: 2px;
    border: 1px solid #000;
    width: auto;
    height: auto;
    padding: 3px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6em;
    font-weight: bold;
    pointer-events: none;
    z-index: 2;
    white-space: nowrap;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* Yellow background with black border for split, street, corner, and double street bets - match payout indicator style */
.bet-chip.special-bet {
    border-radius: 2px;
    border: 1px solid #000;
    background-color: rgba(255, 215, 0, 0.9);
    color: #000;
    width: auto;
    height: auto;
    padding: 3px 6px;
    font-size: 0.6em;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.payout-indicator {
    position: absolute;
    bottom: 13px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6em;
    font-weight: bold;
    padding: 1px 3px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 1;
    white-space: nowrap;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.payout-indicator.profit {
    background-color: rgba(0, 255, 0, 0.8);
    color: #000;
}

.payout-indicator.loss {
    background-color: rgba(255, 0, 0, 0.8);
    color: #fff;
}

/* Column Bets */
.column-bets {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 80px;
}

.column-bet {
    flex: 1;
    background-color: #2d5a3d;
    border: 2px solid #ffd700;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 0.9em;
    line-height: 1.2;
    position: relative;
}

.column-bet:hover {
    background-color: #3d6a4d;
    transform: scale(1.05);
}

/* Outside Bets (Even Money) */
.outside-bets {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.outside-bet {
    background-color: #2d5a3d;
    border: 2px solid #ffd700;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.outside-bet:hover {
    background-color: #3d6a4d;
    transform: scale(1.05);
}

.outside-bet.red-bet {
    background-color: #c41e3a;
}

.outside-bet.red-bet:hover {
    background-color: #d41e3a;
}

.outside-bet.black-bet {
    background-color: #000;
}

.outside-bet.black-bet:hover {
    background-color: #1a1a1a;
}

/* Split, Corner, Street, Double Street Betting Zones */
.split-bet, .corner-bet, .street-bet, .double-street-bet {
    position: absolute;
    background-color: rgba(255, 215, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.6);
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s;
}

/* Make all special betting zones transparent */
.split-bet, .corner-bet, .street-bet, .double-street-bet {
    background-color: transparent;
    border: 1px solid transparent;
}

.split-bet:hover, .corner-bet:hover, .street-bet:hover, .double-street-bet:hover {
    background-color: transparent;
    border: 1px solid transparent;
}

.split-bet.has-bet, .corner-bet.has-bet, .street-bet.has-bet, .double-street-bet.has-bet {
    background-color: transparent;
    box-shadow: none;
}

/* Horizontal splits (between columns) */
.split-bet.horizontal {
    width: 8px;
    height: calc(33.33% + 3px);
}

/* Vertical splits (between rows) */
.split-bet.vertical {
    width: calc(8.33% + 3px);
    height: 8px;
}

/* Corner bets (intersection of 4 numbers) */
.corner-bet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Street bets (row of 3) - circular gold hotspots */
.street-bet {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* Double street bets (2 rows of 3) */
.double-street-bet {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

/* Dozens Bets */
.dozens-bets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.dozen-bet {
    background-color: #2d5a3d;
    border: 2px solid #ffd700;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.dozen-bet:hover {
    background-color: #3d6a4d;
    transform: scale(1.05);
}

/* Chip Selection */
.chip-selection {
    margin: 20px 0;
    text-align: center;
}

.chips {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    align-items: center;
}

.chip {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #ffd700;
    background-color: #c41e3a;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px #ffd700;
}

.chip.active {
    background-color: #ffd700;
    color: #000;
    box-shadow: 0 0 20px #00ff00;
}

.custom-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.custom-chip input {
    width: 50px;
    padding: 0;
    border: none;
    background-color: transparent;
    color: #fff;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    outline: none;
}

.custom-chip.active input {
    color: #000;
}

.custom-chip input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9em;
}

.custom-chip.active input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.custom-chip input::-webkit-outer-spin-button,
.custom-chip input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-chip input[type=number] {
    -moz-appearance: textfield;
}

/* Betting Controls */
.betting-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

/* Statistics Panel */
.statistics-panel {
    background-color: #0d2818;
    border: 2px solid #ffd700;
    border-radius: 8px;
    margin-top: 20px;
    overflow: hidden;
}

.stats-header {
    background-color: #2d5a3d;
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.stats-header:hover {
    background-color: #3d6a4d;
}

.stats-header h3 {
    margin: 0;
}

.toggle-icon {
    font-size: 1.2em;
    transition: transform 0.3s;
}

.toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.stats-content {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    max-height: 800px;
    overflow-y: auto;
}

.stats-content.hidden {
    display: none;
}

.stat-section {
    background-color: #2d5a3d;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ffd700;
}

.stat-section h4 {
    color: #ffd700;
    margin: 0 0 10px 0;
    font-size: 1em;
}

/* Number Lists */
.number-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.number-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid #ffd700;
    font-size: 0.9em;
}

.number-badge.red {
    background-color: #c41e3a;
}

.number-badge.black {
    background-color: #000;
}

.number-badge.zero {
    background-color: #0f8a3d;
}

.number-badge .count {
    font-size: 0.7em;
    color: #ffd700;
}

/* Streaks */
.streak-list, .gap-grid, .session-stats, .repeat-stats, .analysis-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.streak-list div, .gap-grid div, .session-stats div, .repeat-stats div, .analysis-grid div {
    display: flex;
    justify-content: space-between;
}

.streak-list span, .gap-grid span, .session-stats span, .repeat-stats span, .analysis-grid span {
    color: #ffd700;
    font-weight: bold;
}

/* Distribution Bars */
.distribution-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dist-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dist-label {
    width: 50px;
    font-weight: bold;
}

.bar-container {
    flex: 1;
    height: 20px;
    background-color: #0d2818;
    border-radius: 10px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    transition: width 0.3s ease;
}

.dist-value {
    width: 45px;
    text-align: right;
    color: #ffd700;
    font-weight: bold;
}

/* Financial Stats Colors */
.session-stats #netPL {
    color: #ffd700;
}

.session-stats #netPL.positive {
    color: #00ff00;
}

.session-stats #netPL.negative {
    color: #ff0000;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #2d5a3d;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #ffd700;
}

.btn:hover {
    background-color: #3d6a4d;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-warning {
    background-color: #c41e3a;
}

.btn-warning:hover {
    background-color: #d41e3a;
}

/* Winning Board */
.winning-board-section {
    margin-bottom: 20px;
}

.winning-board {
    margin-bottom: 15px;
}

.win-main-grid {
    margin-top: 10px;
}

.win-numbers-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 3px;
}

.win-number {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid #ffd700;
    transition: all 0.2s;
}

.win-number:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px #ffd700;
}

.win-number.red {
    background-color: #c41e3a;
}

.win-number.black {
    background-color: #000;
}

.win-number.zero {
    background-color: #0f8a3d !important;
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 10px;
    height: 60px;
    aspect-ratio: auto;
}

.win-number.winning {
    animation: pulse 0.5s ease-in-out;
    box-shadow: 0 0 20px #00ff00;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Counters */
.counters {
    background-color: #2d5a3d;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.counter-grid {
    display: grid;
    gap: 10px;
}

.counter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.counter-item strong {
    color: #ffd700;
}

.counter-item span {
    margin-right: 15px;
}

/* History */
.history-section {
    margin-bottom: 20px;
}

.spin-history {
    background-color: #2d5a3d;
    padding: 10px;
    border-radius: 5px;
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.history-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid #ffd700;
    font-size: 0.9em;
}

.history-number.red {
    background-color: #c41e3a;
}

.history-number.black {
    background-color: #000;
}

.history-number.zero {
    background-color: #0f8a3d;
}

/* Notepad */
.notepad-section {
    margin-bottom: 20px;
}

#notepad {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border-radius: 5px;
    border: 2px solid #ffd700;
    background-color: #2d5a3d;
    color: #fff;
    font-family: Arial, sans-serif;
    resize: vertical;
    margin-bottom: 10px;
}

/* Loss Recovery */
.loss-recovery-section {
    background-color: #2d5a3d;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.placeholder {
    color: #999;
    font-style: italic;
}

/* Export */
.export-section {
    text-align: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #0d2818;
    margin: 15% auto;
    padding: 30px;
    border: 3px solid #ffd700;
    border-radius: 10px;
    width: 400px;
    text-align: center;
}

.modal-content h2 {
    color: #c41e3a;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0d2818;
}

::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffed4e;
}

/* Responsive */
@media (max-width: 1400px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}
