body {
    background-color: #1a1a1a;
    color: white;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column; /* Alinha o conteúdo verticalmente para o footer */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.main-footer {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 0.9em;
    border-top: 1px solid #333;
    width: 100%;
    max-width: 900px;
}

.main-footer a {
    color: #4a9eff;
    text-decoration: none;
}

.main-footer a:hover {
    text-decoration: underline;
}

.main-footer p {
    margin: 8px 0;
    line-height: 1.4;
}

.demo-notice {
    font-style: italic;
    color: #666;
    font-size: 0.85em;
}

.demo-notice strong {
    color: #ff4d4d;
    display: block;
    margin-top: 5px;
    font-size: 1.1em;
}

.container {
    text-align: center;
    background: #2d2d2d;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.chrome-notice {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #ffeeba;
    font-size: 0.9em;
}

.status-panel {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
}

.mini-statistics-in {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.mini-statistics-item {
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    min-width: 25px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: bold;
    color: white;
}

.mini-statistics-item.green { background-color: #008000; }
.mini-statistics-item.red { background-color: #e60000; }
.mini-statistics-item.black { background-color: #1a1a1a; }

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
}

.balance-in {
    color: #4CAF50;
    font-size: 1.2em;
}

.betting-time {
    color: #FFC107;
    font-size: 1.4em;
    padding: 5px 15px;
    border: 2px solid #FFC107;
    border-radius: 20px;
}

.board-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    background: #004d00;
    padding: 15px;
    border-radius: 5px 5px 0 0;
    margin: 0 auto;
    width: fit-content;
}

.board-left {
    display: flex;
    align-items: center;
}

.board-center {
    display: flex;
    margin: 0 5px;
}

.board-right {
    display: flex;
    flex-direction: column;
}

.column-bets {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.column-bets .board-cell {
    flex: 1;
    width: 60px;
    font-size: 0.9em;
}

.board-bottom {
    background: #004d00;
    padding: 5px 15px 15px 15px;
    border-radius: 0 0 5px 5px;
    margin: 0 auto 20px auto;
    width: fit-content;
}

.external-bets {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.external-bets .board-cell {
    width: 80px;
    height: 50px;
    font-size: 0.9em;
}

.numbers-grid {
    display: flex;
}

.column {
    display: flex;
    flex-direction: column;
}

/* Ficha sobre a célula */
.bet-chip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: #ffc107;
    border: 2px solid white;
    border-radius: 50%;
    color: black;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    pointer-events: none;
}

.board-cell {
    width: 50px;
    height: 60px;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    position: relative;
}

.board-cell:hover {
    transform: scale(1.05);
    z-index: 2;
    background-color: rgba(255,255,255,0.1);
}

.board-cell.green { background-color: #008000; height: 152px; }
.board-cell.red { background-color: #e60000; }
.board-cell.black { background-color: #1a1a1a; }

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #222;
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid #444;
}

.username {
    color: #fff;
    font-size: 0.9em;
}

.btn-logout {
    background: #dc3545;
    color: white;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    transition: background 0.3s;
}

.btn-reset {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    margin-right: 10px;
    transition: background 0.3s;
}

.btn-reset:hover {
    background: #e0a800;
}

.btn-undo {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    margin-right: 10px;
    transition: background 0.3s;
}

.btn-undo:hover {
    background: #5a6268;
}

.btn-logout:hover {
    background: #c82333;
}

/* Histórico em Grade de 25 Colunas */
.history-section {
    margin-top: 30px;
    background: #111;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
}

.history-section h3 {
    margin-top: 0;
    color: #888;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.history-grid-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    background: #0a0a0a;
    border-radius: 5px;
    border: 1px solid #222;
    scrollbar-width: thin;
    scrollbar-color: #444 #111;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(25, 1fr);
    gap: 8px;
    justify-items: center;
}

.history-badge-small {
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    color: white;
    font-size: 0.85em;
    transition: transform 0.2s;
}

.history-badge-small:hover {
    transform: scale(1.2);
    z-index: 5;
}

.history-badge-small.red { background: #e60000; box-shadow: 0 0 5px rgba(230, 0, 0, 0.5); }
.history-badge-small.black { background: #1a1a1a; border: 1px solid #444; box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); }
.history-badge-small.green { background: #008000; box-shadow: 0 0 5px rgba(0, 128, 0, 0.5); }

.history-grid-container::-webkit-scrollbar {
    width: 6px;
}

.history-grid-container::-webkit-scrollbar-track {
    background: #111;
}

.history-grid-container::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

/* Roleta e Animação */
#roulette-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 5px;
}

/* Roleta Premium */
.roulette-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.roulette-wheel-premium {
    position: relative;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, #5d3a1a 0%, #2a1808 70%, #000 100%); /* Madeira escura */
    border: 12px solid #3d2610;
    box-shadow: 0 0 50px rgba(0,0,0,0.9), inset 0 0 30px rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Anel externo de ouro */
.wheel-outer-ring {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 4px solid #d4af37; /* Ouro */
    box-shadow: inset 0 0 10px #8a6d3b;
    z-index: 1;
}

/* Estética de Cassino para a Roleta */
.wheel-premium-container {
    position: relative;
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, #8b4513 0%, #4b2506 80%, #2a1503 100%);
    border-radius: 50%;
    padding: 20px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8), 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 10px solid #d4af37;
}

.wheel-inner-rotating {
    position: relative;
    width: 380px;
    height: 380px;
    background: #1a1a1a;
    border-radius: 50%;
    border: 4px solid #333;
    transition: transform 4s cubic-bezier(0.1, 0, 0.1, 1);
    z-index: 2;
    overflow: visible; 
}

/* Centro da Roleta (Eixo Dourado) */
.wheel-inner-rotating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #d4af37 0%, #aa8418 60%, #55420c 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    border: 2px solid #886a11;
}

/* Slots mais precisos e estéticos */
.slot {
    position: absolute;
    width: 32.2px; /* Largura precisa para 37 slots em 380px de diâmetro */
    height: 190px;
    top: 50%;
    left: 50%;
    transform-origin: bottom center;
    margin-left: -16.1px;
    margin-top: -190px;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    clip-path: polygon(5% 0%, 95% 0%, 100% 100%, 0% 100%);
}

.slot .num {
    margin-top: 15px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 2px black;
    transform: rotate(180deg);
    z-index: 5;
}

.slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px; 
    z-index: -1;
    border-bottom: 2px solid #d4af37;
}

.slot.red::before { background-color: #b30000; }
.slot.black::before { background-color: #1a1a1a; }
.slot.green::before { background-color: #006400; }

/* Divisores dourados entre slots */
.slot::after {
    content: '';
    position: absolute;
    top: 0;
    right: -0.5px;
    width: 1px;
    height: 190px;
    background: #d4af37;
    z-index: 4;
}

/* Trilha da bola */
.ball-track-premium {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    z-index: 10;
    pointer-events: none;
}

.ball-realistic {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 30% 30%, #fff, #ddd 60%, #999 100%);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* Linhas separadoras douradas entre slots */
.ball-track-premium {
    position: absolute;
    width: 410px;
    height: 410px;
    border-radius: 50%;
    z-index: 10;
    pointer-events: none;
    transition: transform 6s cubic-bezier(0.1, 0, 0.3, 1);
}

.ball-realistic {
    position: absolute;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #cccccc 100%);
    border-radius: 50%;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.6), 0 0 10px rgba(255,255,255,0.4);
    z-index: 11;
}

/* Indicador de topo */
.roulette-wheel-premium::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #d4af37;
    z-index: 20;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}

/* Animações */
@keyframes spin-wheel {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-ball {
    from { transform: rotate(0deg); }
    to { transform: rotate(-1440deg); }
}

.spinning .wheel-inner {
    animation: spin-wheel 4s cubic-bezier(0.1, 0, 0.3, 1) forwards;
}

.spinning .ball-track {
    animation: spin-ball 4s cubic-bezier(0.1, 0, 0.4, 1) forwards;
}

/* Big Result Styling */
#big-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 40px;
    background: rgba(0,0,0,0.9);
    border: 3px solid #d4af37;
    border-radius: 15px;
    z-index: 2000;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    pointer-events: none;
}

#big-result-number {
    font-size: 80px;
    font-weight: 900;
    text-shadow: 0 0 20px currentColor;
}

#big-result-number.green { color: #00ff00; background-color: transparent !important; }
#big-result-number.red { color: #ff0000; background-color: transparent !important; }
#big-result-number.black { color: white; background-color: transparent !important; }

.hidden {
    display: none !important;
}

.roulette-board {
    position: relative; /* Para posicionar os overlays corretamente */
}

.green { background-color: #008000; }
.red { background-color: #e60000; }
.black { background-color: #1a1a1a; }

.bet-chip-area {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
}

.racetrack-container {
    display: flex;
    justify-content: center;
    background: #222;
    padding: 10px;
    border-radius: 50px;
    margin: 20px auto;
    max-width: 95%;
    overflow-x: auto;
}

.racetrack-number {
    width: 35px;
    height: 60px;
    border: 1px solid #444;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    font-size: 0.8em;
}

.racetrack-number svg {
    display: none; /* Mantido apenas para o seletor Selenium */
}

/* Seletor de Vizinhos */
.neighbors-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-weight: bold;
}

.neighbors-select {
    background: #333;
    color: white;
    border: 1px solid #555;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
}

.neighbors-select:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Seletor de Fichas */
.chips-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 50px;
}

.chip {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px dashed white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
    position: relative;
}

.chip:hover {
    transform: scale(1.1);
}

.chip.active {
    transform: scale(1.2);
    box-shadow: 0 0 15px white;
    border-style: solid;
}

/* Cores das Fichas */
.chip[data-value="0.25"] { background-color: #607D8B; }
.chip[data-value="0.5"] { background-color: #9E9E9E; }
.chip[data-value="1.5"] { background-color: #795548; }
.chip[data-value="2.5"] { background-color: #FF5722; }
.chip[data-value="5"] { background-color: #F44336; }
.chip[data-value="10"] { background-color: #2196F3; }
.chip[data-value="15"] { background-color: #9C27B0; }
.chip[data-value="25"] { background-color: #3F51B5; }
.chip[data-value="50"] { background-color: #009688; }
.chip[data-value="100"] { background-color: #FFC107; color: black; }
.chip[data-value="150"] { background-color: #4CAF50; border-color: #FFD700; }

.chip span {
    pointer-events: none;
}

/* Setores Especiais (Tiers, Orphelins, Voisins, Jeu Zero) */
.special-sectors-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.racetrack-sector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.sector-label {
    font-size: 0.7em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.special-sector {
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    border: 1px solid #444;
    transition: all 0.3s ease;
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 100px;
    text-align: center;
    position: relative; /* Adicionado para suportar visualização de fichas */
}

.special-sector:hover {
    background: #444;
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.special-sector:active {
    transform: translateY(0);
}

/* Removido special-sectors em favor das fichas */

.history {
    margin-top: 30px;
    max-width: 900px;
}

#history-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 5px;
}

.hist-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin: 3px;
    font-size: 0.9em;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
