﻿/* Roulette Specific Styles */

.game-container {
    max-width: 480px;
    margin: 100px auto 100px auto;
    background-color: #1a2a36; /* Dark theme */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    padding: 20px;
}

/* Wheel Visual */
.roulette-wheel-simple {
    width: 250px;
    height: 125px;
    background: radial-gradient(circle at bottom, #2a2a2a, #111);
    border-top-left-radius: 250px;
    border-top-right-radius: 250px;
    margin: 0 auto 20px auto;
    position: relative;
    border: 5px solid #444;
    border-bottom: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
}

.wheel-result {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    transition: transform 0.3s;
}

.wheel-result.num-red { color: #ff3b30; }
.wheel-result.num-black { color: #fff; }
.wheel-result.num-green { color: #34c759; }

.wheel-spinning {
    animation: blink 0.1s infinite alternate;
}
@keyframes blink {
    0% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Board Layout */
.board-layout {
    background-color: #e5e5e5; /* The image uses a light background for the board area */
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Let's make it fit the dark theme nicely */
.game-container .board-layout {
    background-color: #0b151c;
    border: 1px solid rgba(255,255,255,0.1);
}

.bet-spot {
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: filter 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}
.bet-spot:hover {
    filter: brightness(1.2);
}

/* Chip Placement */
.placed-chip {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: #ffeb3b;
    border-radius: 50%;
    border: 2px dashed #f57f17;
    color: black;
    font-size: 0.6rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* Specific areas */
.board-top {
    display: flex;
    margin-bottom: 5px;
    padding-left: 50px; /* offset for left column */
    padding-right: 50px; /* offset for right column */
}
.board-zero {
    flex: 1;
    height: 40px;
    background-color: #8bc34a; /* Green */
    border-radius: 4px;
}

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

.board-left, .board-right {
    width: 45px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.board-out, .board-dozen {
    flex: 1; /* evenly divide vertical space */
    background-color: #15222c;
    color: #bbb;
    font-size: 0.75rem;
    border-radius: 4px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg); /* Text orientation matching image */
}

.red-diamond {
    width: 15px;
    height: 15px;
    background-color: #d32f2f;
    transform: rotate(45deg);
}
.black-diamond {
    width: 15px;
    height: 15px;
    background-color: #111;
    transform: rotate(45deg);
}

.board-out.num-red { background-color: #15222c; }
.board-out.num-black { background-color: #15222c; }

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

.board-num {
    background-color: #111; /* Default black */
    font-size: 1.1rem;
    border-radius: 4px;
}
.board-num.num-red {
    background-color: #d32f2f; /* Red */
}

.board-bottom {
    display: flex;
    margin-top: 5px;
    padding-left: 50px;
    padding-right: 50px;
    gap: 5px;
}
.board-2to1 {
    flex: 1;
    height: 40px;
    background-color: #15222c;
    color: #bbb;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Chips Bar */
.roulette-chips {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.chip {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: radial-gradient(circle at top left, #fff, #ddd);
    border: 3px dashed #ccc;
    color: #333;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.1s, border-color 0.2s;
    user-select: none;
}
.chip:hover {
    transform: translateY(-2px);
}
.chip.active {
    border-color: #8bc34a;
    box-shadow: 0 0 10px #8bc34a;
    transform: scale(1.1);
}

/* Custom Chip Colors */
.chip:nth-child(1) { border-color: #9c27b0; }
.chip:nth-child(2) { border-color: #00bcd4; }
.chip:nth-child(3) { border-color: #4caf50; }
.chip:nth-child(4) { border-color: #ff9800; }
.chip:nth-child(5) { border-color: #2196f3; }
.chip:nth-child(6) { border-color: #f44336; }
.chip:nth-child(7) { border-color: #ffc107; }

/* Controls */
.text-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}
.text-btn:hover { color: white; }
.text-red:hover { color: #ff3b30; }

@media (max-width: 600px) {
    .board-top, .board-bottom {
        padding-left: 30px;
        padding-right: 30px;
    }
    .board-left, .board-right { width: 25px; }
    .board-out, .board-dozen { font-size: 0.6rem; }
    .board-num { font-size: 0.9rem; }
    .board-numbers-grid { grid-template-rows: repeat(12, 35px); }
    .board-zero, .board-2to1 { height: 35px; }
}



.btn-roll {
    background-color: #8bc34a;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}
.btn-roll:hover {
    background-color: #7cb342;
}
.btn-roll:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* NEW WHEEL ARC DESIGN */
.wheel-arc-container {
    display: flex;
    justify-content: center;
    position: relative;
    margin-bottom: 20px;
}
.wheel-arc {
    display: flex;
    background-color: #2a2e38;
    border-radius: 100px 100px 0 0;
    padding: 10px 20px 20px 20px;
    border: 3px solid #666;
    border-bottom: none;
    gap: 2px;
    overflow: hidden;
    position: relative;
}
.wheel-slot {
    width: 35px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5px;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    position: relative;
}
.wheel-slot.num-red { background-color: #c82d3b; }
.wheel-slot.num-black { background-color: #1c202d; }
.wheel-slot.num-green { background-color: #8bc34a; }

/* Pointer */
.wheel-pointer {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.8);
    z-index: 10;
}

/* OVERRIDE COLORS TO MATCH IMAGE */
.board-zero.num-green { background-color: #8bc34a; }
.board-num.num-red { background-color: #c82d3b; }
.board-num { background-color: #1c202d; }

.board-layout {
    background-color: #0b151c !important; /* Keep dark theme */
    border: none !important;
}

/* Text orientation fix for side bars */
.board-out span, .board-dozen span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}
.board-out, .board-dozen {
    writing-mode: horizontal-tb; /* Reset for container */
    transform: none;
    align-items: center;
    justify-content: center;
    background-color: #e5e5e5;
    color: #333; /* Image has them light gray with dark text */
}

/* Keep dark theme for sidebars */
.board-out, .board-dozen, .board-2to1 {
    background-color: #e5e5e5;
    color: #333;
}
/* Wait, user wants dark layout, let's keep sidebars dark gray */
.board-out, .board-dozen, .board-2to1 {
    background-color: #15222c !important;
    color: #bbb !important;
}

/* CHIPS STYLING */
.roulette-chips {
    gap: 15px;
}
.chip {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: radial-gradient(circle at center, #fff 50%, #e0e0e0 100%);
    color: #111;
    font-size: 0.75rem;
    font-weight: 800;
    border: none;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}
.chip::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 3px dashed;
}
.chip-100::after { border-color: #9c27b0; }
.chip-1k::after { border-color: #00bcd4; }
.chip-10k::after { border-color: #4caf50; }
.chip-100k::after { border-color: #ff9800; }
.chip-1m::after { border-color: #2196f3; }
.chip-10m::after { border-color: #f44336; }
.chip-100m {
    background: radial-gradient(circle at center, #ffeb3b 50%, #fbc02d 100%);
}
.chip-100m::after { border-color: #d32f2f; }

.chip.active {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 15px rgba(0,0,0,0.5);
}

/* CONTROLS LAYOUT */
.roulette-controls-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}
.control-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.auto-wrap {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}
.empty-wrap {
    flex: 1;
}
.btn-spin-wide {
    width: 200px;
    background-color: #39b5e5; /* Match light blue from image */
    color: white;
    font-size: 1.2rem;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(57,181,229,0.3);
}
.control-row-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.text-btn {
    background: transparent;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.text-blue { color: #39b5e5; }
.text-red { color: #ff3b30; }


/* ============================
   GAME HISTORY BAR
   ============================ */
.history-bar-section {
    margin-bottom: 15px;
}
.history-bar-label {
    display: block;
    color: #3498db;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.history-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow: hidden;
    background-color: #0b151c;
    border-radius: 6px;
    padding: 8px 10px;
    gap: 6px;
    min-height: 42px;
    position: relative;
}
.history-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: white;
    animation: slideInRight 0.4s ease;
}
.history-num.num-red   { background-color: #c82d3b; }
.history-num.num-black { background-color: #1c202d; border: 1px solid #444; }
.history-num.num-green { background-color: #4caf50; }

@keyframes slideInRight {
    from {
        transform: translateX(60px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
