/* =================================================================== */
/* PASSO 1: A BASE DE TUDO (FUNDO, FONTE E CORES GLOBAIS)
/* =================================================================== */

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    /* Gradiente vertical do azul claro para azul escuro */
    background: linear-gradient(to bottom, #0c74cc, #0454d4);
    font-family: 'Roboto', sans-serif; /* Fonte sans-serif arredondada como na Spribe */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden; /* Previne o scroll da página inteira */
}

/* =================================================================== */
/* BARRA DE TÍTULO MODERNA E MINIMALISTA - EXATAMENTE COMO A IMAGEM
/* =================================================================== */
.title-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px; /* ✅ Aumentado de 40px para 50px - mais espessa */
    background: #24242C; /* Cinza escuro quase preto exatamente como na imagem */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px; /* ✅ Aumentado de 16px para 20px */
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    -webkit-app-region: drag; /* Para permitir arrastar a janela */
}

.title-bar-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.title-bar-title {
    font-size: 20px; /* ✅ Aumentado de 16px para 20px - mais visível */
    font-weight: 700; /* ✅ Aumentado de 600 para 700 - mais espesso */
    color: #ffffff; /* Branco para o título principal */
    margin: 0;
    line-height: 1.2;
    font-family: 'Roboto', sans-serif;
}

.title-bar-subtitle {
    font-size: 14px; /* ✅ Aumentado de 12px para 14px - mais visível */
    font-weight: 500; /* ✅ Aumentado de 400 para 500 - mais espesso */
    color: #b0b0b0; /* Cinza muito claro para o subtítulo */
    margin: 0;
    line-height: 1;
    font-family: 'Roboto', sans-serif;
}

.title-bar-close {
    width: 28px; /* ✅ Aumentado de 24px para 28px - mais proporcional */
    height: 28px; /* ✅ Aumentado de 24px para 28px - mais proporcional */
    background: #2a2a32; /* Fundo sutilmente mais escuro que a barra */
    border: none;
    border-radius: 5px; /* ✅ Aumentado de 4px para 5px */
    color: #ffffff;
    font-size: 16px; /* ✅ Aumentado de 14px para 16px - mais visível */
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* Leve efeito de sombra para profundidade */
    -webkit-app-region: no-drag; /* Não arrastar quando clicar no botão */
}

.title-bar-close:hover {
    background: #3a3a42;
    transform: scale(1.05);
}

.title-bar-close:active {
    transform: scale(0.95);
    background: #1a1a22;
}

.game-wrapper {
    width: 100%;
    max-width: 100vw;
    /* ✅ CORREÇÃO PRINCIPAL: Usar 100svh (Smallest Viewport Height) */
    /* Isso garante que a altura considera as barras do navegador no celular */
    height: calc(100svh - 50px); /* ✅ Subtrair altura da barra de título (50px) */
    margin-top: 50px; /* ✅ Adicionar margem para a barra de título (50px) */
    display: flex;
    flex-direction: column;
    padding: 8px; /* ✅ Aumentado de 4px para 8px */
    box-sizing: border-box;
    /* ✅ CORREÇÃO: Removido 'justify-content: space-between' para dar controle aos filhos */
}

/* =================================================================== */
/* PASSO 2: BARRA SUPERIOR (MINAS, FUN MODE, SEGUINTE)
/* =================================================================== */
.game-header {
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* ✅ GARANTIA: O header não vai encolher */
    padding: 0 8px; /* ✅ Aumentado de 5px para 8px */
    margin-bottom: 8px; /* ✅ Adicionado espaçamento inferior */
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative; /* Para conter o dropdown */
}

/* Fundo escuro atrás do header-top (igual ao auto jogo) - apenas visual */
.header-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1a3a7a; /* Azul mais escuro igual ao auto jogo */
    border: 1px solid #0d2f6b;
    border-radius: 50px;
    z-index: 1; /* Ficar na frente do background, mas atrás dos botões */
}

.top-bar-button {
    border-radius: 50px; /* Formato de pílula */
    border: 1px solid rgba(0,0,0,0.2);
    border-bottom: 3px solid rgba(0,0,0,0.3); /* Borda 3D */
    padding: 8px 16px;
    font-weight: normal;
    cursor: pointer;
}

.mines-selector {
    background: #2171a1; /* Azul dos botões Bet BRL */
    color: white;
    border: 1px solid #000000; /* Borda preta fina */
    padding: 8px 25px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 30px;
    min-width: 120px;
    text-align: center; /* Centralizar o texto */
    z-index: 10; /* Para ficar acima do fundo escuro */
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05); /* Profundidade sutil e transparente */
}

/* Gradiente de luz expandindo para dentro - lateral e topo */
.mines-selector::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border-radius: 50px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 20%, 
        transparent 40%);
    pointer-events: none;
    z-index: 1;
}

/* Estilo para o dropdown quando aberto */
.mines-selector:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(77, 163, 238, 0.5);
}

/* Container para o dropdown */
.mines-selector-container {
    position: relative;
    display: inline-block;
}

/* Dropdown customizado */
.mines-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0c3c54;
    border: 0.5px solid #000000;
    border-radius: 8px;
    max-height: 160px; /* 5 opções * 32px cada */
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
}

.mines-dropdown.show {
    display: block;
}

.mines-dropdown-option {
    background: transparent;
    color: white;
    padding: 8px;
    font-size: 14px;
    height: 36px;
    line-height: 20px;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: center;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.mines-dropdown-option:hover {
    background: #1a5a7a;
}

.mines-dropdown-option.selected {
    background: #0c3c54;
    font-weight: bold;
}

/* Estilo para os números das minas */
.mine-number {
    display: inline-block;
    width: 80px;
    height: 20px;
    background: #0c3c54;
    color: white;
    border-radius: 12px;
    line-height: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #000000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.mines-dropdown-option:hover .mine-number {
    background: #1a5a7a;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.mines-dropdown-option.selected .mine-number {
    background: #2171a1;
    border-color: #000000;
    box-shadow: 0 0 10px rgba(33, 113, 161, 0.5);
}

/* Remover estilos do select original que não são mais necessários */

.fun-mode-btn {
    background: linear-gradient(to bottom, #ff9500, #ff7a00); /* Laranja como na imagem */
    color: white;
    border: 1px solid #e67e22;
    border-bottom: 3px solid #d35400;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: normal;
    text-transform: uppercase;
}

.next-multiplier {
    background: #ffc533; /* Amarelo sólido */
    color: #000000; /* Preto */
    border: 1px solid #000000; /* Borda preta fina */
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: normal;
    position: relative;
    z-index: 10; /* Para ficar acima do fundo escuro */
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05); /* Profundidade sutil e transparente */
}

/* Gradiente de luz expandindo para dentro - lateral e topo */
.next-multiplier::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border-radius: 50px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.15) 20%, 
        transparent 40%);
    pointer-events: none;
    z-index: 1;
}

/* Barra de progresso dos ganhos */
.progress-container {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    margin-top: 3px;
}

.progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #74b81e, #58a100);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* =================================================================== */
/* PASSO 3: OS QUADRADOS DO JOGO (EFEITO 3D)
/* Esta é a parte mais importante para o visual!
/* =================================================================== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 12px;
    width: 85%; /* ✅ Reduzido de 100% para 85% - tiles menores */
    margin: 12px auto; /* ✅ Mudado de 12px 0 para 12px auto - centraliza horizontalmente */
    
    /* ✅ CORREÇÃO: Fazer tiles RETANGULARES HORIZONTAIS (mais largos que altos) */
    aspect-ratio: 5/4; /* Retângulo horizontal - 5 de largura para 4 de altura */
    max-width: 85%; /* ✅ Reduzido de 100% para 85% - tiles menores */
}

.tile {
    width: 100%;
    height: 100%; /* Usa toda a altura disponível do grid */
    border-radius: 6px; /* Cantos menos arredondados para mobile */
    cursor: pointer;
    border: 2px solid #195396; /* Borda sólida mais clara que o fundo */
    
    /* Gradiente com azul 5% mais claro */
    background: linear-gradient(to bottom, #0d4280, #0a386c);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Sombra sutil para profundidade */
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.925),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Círculo central como na imagem */
.tile::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: #1c57a2; /* Azul específico para o círculo */
    border-radius: 50%;
}

.tile:active:not(:disabled) {
    transform: scale(0.95);
}

.tile:disabled {
    cursor: default;
}

.tile.safe-tile {
    background: #1a3a7a; /* Azul médio */
    border: 2px solid #4da3ee; /* Borda sólida mais clara que o fundo */
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tile.safe-tile.orange-star {
    background: linear-gradient(to bottom, #e67e22, #f39c12); /* Laranja mais escuro */
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tile.safe-tile.orange-star i {
    color: #FFFFFF !important; /* Branco puro para estrelas laranjas */
    font-size: 28px !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Estrelas clicadas durante o jogo - fundo laranja */
.tile.safe-tile.orange-star {
    background: linear-gradient(to bottom, #e67e22, #f39c12) !important; /* Laranja mais escuro */
    border: 2px solid #e67e22 !important; /* Borda marrom escura */
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    animation: starAppear 0.3s ease-out forwards;
}

/* Animação para a estrela aparecer */
@keyframes starAppear {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Estrelas reveladas no final do jogo - igual ao estado inicial */
.tile.safe-tile.revealed-star {
    background: linear-gradient(to bottom, #0d4280, #0a386c) !important; /* Azul escuro igual ao inicial */
    border: 2px solid #195396 !important; /* Borda igual ao inicial */
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.925),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.tile.safe-tile.revealed-star i {
    color: #FFFFFF !important; /* Branco puro para estrelas reveladas */
    font-size: 28px !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Remover bolinha quando revelado */
.tile.safe-tile::before,
.tile.revealed.bomb::before {
    display: none;
}

/* Animação de giro para revelar tiles */
.tile.revealing {
    animation: cardFlip 0.6s ease-in-out forwards;
}

@keyframes cardFlip {
    0% { 
        transform: rotateY(0deg);
    }
    50% { 
        transform: rotateY(90deg);
    }
    100% { 
        transform: rotateY(0deg);
    }
}

/* Estilo da estrela quando revelada */
.tile.safe-tile i {
    color: #FFFFFF !important; /* Branco puro */
    font-size: 28px !important; /* 60-70% da área interna */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.tile.revealed.bomb {
    background: linear-gradient(to bottom, #0d4280, #0a386c); /* Azul escuro igual ao inicial */
    border: 2px solid #195396; /* Borda igual ao inicial */
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.925),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-size: 24px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000 !important; /* Preto forçado */
    text-shadow: none;
}

.tile.revealed.bomb svg {
    fill: #000000 !important; /* Preto forçado para o SVG */
    width: 24px;
    height: 24px;
}

/* Ícone de explosão sem animação */
.tile.exploded {
    background: #f56f72 !important; /* Vermelho claro específico */
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-size: 24px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e74c3c !important; /* Borda vermelha mais escura */
    color: #ffffff !important; /* Branco para o ícone */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important; /* Sombra para destaque */
}

.tile.exploded svg {
    fill: #f56f72 !important; /* Vermelho claro específico */
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); /* Sombra para destaque */
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-5deg); }
    75% { transform: translateX(5px) rotate(5deg); }
}


/* --- Controles --- */
.controls-section {
    display: flex;
    flex-direction: column;
    gap: 8px; /* ✅ Aumentado de 3px para 8px */
    flex-shrink: 0; /* ✅ GARANTIA: A seção de controles não vai encolher */
    margin-top: 8px; /* ✅ Adicionado espaçamento superior */
}

.mid-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0; /* ✅ Aumentado de 3px para 8px */
    background-color: transparent;
    gap: 12px; /* ✅ Aumentado de 8px para 12px */
    width: 100%;
    flex-wrap: nowrap;
}

.random-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex: 0 0 auto;
}

.auto-play-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 0 0 auto;
}

.btn-random {
    background: #1568ac; /* Azul mais escuro como na imagem */
    border: 0.5px solid #000000;
    color: #bbdaf7;
    border-radius: 50px;
    padding: 16px 36px;
    font-weight: normal;
    font-size: 16px;
    text-transform: uppercase;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
    min-width: 200px; /* ✅ Aumentado de 160px para 200px */
    max-width: 250px; /* ✅ Aumentado de 180px para 250px */
    white-space: nowrap;
    position: relative;
    display: flex; /* ✅ Adicionado para centralizar */
    align-items: center; /* ✅ Centralizar verticalmente */
    justify-content: center; /* ✅ Centralizar horizontalmente */
    text-align: center; /* ✅ Centralizar texto */
}

/* Gradiente de luz expandindo para dentro - lateral e topo */
.btn-random::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border-radius: 50px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.12) 20%, 
        transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.auto-play-group {
    background-color: #1a3a7a; /* Azul mais escuro */
    border: 1px solid #0d2f6b;
    border-radius: 50px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white; /* Texto branco para melhor contraste */
    font-size: 14px;
    font-weight: normal;
    min-width: 160px;
    max-width: 180px;
    white-space: nowrap;
}

.auto-play-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auto-play-text {
    color: white;
    font-size: 14px;
    font-weight: normal;
}

.auto-play-group .fa-rotate-right {
    font-size: 1.2em;
    color: white; /* Branco para melhor contraste */
}

.toggle-switch { 
    position: relative; 
    display: inline-block; 
    width: 40px; 
    height: 22px; 
}

.toggle-switch input { 
    opacity: 0; 
    width: 0; 
    height: 0; 
}

.slider { 
    position: absolute; 
    cursor: pointer; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background-color: #0d2f6b; 
    transition: .4s; 
    border-radius: 22px; 
}

.slider:before { 
    position: absolute; 
    content: ""; 
    height: 16px; 
    width: 16px; 
    left: 3px; 
    bottom: 3px; 
    background-color: white; 
    transition: .4s; 
    border-radius: 50%; 
}

input:checked + .slider { 
    background-color: #27ae60; 
}

input:checked + .slider:before { 
    transform: translateX(18px); 
}

.footer-container {
    background-color: transparent;
    padding: 0;
    flex-shrink: 0;
}

/* =================================================================== */
/* PASSO 4: A ÁREA DE APOSTAS COMPLETA
/* =================================================================== */

/* Contêiner principal da área de apostas */
.betting-area {
    background-color: #0a4785;
    border-radius: 8px;
    padding: 12px; /* ✅ Aumentado de 8px para 12px */
    display: flex;
    flex-direction: column;
    gap: 10px; /* ✅ Aumentado de 6px para 10px */
    /* Sombra interna para dar profundidade ao contêiner */
    box-shadow: inset 0px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 12px; /* ✅ Aumentado de 8px para 12px */
}

/* Classe compartilhada para botões de aposta */
.bet-button {
    flex-grow: 1;
    color: white;
    font-weight: normal;
    font-size: 14px;
    padding: 12px 0;
    border-radius: 16px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    min-height: 48px; /* Altura mínima para touch mobile */
}

/* --- O Botão Verde "APOSTA" --- */
.aposta-btn {
    background: radial-gradient(circle, #6bb42a, #4e9221); /* Gradiente radial do centro para as bordas */
    border: 2px solid #000000; /* Linha preta mais grossa */
    position: relative;
}

/* Gradiente de luz expandindo para dentro - lateral e topo */
.aposta-btn::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border-radius: 16px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.15) 20%, 
        transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.aposta-btn:active {
    transform: scale(0.95) translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Efeito no ícone do botão de aposta */
.aposta-btn:active svg {
    transform: scale(0.9); /* Trema/encolha */
    transition: all 0.1s ease;
}

.aposta-btn svg {
    margin-right: 8px;
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

/* --- O Campo de Valor da Aposta --- */
.bet-value-display {
    flex-grow: 1;
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    text-align: center;
    box-shadow: none;
    color: rgb(247, 244, 244);
}
.bet-value-display span:first-child { 
    font-size: 15px; 
    color: rgb(247, 244, 244); 
    display: block;
    margin-bottom: 4px;
    text-align: center;
}
.bet-value-display span.amount { 
    font-size: 16px; 
    font-weight: bold; /* Negrito */
    display: inline-block; 
    color: #ffffff; /* Branco mais claro */
    background: linear-gradient(145deg, #0c4464, #0a3a5a); /* Gradiente para profundidade */
    border: 0.5px solid #000000;
    border-radius: 16px;
    padding: 6px 16px;
    margin: 0 auto;
    width: 180px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1); /* Sombra e brilho interno */
    text-align: center;
    margin-top: 2px;
    white-space: nowrap;
    box-sizing: border-box;
    overflow: hidden;
}

/* --- BOTÃO DE REFRESH --- */
.refresh-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    
    /* Botão azul específico para refresh - com !important para garantir prioridade */
    background: #0c5ebb !important;
    border: 0.5px solid #000000;
    color: rgb(247, 244, 244);
    
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* --- OUTROS BOTÕES CIRCULARES (-, Moedas, +) --- */
.icon-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    
    /* Botão azul com contorno fino preto */
    background: #2171a1;
    border: 0.5px solid #000000;
    color: #cecece;
    
    position: relative;
    transition: all 0.1s ease;
}

/* Efeito de clique nos botões de betting */
.icon-button:active {
    transform: scale(0.95);
    background: #1a5a8a;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    color: #a0a0a0 !important; /* Mais escuro */
}

/* Efeito no círculo/ícone dentro do botão - apenas cor, sem tremo separado */
.icon-button:active i,
.icon-button:active svg {
    color: #a0a0a0 !important; /* Mais escuro */
}

/* Gradiente de luz expandindo para dentro - lateral e topo */
.icon-button::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.12) 20%, 
        transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.levantar-btn {
    background: #c78b42;
    border: 2px solid #000000; /* ✅ Borda preta simples como o botão APOSTA */
    padding: 16px 0; /* ✅ Aumentado de 12px para 16px */
    flex-direction: column;
    gap: 2px; /* ✅ Reduzido de 6px para 2px - aproximar elementos */
    height: 60px; /* ✅ Aumentado de 48px para 60px */
    max-height: 60px; /* ✅ Aumentado de 48px para 60px */
    position: relative; /* Para o span se posicionar corretamente */
    opacity: 1;
    pointer-events: auto;
    transition: background-color 0.2s ease, transform 0.2s ease;
    min-height: 60px; /* ✅ Aumentado de 48px para 60px */
}

/* Gradiente de luz expandindo para dentro - lateral e topo */
.levantar-btn::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border-radius: 16px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.15) 20%, 
        transparent 40%);
    pointer-events: none;
    z-index: 1;
}

/* Estado desabilitado do botão LEVANTAR */
.levantar-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    background: #8a6a3a; /* Cor mais escura quando desabilitado */
    border: 2px solid #000000; /* ✅ Borda preta simples mesmo quando desabilitado */
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Estado habilitado do botão LEVANTAR */
.levantar-btn:not(:disabled) {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
    background: #c78b42;
    border: 2px solid #000000; /* ✅ Borda preta simples mesmo quando habilitado */
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Efeito hover apenas quando habilitado */
.levantar-btn:not(:disabled):hover {
    background: #d49a4a;
    border: 2px solid #000000; /* ✅ Borda preta simples no hover */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}


.levantar-btn:active {
    transform: scale(0.95) translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Efeito no texto do botão levantar */
.levantar-btn:active span {
    transform: scale(0.9); /* Trema/encolha */
    transition: all 0.1s ease;
}

.bet-button-text-sub {
    font-size: 9px; /* Fonte menor */
    font-weight: normal; /* Fonte fina */
    background: #3c2d1a;
    color: white;
    padding: 4px 6px; /* Padding menor */
    border-radius: 4px; /* Bordas menos arredondadas para formato mais quadrado */
    display: inline-block;
    margin-top: 2px; /* ✅ Reduzido de 4px para 2px - aproximar do texto LEVANTAR */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
    width: 90px; /* Largura fixa para formato quadrado */
    text-align: center;
    height: 20px; /* Altura fixa para formato quadrado */
    line-height: 12px; /* ✅ Ajustado de 8px para 12px - melhor centralização vertical */
    white-space: nowrap;
    box-sizing: border-box;
    overflow: visible; /* Permitir que o texto seja visível */
    position: relative; /* Posicionamento independente */
    z-index: 10; /* Ficar acima de outros elementos */
}

/* --- Estilo para as duas linhas internas --- */
.top-row, .bottom-row {
    display: flex;
    align-items: center;       /* Alinha verticalmente os itens no centro */
    gap: 8px;                 /* Espaço menor para mobile */
}

/* --- Contêiner dos Controles de Aposta --- */
.bet-controls-container {
    background: linear-gradient(to right, #2171a1, #2174a2, #2171a1); /* Gradiente central 1% mais claro */
    border: 0.5px solid #000000;
    border-radius: 50px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1); /* Sombra e brilho interno para profundidade */
}

.adjust-buttons {
    display: flex;
    gap: 6px; /* Espaço entre os 3 botões de ajuste */
}

/* =================================================================== */
/* PASSO 5: BARRA INFERIOR (SALDO E ÍCONES)
/* =================================================================== */
.bottom-bar {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 12px 0 0 0; /* ✅ Aumentado de 8px para 12px */
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 8px; /* ✅ Adicionado espaçamento superior */
}

.bottom-bar-left {
    display: flex;
    align-items: center; 
    gap: 8px; 
    flex: 0 0 auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.bottom-bar-right {
    display: flex;
    align-items: center; 
    gap: 8px; 
    flex: 1;
    justify-content: flex-end;
    max-width: 100%;
    overflow: hidden;
}

/* Containers independentes */
.win-amount-container {
    flex: 0 0 auto;
    min-width: 70px;
    max-width: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.balance-container {
    flex: 0 0 auto;
    min-width: 140px; /* ✅ Aumentado de 120px para 140px */
    max-width: 180px; /* ✅ Aumentado de 140px para 180px */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: -15px; /* ✅ Ajustado para aproximar do botão menu */
}

.menu-container {
    flex: 0 0 auto !important;
    width: 32px !important; /* ✅ Reduzido de 40px para 32px */
    height: 32px !important; /* ✅ Reduzido de 40px para 32px */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    z-index: 9999 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.mines-selector-bottom {
    background: #2171a1; /* Azul dos botões Bet BRL */
    color: white;
    border: 1px solid #000000; /* Borda preta fina */
    padding: 8px 25px; /* ✅ Aumentado de 8px 20px para 8px 25px */
    border-radius: 50px;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    flex: 0 0 auto;
    min-width: 140px; /* ✅ Aumentado de 120px para 140px */
    max-width: 200px; /* ✅ Aumentado de 180px para 200px */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center; /* ✅ Centralizar o texto */
    display: flex; /* ✅ Adicionado para centralização */
    align-items: center; /* ✅ Centralizar verticalmente */
    justify-content: center; /* ✅ Centralizar horizontalmente */
}

.mines-selector-bottom::after {
    content: '▼';
    margin-left: 8px;
    font-size: 10px;
}

/* Cor para o saldo */
.balance {
    font-weight: bold;
    font-size: 20px; /* ✅ Aumentado de 18px para 20px */
    color: rgb(247, 244, 244);
    white-space: nowrap;
    text-align: center;
    min-width: 140px; /* ✅ Aumentado de 100px para 140px */
    max-width: 180px; /* ✅ Aumentado de 120px para 180px */
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: -20px; /* ✅ Ajustado para aproximar do botão menu */
}

/* Span verde para ganhos */
.win-amount {
    background-color: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: normal;
    box-shadow: none;
    border: none;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
    min-width: 60px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(-10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ícone de interrogação com fundo */
.help-icon {
    background-color: #ff9500; /* Laranja como na imagem */
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: normal;
    flex: 0 0 auto;
    font-size: 14px;
    position: relative;
}

/* Span de resultado posicionado ao lado do ? */
.help-icon::after {
    content: attr(data-result);
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    z-index: 10;
    display: none;
}

.help-icon.has-result::after {
    display: block;
}

.bottom-bar-icon { 
    font-size: 18px; 
    color: #aaa; 
    cursor: pointer;
}

/* =================================================================== */
/* MODAL DE SELEÇÃO DE VALORES DE APOSTA
/* =================================================================== */
.bet-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bet-modal {
    background: #042c4c; /* Nova cor do modal */
    border-radius: 8px;
    padding: 16px;
    width: 95%;
    max-width: 320px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 0.5px solid #000000; /* Borda fina igual ao dropdown */
    animation: slideUp 0.3s ease;
    position: relative;
    overflow: hidden;
}

@keyframes slideUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.bet-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #74b81e, #4da3ee, #ff8c42);
}

.bet-modal h3 {
    color: white;
    text-align: center;
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.bet-values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 0;
}

.bet-value-btn {
    background: transparent;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    height: 30px;
    line-height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Efeito de clique nos botões de valores de aposta */
.bet-value-btn:active {
    transform: scale(0.95);
    background: #1a5a7a;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Efeito no texto dentro dos botões de valores de aposta */
.bet-value-btn:active .bet-number {
    color: #a0a0a0 !important; /* Mais escuro */
    transform: scale(0.9); /* Trema/encolha */
    transition: all 0.1s ease;
}


.bet-value-btn:hover {
    background: #1a5a7a;
}

.bet-value-btn.selected {
    background: #0c3c54;
    font-weight: bold;
}

/* Estilo para os números das apostas (igual ao mine-number) */
.bet-number {
    display: inline-block;
    width: 120px;
    height: 18px;
    background: #0c4464;
    color: white;
    border-radius: 10px;
    line-height: 18px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #000000;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.bet-value-btn:hover .bet-number {
    background: #1a5a7a;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.bet-value-btn.selected .bet-number {
    background: #2171a1;
    border-color: #000000;
    box-shadow: 0 0 10px rgba(33, 113, 161, 0.5);
}

/* Painel de Controle */
.control-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.control-panel {
    background: #042c4c;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 0.5px solid #000000;
    animation: slideUp 0.3s ease;
    position: relative;
    overflow: hidden;
}

.control-panel h3 {
    color: white;
    text-align: center;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.control-section {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.control-section label {
    color: white;
    font-size: 14px;
    font-weight: 500;
    min-width: 120px;
    text-align: right;
}

.control-section input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #000000;
    border-radius: 6px;
    background: #0c4464;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.control-section input:focus {
    outline: none;
    border-color: #2171a1;
    box-shadow: 0 0 5px rgba(33, 113, 161, 0.3);
}

.control-unit {
    color: white;
    font-size: 12px;
    font-weight: 500;
    min-width: 30px;
}

.control-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.control-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.control-close {
    background: linear-gradient(145deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.control-close:hover {
    background: linear-gradient(145deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Botão de menu com círculo */
.menu-btn-circle {
    background: #2171a1 !important;
    color: white !important;
    border: 1px solid #000000 !important;
    border-radius: 50% !important;
    width: 32px !important; /* ✅ Reduzido de 40px para 32px */
    height: 32px !important; /* ✅ Reduzido de 40px para 32px */
    cursor: pointer !important;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 9999 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.menu-btn-circle:hover {
    background: #2a8bc7;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.menu-btn-circle:active {
    transform: scale(0.95);
}

.hamburger {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 20px !important;
    height: 20px !important;
    position: relative !important;
    z-index: 10000 !important;
}

.hamburger span {
    display: block !important;
    width: 16px !important;
    height: 2px !important;
    background-color: #ffffff !important;
    margin: 2px 0 !important;
    border-radius: 1px !important;
    position: relative !important;
    z-index: 10001 !important;
}

.menu-btn-circle:hover .hamburger span {
    background-color: #ffffff;
}

/* ✅ FORÇAR VISIBILIDADE DO BOTÃO DO MENU */
#menu-btn-circle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #2171a1 !important;
    width: 25px !important; /* ✅ Reduzido de 40px para 32px */
    height: 25px !important; /* ✅ Reduzido de 40px para 32px */
    border-radius: 50% !important;
    border: 1px solid #000000 !important;
    z-index: 99999 !important;
}

#menu-btn-circle .hamburger {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 16px !important; /* ✅ Reduzido para ficar proporcional */
    height: 16px !important; /* ✅ Reduzido para ficar proporcional */
}

#menu-btn-circle .hamburger span {
    display: block !important;
    background-color: #ffffff !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 12px !important; /* ✅ Reduzido de 16px para 12px */
    height: 1.5px !important; /* ✅ Reduzido de 2px para 1.5px */
    margin: 1px 0 !important; /* ✅ Reduzido espaçamento */
}

/* Media queries para barra de título responsiva */
@media (max-width: 480px) {
    .title-bar {
        height: 44px; /* ✅ Aumentado proporcionalmente para telas pequenas */
        padding: 0 16px; /* ✅ Aumentado padding */
    }
    
    .title-bar-title {
        font-size: 18px; /* ✅ Aumentado proporcionalmente para telas pequenas */
        font-weight: 700; /* ✅ Mantido espesso */
    }
    
    .title-bar-subtitle {
        font-size: 13px; /* ✅ Aumentado proporcionalmente para telas pequenas */
        font-weight: 500; /* ✅ Mantido espesso */
    }
    
    .title-bar-close {
        width: 26px; /* ✅ Aumentado proporcionalmente para telas pequenas */
        height: 26px; /* ✅ Aumentado proporcionalmente para telas pequenas */
        font-size: 15px; /* ✅ Aumentado proporcionalmente para telas pequenas */
    }
    
    .game-wrapper {
        height: calc(100svh - 44px); /* ✅ Ajustar altura para barra maior */
        margin-top: 44px; /* ✅ Ajustar margem para barra maior */
    }
}

@media (max-width: 375px) {
    .title-bar {
        height: 40px; /* ✅ Aumentado proporcionalmente para telas muito pequenas */
        padding: 0 14px; /* ✅ Aumentado padding */
    }
    
    .title-bar-title {
        font-size: 16px; /* ✅ Aumentado proporcionalmente para telas muito pequenas */
        font-weight: 700; /* ✅ Mantido espesso */
    }
    
    .title-bar-subtitle {
        font-size: 12px; /* ✅ Aumentado proporcionalmente para telas muito pequenas */
        font-weight: 500; /* ✅ Mantido espesso */
    }
    
    .title-bar-close {
        width: 24px; /* ✅ Aumentado proporcionalmente para telas muito pequenas */
        height: 24px; /* ✅ Aumentado proporcionalmente para telas muito pequenas */
        font-size: 14px; /* ✅ Aumentado proporcionalmente para telas muito pequenas */
    }
    
    .game-wrapper {
        height: calc(100svh - 40px); /* ✅ Ajustar altura para barra maior */
        margin-top: 40px; /* ✅ Ajustar margem para barra maior */
    }
}

/* Media queries para telas pequenas */
@media (max-width: 480px) {
    .game-wrapper {
        padding: 6px; /* ✅ Aumentado de 2px para 6px */
    }
    
    .game-header {
        padding: 0 6px; /* ✅ Aumentado de 3px para 6px */
        margin-bottom: 6px; /* ✅ Adicionado espaçamento */
    }
    
    .grid-container {
        gap: 10px; /* ✅ Aumentado de 8px para 10px */
        margin: 8px auto; /* ✅ Mudado para auto - centraliza horizontalmente */
        aspect-ratio: 5/4; /* ✅ Manter RETÂNGULOS HORIZONTAIS em telas pequenas */
        width: 85%; /* ✅ Manter tiles menores em telas pequenas */
        max-width: 85%; /* ✅ Manter tiles menores em telas pequenas */
    }
    
    .controls-section {
        gap: 6px; /* ✅ Aumentado de 2px para 6px */
        margin-top: 6px; /* ✅ Adicionado espaçamento */
    }
    
    .mid-controls {
        gap: 8px; /* ✅ Aumentado de 4px para 8px */
        padding: 6px 0; /* ✅ Aumentado de 2px para 6px */
    }
    
    .btn-random {
        font-size: 12px;
        padding: 8px 16px;
        min-width: 140px; /* ✅ Aumentado de 100px para 140px */
        max-width: 180px; /* ✅ Aumentado de 120px para 180px */
        display: flex; /* ✅ Adicionado para centralizar */
        align-items: center; /* ✅ Centralizar verticalmente */
        justify-content: center; /* ✅ Centralizar horizontalmente */
        text-align: center; /* ✅ Centralizar texto */
    }
    
    .auto-play-group {
        font-size: 12px;
        padding: 6px 12px;
        min-width: 120px;
        max-width: 140px;
    }
    
    .betting-area {
        padding: 10px; /* ✅ Aumentado de 6px para 10px */
        gap: 8px; /* ✅ Aumentado de 4px para 8px */
        margin-bottom: 10px; /* ✅ Aumentado de 6px para 10px */
    }
    
    .bet-button {
        padding: 8px 0;
        min-height: 40px;
    }
    
    .levantar-btn {
        height: 50px; /* ✅ Aumentado de 40px para 50px */
        max-height: 50px; /* ✅ Aumentado de 40px para 50px */
        min-height: 50px; /* ✅ Aumentado de 40px para 50px */
        padding: 12px 0; /* ✅ Aumentado de 8px para 12px */
        gap: 1px; /* ✅ Reduzido para aproximar elementos em telas pequenas */
    }
    
    .bottom-bar {
        padding: 10px 0 0 0; /* ✅ Aumentado de 6px para 10px */
        margin-top: 6px; /* ✅ Adicionado espaçamento */
    }
    
    .bottom-bar-left {
        gap: 3px;
    }
    
    .bottom-bar-right {
        gap: 3px;
    }
    
    .mines-selector-bottom {
        font-size: 11px;
        padding: 6px 18px; /* ✅ Aumentado de 5px 15px para 6px 18px */
        min-width: 110px; /* ✅ Aumentado de 90px para 110px */
        max-width: 150px; /* ✅ Aumentado de 130px para 150px */
        text-align: center; /* ✅ Centralizar o texto */
        display: flex; /* ✅ Adicionado para centralização */
        align-items: center; /* ✅ Centralizar verticalmente */
        justify-content: center; /* ✅ Centralizar horizontalmente */
    }
    
    .help-icon {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    
    .win-amount-container {
        min-width: 50px;
        max-width: 60px;
    }
    
    .balance-container {
        min-width: 90px;
        max-width: 110px;
    }
    
    .balance {
        font-size: 16px; /* ✅ Aumentado de 14px para 16px */
        min-width: 110px; /* ✅ Aumentado de 80px para 110px */
        max-width: 140px; /* ✅ Aumentado de 100px para 140px */
        margin-left: -15px; /* ✅ Ajustado para aproximar do botão menu em telas pequenas */
    }
    
    .win-amount {
        font-size: 10px;
        padding: 2px 5px;
        min-width: 45px;
        max-width: 60px;
    }
    
    .menu-container {
        width: 32px;
        height: 32px;
        z-index: 999;
    }
    
    .menu-btn-circle {
        width: 32px;
        height: 32px;
        z-index: 1000;
        opacity: 1;
        visibility: visible;
    }
    
    .hamburger {
        width: 14px;
        height: 14px;
        z-index: 999;
    }
    
    .hamburger span {
        width: 10px;
        height: 1.5px;
        background-color: #ffffff;
        z-index: 1000;
    }
    
    .bet-value-display span.amount {
        font-size: 14px;
        padding: 4px 12px;
        width: 140px;
    }
    
    .bet-controls-container {
        padding: 4px 8px;
        gap: 6px;
    }
    
    .icon-button {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* Media query para telas muito pequenas (iPhone SE, etc.) */
@media (max-width: 375px) {
    .game-wrapper {
        padding: 4px; /* ✅ Aumentado de 1px para 4px */
    }
    
    .game-header {
        padding: 0 4px; /* ✅ Adicionado padding */
        margin-bottom: 4px; /* ✅ Adicionado espaçamento */
    }
    
    .grid-container {
        gap: 8px; /* ✅ Mantido 8px para telas muito pequenas */
        margin: 6px auto; /* ✅ Mudado para auto - centraliza horizontalmente */
        aspect-ratio: 5/4; /* ✅ Manter RETÂNGULOS HORIZONTAIS em telas muito pequenas */
        width: 85%; /* ✅ Manter tiles menores em telas muito pequenas */
        max-width: 85%; /* ✅ Manter tiles menores em telas muito pequenas */
    }
    
    .controls-section {
        gap: 4px; /* ✅ Aumentado de 1px para 4px */
        margin-top: 4px; /* ✅ Adicionado espaçamento */
    }
    
    .mid-controls {
        gap: 6px; /* ✅ Aumentado de 3px para 6px */
        padding: 4px 0; /* ✅ Aumentado de 1px para 4px */
    }
    
    .btn-random {
        font-size: 11px;
        padding: 6px 12px;
        min-width: 120px; /* ✅ Aumentado de 90px para 120px */
        max-width: 150px; /* ✅ Aumentado de 110px para 150px */
        display: flex; /* ✅ Adicionado para centralizar */
        align-items: center; /* ✅ Centralizar verticalmente */
        justify-content: center; /* ✅ Centralizar horizontalmente */
        text-align: center; /* ✅ Centralizar texto */
    }
    
    .auto-play-group {
        font-size: 11px;
        padding: 5px 10px;
        min-width: 100px;
        max-width: 120px;
    }
    
    .betting-area {
        padding: 8px; /* ✅ Aumentado de 4px para 8px */
        gap: 6px; /* ✅ Aumentado de 3px para 6px */
        margin-bottom: 8px; /* ✅ Aumentado de 4px para 8px */
    }
    
    .bet-button {
        padding: 6px 0;
        min-height: 36px;
    }
    
    .levantar-btn {
        height: 45px; /* ✅ Aumentado de 36px para 45px */
        max-height: 45px; /* ✅ Aumentado de 36px para 45px */
        min-height: 45px; /* ✅ Aumentado de 36px para 45px */
        padding: 10px 0; /* ✅ Aumentado de 6px para 10px */
        gap: 1px; /* ✅ Reduzido para aproximar elementos em telas muito pequenas */
    }
    
    .bottom-bar {
        padding: 8px 0 0 0; /* ✅ Aumentado de 4px para 8px */
        margin-top: 4px; /* ✅ Adicionado espaçamento */
    }
    
    .mines-selector-bottom {
        font-size: 10px;
        padding: 5px 14px; /* ✅ Ajustado para telas muito pequenas */
        min-width: 90px; /* ✅ Ajustado para telas muito pequenas */
        max-width: 120px; /* ✅ Ajustado para telas muito pequenas */
        text-align: center; /* ✅ Centralizar o texto */
        display: flex; /* ✅ Adicionado para centralização */
        align-items: center; /* ✅ Centralizar verticalmente */
        justify-content: center; /* ✅ Centralizar horizontalmente */
    }
    
    .balance {
        font-size: 15px; /* ✅ Aumentado de 13px para 15px */
        min-width: 100px; /* ✅ Aumentado de 70px para 100px */
        max-width: 120px; /* ✅ Aumentado de 90px para 120px */
        margin-left: -12px; /* ✅ Ajustado para aproximar do botão menu em telas muito pequenas */
    }
    
    .bet-value-display span.amount {
        font-size: 13px;
        padding: 3px 10px;
        width: 120px;
    }
    
    .bet-controls-container {
        padding: 3px 6px;
        gap: 4px;
    }
    
    .icon-button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .menu-btn-circle {
        width: 28px;
        height: 28px;
        z-index: 1000;
        opacity: 1;
        visibility: visible;
    }
    
    .hamburger {
        width: 12px;
        height: 12px;
        z-index: 999;
    }
    
    .hamburger span {
        width: 8px;
        height: 1px;
        background-color: #ffffff;
        z-index: 1000;
    }
}



