

/*  APENAS SE USAR PAGES .js
.menu-item.menu-ativo {
    color: var(--accent);
    background: var(--border);
    font-weight: 700;
    border-left: 3px solid var(--accent);
}

// ========== RESET & BASE ========== 
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

*/


/* ========== LOGIN ========== 

#loginWrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}


#btnLogin {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    background: #fff;
    color: #444;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

#btnLogin:hover { background: #f0f0f0; }

#loginInfo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--text);
}

#loginNome {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--accent);
    font-weight: 600;
}

#btnLogout {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 6px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: .82rem;
}
#btnLogout:hover { border-color: var(--danger); color: var(--danger); }
 ========== LOGIN ========== */
 
/* ── Mobile ──
@media (max-width: 600px) {
    #loginNome { display: none; }
}
 */


body.landscape {
  overflow: hidden;
}

body.landscape::before {
  content: "Gire o celular para vertical";
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
/*  bloquear landscape */





/* ========== LOADER ========== */
#loaderMega {
  index:100;
  position: fixed;
  text-align: center;
  padding: 16px;
  color: var(--muted);
  font-size: .9rem;
}

.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

#titulo {
  visibility: hidden;
  display:none;
}


/* ========== Ajuste grade e painel jogos========== */
#layoutMega{
display:grid;
grid-template-columns:100% 1fr;

gap:5px;
margin-top:10px;
}





#dragHandle{visibility: hidden;}
#dragHandle{display: none;}
#painelPreview {display: none;}


#gradeWrapper{
position:relative;
padding:20px;
background:var(--surface);
border-radius:12px;
border:1px solid rgba(255,255,255,0.08);
}

#grade{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(35px,1fr));
gap:8px;
}

#badgePremium{
position:absolute;
top: -10px;
right:4%;
width: 100px;
background:linear-gradient(135deg,#FFD700,#FFA500);
color:#000;
font-size:.7rem;
font-weight:700;

padding:4px 10px;
border-radius:20px;

letter-spacing:1px;
box-shadow:0 0 10px rgba(255,215,0,0.4);
visibility: hidden;
}

#jogosGerados {
  margin-top:-15px;
  width:100%;
  height: 245px;
  overflow-y: auto;
  font-size: .82rem;
  color: var(--muted);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#jogosGerados div:hover { background: var(--border); border-radius: 4px; }


#jogosGerados .numero-chip{
background:#3be8b0;
color:#000;
padding:3px 7px;
border-radius:10px;
font-size:.75rem;
font-weight:600;
display:inline-block;
min-width:22px;
text-align:center;
}



#painel-lista-jogos{
height:250px;
max-width:50%;
}


#contadorJogosGerados{
margin-top:-10px;
}



#painel-resultados-jogos{
height:250px;
max-width:25%;
}

#painel-resultados-jogos h3{
margin-top:-10px;
}


#painel-simulador-resultados{
height:250px;
max-width:25%;

}

#painel-simulador-resultados h3{
margin-top:-10px;
}


#resultadoSimA { margin-top: -15px; font-size: .85rem; color: var(--muted); }

#resultadoSimB {  margin-top: 0px; font-weight: 600; color: var(--accent);}

/* desktop: nao mostra painel botoes em resultados*/
.so-mobile-gerar-jogos { display: none; }
.so-mobile-simular{ display: none; }



#painel-gerar-jogos{
border: none; /* remove bordas individuais */
position:fixed;
bottom: 0px;
height:30px;
width: 50%;
right: 0px;
}


.botoes_jogos{
margin-top: -5px;
display: flex;          /* Ativa o modo flex */
gap: 15px;             /* Define o espaço de 15px entre cada botão */
justify-content: center; /* Centraliza os botões (opcional) */
align-items: center;    /* Alinha verticalmente (opcional) */
}


#painel-simulador-jogos{
border: none; /* remove bordas individuais */
position:fixed;
bottom: 0px;
height:30px;
width:47.5%;
left:0px ;
}

.botoes_simular{
margin-top: -5px;
display: flex;          /* Ativa o modo flex */
gap: 15px;             /* Define o espaço de 15px entre cada botão */
justify-content: center; /* Centraliza os botões (opcional) */
align-items: center;    /* Alinha verticalmente (opcional) */

}



 #footerMegaBeta {
     margin-top:50px !important;
     height: 200px;
    padding: 0px 20px !important;
  }
  
  #footerMegaBeta p {
    font-size: 0.75rem !important;
    line-height: 1.6 !important;
  }


/* jogos gerados funcao */

/* nao fica boa
#jogosGerados{
display:flex;
flex-direction:column;
gap:6px;
margin-top:8px;
}
*/

/* ========== Ajuste grade e painel jogos========== */


/* linha de cada jogo */
.linha-jogo{
display:flex;
align-items:center;
justify-content:space-between;
padding:6px 6px;
border-bottom:1px solid #1e3050;
gap:10px;
transition:background .15s;
}

.linha-jogo:hover{
background:rgba(255,255,255,0.03);
}

/* bloco clicável */
.info-jogo{
flex:1;
cursor:pointer;
}

/* titulo */

/* badge base */
.titulo-jogo span{
padding:2px 6px;
border-radius:6px;
font-size:.7rem;
background:#1b2638;
margin-left:6px;
}

/* cores por tipo */

.tipo-ia{
color:var(--accent2) !important;
font-weight:600;
}

.tipo-auto{
color:#3498db !important;
font-weight:600;
}

.tipo-inteligente{
color:#9b59b6 !important;
font-weight:600;
}

.tipo-manual{
color:var(--accent) !important;
font-weight:600;
}

/* container dos números */
.chips-numeros{
display:flex;
flex-wrap:wrap;
gap:5px;
}


/* exibe numero se for top 10 */
.chip-top10 {
    background: rgba(255, 200, 0, 0.15) !important;
    border: 1px solid rgba(255, 200, 0, 0.55) !important;
    color: #ffc800 !important;
    font-weight: 700;
}



/* botão remover */
.btn-remover-jogo{
background:transparent;
border:1px solid #c0392b;
color:#c0392b;
border-radius:5px;
padding:2px 6px;
cursor:pointer;
font-size:.8rem;
transition:.15s;
}

.btn-remover-jogo:hover{
background:#c0392b;
color:#fff;
}



/* ========== PREMIUM opcao 1========== */

.input-container-premium {
  position: relative;
  display: inline-block;
}

.badge-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none; /* Não atrapalha o clique no input */
}

/* Estilo para quando estiver bloqueado (Grátis) */
.status-locked { color: #aaa; } 
/* Estilo para quando for Premium */
.status-premium { color: #f1c40f; text-shadow: 0 0 5px rgba(241, 196, 15, 0.5); }


.badge-premium { color: #f1c40f; font-weight: bold; }
.badge-free { color: #95a5a6; }

/* Efeito de brilho suave na foto do Premium */
.foto-premium {
    border: 2px solid #f1c40f;
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.4);
}

/* ========== PREMIUM opcao 2========== */
#userBadgeIcon {
    z-index: 10;
    border: 2px solid #1a2a44; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    
    /* Ajustes extras para centralizar o ícone/imagem */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;   /* Define um tamanho fixo para o círculo */
    height: 16px;
    border-radius: 50%; /* Garante que seja um círculo */
    background: #1a2a44; /* Cor de fundo para dar contraste */
    overflow: hidden;    /* Corta sobras da imagem se houver */
}

/* Garante que a imagem dentro do badge preencha o espaço sem sobrar */
#userBadgeIcon img {
    width: 100%;  /* Deixa um respiro dentro do círculo */
    height: 100%;
    object-fit: contain;
}

/* ========== PREMIUM ========== */





#btnAbaPreview {

  display: flex;
  position:fixed;
  bottom: 6px;
  left: 44%;
  width: 39px;
  height:46px;
  
  /* 1. Use a propriedade resumida 'background' para a imagem */
  /* Removi o 'background: transparent !important' debaixo para não anular esta */
  background: url("./images/megasena.jpg") no-repeat center center / 99% 99% !important;

   border: 2px solid var(--accent);
  box-shadow: none !important;
  outline: none !important;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  
  transform: scale(1);
  transition: transform .2s ease;
  
  -webkit-tap-highlight-color: transparent !important;
  user-select: none;
}

/* 2. Remova ou ajuste o :active para não esconder a imagem no clique */
#btnAbaPreview:active, 

#btnAbaPreview:focus {
  /* Se você colocar 'background: transparent' aqui, a imagem some ao clicar */
  outline: none !important;
  box-shadow: none !important;
}


#btnAbaPreview h3{
margin-right: 105px;
} 


#btnConfirmarAposta {
  height: 34px;
  padding: 0 10px;
  background: var(--accent);
  color: #000;
  border: 2px solid var(--accent);
  border-radius: 0;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 700;
  border-left: none;
  border-right: none;
    display:none;
    opacity: 0;
    pointer-events: none; /* Impede cliques enquanto invisível */
    transition: opacity 0.3s ease;
}
#btnConfirmarAposta:hover { background: #00e88f; }



/* ========== DRAWER ========== */

:root {
  --bg:        #0f1923;
  --surface:   #1a2636;
  --surface2:  #223045;
  --border:    #2e4060;
  --accent:    #00c97d;
  --accent2:   #e67e22;
  --text:      #e8edf3;
  --muted:     #7a92aa;
  --danger:    #c0392b;
  --radius:    10px;
  --header-h:  56px;
}




#drawerOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 900;
}

#drawer {
  position: fixed;
  top: 0;
  right: -360px;       /* começa fora da tela */
  width: 340px;
  height: 100vh;
  background: var(--surface);
  border-left: 2px solid var(--accent);
  z-index: 901;
  display: flex;
  flex-direction: column;
  transition: right .3s ease;
  overflow: hidden;
}

#drawer.aberto { right: 0; }

#drawerOverlay.aberto { display: block; }

#drawerHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

#drawerTitulo {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

#drawerFechar {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
#drawerFechar:hover { background: var(--border); color: var(--text); }

#drawerConteudo {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.8;
}

#drawerConteudo h3 { margin-bottom: 10px; }
#drawerConteudo p  { margin-bottom: 12px; }


/* ========== DRAWER ========== */


html { font-size: 15px; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  padding-bottom: 0; /* remove o gap do bottom */
}

h1, h2, h3, .brand {
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: .5px;
}

h1 {
  text-align: center;
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-weight: 700;
  padding: 18px 16px 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ========== HEADER ========== */
html {
    scrollbar-gutter: stable; /* ← reserva espaço para scrollbar sempre */
}




#headerBeta {
  /* tudo igual, sem overflow: hidden */
  display: flex;
  align-items: center;
   height: 60px;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  /*
  border-bottom: 2px solid var(--accent);*/
  padding-bottom: 2px;
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s ease;
  z-index: 201; /* acima do header */
  overflow: visible;
}

#headerBeta > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}


#logotipo {
  display:flex;
  top: 0px;
  width: 100%;
  height: 60px;
  align-items: center;
  justify-content: center;

}



.logo {
  position:relative;
  top: 0px;
  left:10px;
  width: 60px;
  height: 60px;
  
  background: url("./images/megabeta-foguete-recorte.png") no-repeat center center / 80% !important;

}


.logobolao {
   display:flex;
  position:fixed;
  top: 63%;
  left:20%;
  width: 220px;
  height: 220px;
  background: url("./images/megabolao.png") no-repeat center center / 100% !important;
  z-index: 999;
}


.logoaposta {
  display:flex;
  position:fixed;
  top: 64%;
  right:19%;
  width: 220px;
  height: 220px;
  background: url("./images/megaposta.png") no-repeat center center / 100% !important;
  z-index: 999;
}


.brand {
  margin-left:0px;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3px;
}


/*titulo*/
 #paginaAtiva h2{

        position:fixed;
        margin-top: 0;        /* era -110px */
        top: 30px;             /* ajuste fino se necessário */

        left: 360px;
        font-size: 1.0rem;
        display:flex;
        z-index: 200;
    }


#headerBadges {
  /* --- TORNA O ELEMENTO FIXO --- */
  display:flex;
  position: fixed;
  top: 60px;
  left: 44.5%;
  width: 200px;
  z-index: 300; /* Garante que fique acima de tudo */
  
  /* --- SEU LAYOUT ORIGINAL --- */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent; 
  padding: 10px 0; /* Adicione um respiro para não colar no topo */
  pointer-events: none; /* Opcional: permite clicar no que está atrás se for transparente */

  visibility: visible;
}

/* Garante que os badges individuais continuem clicáveis se necessário */
#headerBadges .badge {
  pointer-events: auto; 
  background: var(--accent2);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .78rem;
  border-radius: 20px;
  padding: 3px 12px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); /* Sugestão: sombra para destacar do fundo */
}

#apostaWrapper { 
  position: fixed;
  margin-left:1%;
  display: flex-wrap;
  align-items: center;
  gap: 0;
}


#btnAposta {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  width: 90px;
  height: 34px;
  border: 2px solid var(--accent);
  border-right: none;
  border-radius: 8px 0 0 8px;
  text-align: center;
  background: var(--surface2);
  color: var(--text);
  outline: none;
}
#btnAposta:focus { border-color: #fff; }


#btnListaApostas {
  height: 34px;
  padding: 0 8px;
  background: var(--accent);
  color: #000;
  border: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
#btnListaApostas:hover { background: #00e88f; }


#dropdownApostas {
  display: none;
  position: absolute;
  top: 45px;
  margin-left:17% ;
  min-width: 220px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;

}
#dropdownApostas.aberto { 

  display: block; 
  max-height: calc(5 * 44px); /* 5 itens × altura estimada por item */
  overflow-y: auto;
}


.dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: .85rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: var(--surface); }
.dropdown-item .di-num { color: var(--accent); font-weight: 700; }
.dropdown-item .di-info { color: var(--muted); font-size: .78rem; }


#btnApostaAtiva {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  width: 90px;
  height: 34px;
  /* Borda laranja para combinar com o fundo */
  border: 2px solid #FF8C00; 
  border-right: none;
  border-radius: 8px 0 0 8px;
  text-align: center;
  
  /* Cores de Badge */
  background: #FF8C00; /* Laranja vibrante */
  color: #FFFFFF;      /* Branco puro */
  
  outline: none;
  cursor: default;
}





/* ========== HEADER DIREITA ========== */
#headerDireita {
  margin-top:-75px;
  width: 250px;
  display: flex;
  gap: 12px;
  margin-left: 75%;

}


#statusSyncHeader {
  margin-right: 10px; /* ← ajuste esse valor */
}

#statusSyncHeader {
  font-size: .78rem;
  color: var(--muted);
  display: flex;
  align-items: left;
  gap: 6px;
  border-right: 1px solid var(--border);  /* divisor visual */
  padding-right: 12px;
}

#headerSessao {
  opacity: .6;
  border-left: 1px solid rgba(255,255,255,.2);
  padding-left: 8px;
}

/* remove o margin-left auto do menuWrapper 
   pois agora o pai já cuida disso */
#menuWrapper {
  position: relative;
  margin-left: 0;
}





/* ========== LAYOUT WRAPPER ========== */
.main-content {
  max-width: 960px;
   max-height:870px;
  margin: 0 auto;
  padding: 0 12px;
}


#limpanumero {
width:35px;
background: url("./images/apaga.png") no-repeat center center / 101% !important;
 }


.numero {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: clamp(.65rem, 2vw, 1.15rem);
  color: #1a1a1a;                          /* ← preto */
  cursor: pointer;
  user-select: none;
  transition: transform .15s, box-shadow .15s;

  /* ── Efeito bolha branco lavado ── */
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.55) 40%, rgba(220,230,240,0.3) 70%, transparent 90%),
    radial-gradient(circle at 65% 78%, rgba(255,255,255,0.4) 0%, transparent 55%),
    rgba(200, 215, 230, 0.55);
  border: 1.5px solid rgba(255,255,255,0.75);
  box-shadow:
    inset 0 1px 4px rgba(255,255,255,0.9),
    inset 0 -2px 5px rgba(150,170,195,0.35),
    0 2px 8px rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
}

.numero:hover {
  transform: scale(1.08);
  box-shadow:
    inset 0 1px 5px rgba(255,255,255,1),
    inset 0 -2px 6px rgba(150,170,195,0.45),
    0 4px 14px rgba(0,0,0,0.3);
}

.numero.sel {
  color: #0a2a1a;                          /* ← preto esverdeado no selecionado */
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.85) 0%, rgba(0,201,125,0.45) 45%, rgba(0,180,110,0.75) 100%),
    var(--accent);
  border: 1.5px solid rgba(255,255,255,0.6);
  box-shadow:
    inset 0 1px 4px rgba(255,255,255,0.7),
    inset 0 -2px 5px rgba(0,130,75,0.4),
    0 0 14px rgba(0,201,125,0.55);
}

.numero.quente {
  color: #1a1a1a;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.9) 0%, rgba(255,180,80,0.5) 45%, rgba(230,126,34,0.6) 90%),
    rgba(230, 126, 34, 0.88);             /* ← base laranja sólida */
  border: 1.5px solid rgba(255,200,100,0.7);
  box-shadow:
    inset 0 1px 4px rgba(255,255,255,0.7),
    inset 0 -2px 5px rgba(180,80,0,0.35),
    0 2px 8px rgba(180,80,0,0.25);
}

/* ========== PAINÉIS ========== */
.painel-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.painel {
  flex: 1 1 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.7;
}

.painel span , .painel strong { color: var(--text); }


/* ========== BOTÕES PRINCIPAIS ========== */
.btn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}


button {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .82rem;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
button:hover { background: var(--border); border-color: var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }

#btnSimular     { border-color: var(--accent); color: var(--accent); }
#btnAuto        { border-color: #3498db; color: #3498db; }
#btnInteligente { border-color: #9b59b6; color: #9b59b6; }
#btnIA          { border-color: var(--accent2); color: var(--accent2); }
#btnLimpar_gerador { grid-column: 1 / -1; }


/* spinner inline para botões */
.spin-inline {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

/* ========== BARRA DE PROGRESSO ========== */

.barra-wrap {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
#barra {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .3s;
}


/* ========== SIMULADOR / JOGOS ========== */
.sim-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.sim-row > div {
  flex: 1 1 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.sim-row input[type="number"] {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 4px 8px;
  width: 64px;
  font-size: .9rem;
}

/* jogos gerados 
#jogosGerados {
  height: 170px;
  overflow-y: auto;
  font-size: .82rem;
  color: var(--muted);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#jogosGerados div:hover { background: var(--border); border-radius: 4px; }
*/


/* ========== PAINEL ESTATÍSTICO + PDF ========== */
.painel-estatistico {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tabs button, #btnSalvarPDFexemplo, #btnBaixarPDF {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}
.tabs button:hover, #btnSalvarPDFexemplo:hover, #btnBaixarPDF:hover {
  border-color: var(--accent);
}
.aba-ativa {
  background: var(--accent) !important;
  color: #0f1923 !important;
  border-color: var(--accent) !important;
  font-weight: 700;
}

#btnFecharConfig ,#btnLimpar_gerador {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
#btnAbaConfig { visibility: hidden; }

#ranking, #pares, #soma {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

#grafico {
  width: 100%;
  max-width: 100%;
  height: 220px;
  display: block;
  border-radius: 6px;
  background: var(--surface2);
  margin-top: 12px;
}

/* ========== PAINEL CONFIGURAÇÃO ========== */
#painelConfig {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 8px;
  margin-top: 12px;
}

#painelConfig label, #painelConfig span { font-size: .85rem; color: var(--muted); }

#calibracao input[type="range"] {
  width: calc(100% - 90px);
  accent-color: var(--accent);
  vertical-align: middle;
}

#statusSync { font-size: .78rem; color: var(--muted); margin-bottom: 10px; }

#previewVolante {
  width: 100%;
  max-width: 620px;
  background: #eee;
  border-radius: 6px;
  margin-top: 10px;
}




#containerCanvas {
  background-color: var(--border);
  width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
  text-align: center;
}

#canvasVolanteReal {
  width: 100%;
  max-width: 800px;
  display: block;
  margin: auto;
}



/* ========== MENU HAMBURGUER (GLOBAL) ========== */


#btnMenu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 7px;
  transition: background .15s, border-color .15s;
}

#btnMenu:hover { background: var(--border); border-color: var(--accent); }

#btnMenu span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* Animação para X ao abrir */
#btnMenu.aberto span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#btnMenu.aberto span:nth-child(2) { opacity: 0; }
#btnMenu.aberto span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#menuDropdown {
  display: none;
  position: absolute;
  top: 44px;
  right: 0;
  min-width: 200px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  overflow: hidden;
}

#menuDropdown.aberto { display: block; }

.menu-header {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  padding: 10px 16px 8px;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}

.menu-item {
  display: block;
  padding: 10px 16px;
  font-size: .88rem;
  color: var(--text);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.menu-item:hover {
  background: var(--border);
  color: var(--accent);
}

.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}






/* ========== DRAWER (ATÉ 600px) ========== */

@media (max-width: 600px) {




/* ========== PAINEL PREVIEW PDF ========== */
#painelPreview {
    display: none;
    position: fixed;
    top: 110px;
    left: 0;
    width: 100%;
    height: calc(100vh - 50px);
    overflow-y: auto;
    z-index: 100;
    background: var(--bg);
    padding: 16px;
    box-sizing: border-box;
    padding-bottom: 60px;
  }

  #painelPreview.active {
    display: block;
  }









  #drawer { width: 100vw; right: -100vw; height: 85%;}

}



/* ========== MOBILE (ATÉ 600px) ========== */
@media (max-width: 600px) {
  

  /*
#gradeWrapper{
position:relative;
margin-top:0px;
padding:0px;
background:var(--surface);
border-radius:12px;
border:1px solid rgba(255,255,255,0.08);
}*/

/*
#gradeWrapper {
    position: fixed;  
    top: 145px;    
    left: 0;
    width: 93%;
    height: 48%;

    background: var(--surface);
    border-radius: 12px 12px 0 0;

    z-index: 20;

    display: none;
    overflow-y: auto;
  }

*/






/* ========== DRAWER (ATÉ 600px) ========== */

@media (max-width: 600px) {

  #drawer { width: 100vw; right: -100vw; height: 85%;}

}



/* ========== MOBILE (ATÉ 600px) ========== */
@media (max-width: 600px) {
  

  #gradeWrapper {
    position: fixed;
    bottom: -100%;       
    left: 0;
    width: 90%;
    height: 50%;

    background: var(--surface);
    border-radius: 12px 12px 0 0;

    z-index: 20;
    transition: bottom 0.25s ease;
    touch-action: none; /* em vez de none */ 
 }

   #gradeWrapper.show {
    bottom: 165px; /* altura do menu */
  }




  #grade {
    gap: 2p 
    grid-template-columns: repeat(auto-fit, minmax(37px, 1fr));
    display: grid !important;

/*mantem sempre no mesmo tamanho  */
  aspect-ratio: 3 / 4;   /* ou 1/1, 16/9, etc */
  height: 95%;
  max-width: 100%;
  z-index: 9999;
  }



/*usa alca para subir a tela
#dragHandle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 10px;
  margin: 8px auto;
}*/



/*usa alca animada para subir e descer a tela*/
#dragHandle {
    width: 100%;
    margin-top:5px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 0;
    cursor: pointer;
    z-index: 9999;
    visibility: visible;
}

.drag-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    animation: pulseUp 1.5s ease-in-out infinite;
}
/* E deixe só isso: */
.drag-arrow {
    font-size: 0.8rem;
    color: var(--accent);
    display: block;
}
.drag-arrow-down {
    font-size: 0.8rem;
    color: var(--accent);
    display: block;
}

#gradeWrapper.show .drag-arrow      { display: block !important;  }
#gradeWrapper.show .drag-arrow-down { display: block !important; }

@keyframes pulseUp {
    0%, 100% { transform: translateY(0);    opacity: 0.5; }
    50%       { transform: translateY(-4px); opacity: 1;   }
}

@keyframes pulseDown {
    0%, 100% { transform: translateY(0);   opacity: 0.5; }
    50%       { transform: translateY(4px); opacity: 1;   }
}












/*zona no topo neutra testar*/
/*#topGestureArea {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 9998;
}*/



}



/* ========== MOBILE (ATÉ 600px) ========== */
@media (max-width: 600px) {
  

/* quando o menu wrapper estiver aberto, esconde o h2 TITULO  */
body.menu-aberto #paginaAtiva h2 {
    display: none;

}




/*titulo*/
 #paginaAtiva h2{

        position:fixed;
        margin-top: 0;        /* era -110px */
        top: 60px;             /* ajuste fino se necessário */

        left: 40px;
        font-size: 1.0rem;
        justify-content: center;
        display:flex;
        z-index: 200;
    }



  .numero {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: clamp(1.35rem, 2vw, 1.35rem);
  color: #1a1a1a;                          /* ← preto */
  cursor: pointer;
  user-select: none;
  transition: transform .15s, box-shadow .15s;

  /* ── Efeito bolha branco lavado ── */
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.55) 40%, rgba(220,230,240,0.3) 70%, transparent 90%),
    radial-gradient(circle at 65% 78%, rgba(255,255,255,0.4) 0%, transparent 55%),
    rgba(200, 215, 230, 0.55);
  border: 1.5px solid rgba(255,255,255,0.75);
  box-shadow:
    inset 0 1px 4px rgba(255,255,255,0.9),
    inset 0 -2px 5px rgba(150,170,195,0.35),
    0 2px 8px rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
}

.numero:hover {
  transform: scale(1.08);
  box-shadow:
    inset 0 1px 5px rgba(255,255,255,1),
    inset 0 -2px 6px rgba(150,170,195,0.45),
    0 4px 14px rgba(0,0,0,0.3);
}

.numero.sel {
  color: #0a2a1a;                          /* ← preto esverdeado no selecionado */
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.85) 0%, rgba(0,201,125,0.45) 45%, rgba(0,180,110,0.75) 100%),
    var(--accent);
  border: 1.5px solid rgba(255,255,255,0.6);
  box-shadow:
    inset 0 1px 4px rgba(255,255,255,0.7),
    inset 0 -2px 5px rgba(0,130,75,0.4),
    0 0 14px rgba(0,201,125,0.55);
}

  #headerBeta {
    height: 140px;
    gap: 6px;
    padding: 8px 12px;

  }

  #headerBeta > div { flex: 1 1 auto; }

#badgePremium{
position:absolute;
top:-20px;
right:35%;
width: 100px;
visibility: hidden;
display:none;
}



#logotipo {
  display:flex;
  top: 0px;
  width: 100%;
  height: 60px;
  align-items: left;
  justify-content: left;

}


  .painel-row, .sim-row { gap: 10px; }
  .painel, .sim-row > div { flex: 1 1 100%; }

  .btn-grid { grid-template-columns: 1fr 1fr; }

  h1 { font-size: 1.1rem; padding: 14px 10px 8px; }
  h3 { font-size: .9rem; }

  .tabs { gap: 6px; }
  .tabs button { font-size: .75rem; padding: 7px 10px; }


}



@media (max-width: 600px) {

#painel-preview {
  display: none;
}


#limpanumero {
width:35px;
 }



/*desabilitado o icone para imprimir*/
#btnAbaPreview {
  z-index: 100;
  display: none;
  position:fixed;
  margin-bottom:20px;
  left: 330px;
  width: 39px;
  height:46px;
  

  /* 1. Use a propriedade resumida 'background' para a imagem */
  /* Removi o 'background: transparent !important' debaixo para não anular esta */
  background: url("./images/megasena.jpg") no-repeat center center / 99% 99% !important;

   border: 2px solid var(--accent);
  box-shadow: none !important;
  outline: none !important;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  
  transform: scale(1);
  transition: transform .2s ease;
  
  -webkit-tap-highlight-color: transparent !important;
  user-select: none;
}

/* 2. Remova ou ajuste o :active para não esconder a imagem no clique */
#btnAbaPreview:active, 

#btnAbaPreview:focus {
  /* Se você colocar 'background: transparent' aqui, a imagem some ao clicar */
  outline: none !important;
  box-shadow: none !important;
}


#btnAbaPreview h3{
margin-bottom:-105px;
margin-right: 100px;
} 


}









/* ── Mobile: esconde ID de sessão, mantém status ── */
@media (max-width: 600px) {





  #headerSessao { display: none; }
  #headerText   { display: none; }
  #statusSyncHeader { border-right: none; padding-right: 0; }




/* ========== HEADER DIREITA ========== */
 #headerDireita {
        align-items: right;
        margin-top:-40px;
        height: 150px;
        margin-right: auto !important; /* Força a margem esquerda automática */
        justify-content: flex-end;    /* Alinha o conteúdo interno à direita */
        width: 50px;                  /* Garante que não ocupe 100% se não precisar */
        gap: 8px;                     /* Diminui um pouco o espaço para caber melhor */
    }


    #loginNome {
        display: none; /* Dica: esconder o nome no mobile economiza muito espaço */
    }



  #headerBadges {
    position: fixed;      /* era relative com top:160px */
    top: auto;            /* cancela o top:160px */
    bottom: 105px;        /* cola acima da tab-nav */
    left: 0;
    width: 100%;
    visibility: hidden;   /* mantém invisível como estava */
  }

/* Garante que os badges individuais continuem clicáveis se necessário */
#headerBadges .badge {
  pointer-events: auto; 
  background: var(--accent2);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .78rem;
  border-radius: 20px;
  padding: 3px 12px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); /* Sugestão: sombra para destacar do fundo */
}



#apostaWrapper { 

  margin-left: 20px;
  margin-top: 60px;
  max-width: 200px;
  position: flex;
  display: flex;
  gap: 0;
}


#btnApostaAtiva{
  width:20%;
height: 20px;
}

#btnAposta{
  width:80px;
height: 20px;
}

#btnConfirmarAposta{
height: 20px;
}

#btnListaApostas{
height: 30px;
}


#dropdownApostas {
  display: none;
  position: absolute;
  top: 120px;
  margin-left:17% ;
  min-width: 220px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;

}


#dropdownApostas.aberto { 
  display: block; 
  max-height: calc(5 * 44px); /* 5 itens × altura estimada por item */
  overflow-y: auto;
}



}



@media (max-width: 600px) 
{


/* mobile */ 
#jogosGerados {
  margin-top:-15px;
  width:100%;
  height: 98%;
  overflow-y: auto;
  font-size: .82rem;
  color: var(--muted);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}


#jogosGerados div:hover { background: var(--border); border-radius: 4px; }


#jogosGerados .numero-chip{
background:#3be8b0;
color:#000;
padding:3px 7px;
border-radius:10px;
font-size:.75rem;
font-weight:600;
display:inline-block;
min-width:22px;
text-align:center;
}

#painel-lista-jogos{
margin-top:40px;
 height: 300px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
max-width:100%;
}

#painel-resultados-jogos{
margin-top:40px;
 height: 300px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
max-width:100%;
}

#painel-simulador-resultados{
height:250px;
max-width:100%;
}


#btnLimpar_gerador {
    display: none;
}


#resultadoSimA { margin-top: 10px; font-size: .85rem; color: var(--muted); }
#resultadoSimB {  margin-top: 10px; font-weight: 600; color: var(--accent);}



/* Mobile: mostra painel botoes*/

.so-mobile-gerar-jogos {
top: auto;
bottom: 55px; /* logo acima da tab-nav */
left:0px;
position: fixed;
z-index:999;
display: grid;   
grid-template-columns: repeat(4, 1fr);
align-content: center; 
justify-content: center;
height:40px;

}

/* Mobile: mostra painel botoes simulador*/
.so-mobile-simular {
display:flex;
gap:5px;
justify-content: center;
align-items:center;
transform: scale(1);
width: 100%; 
left:0;
bottom: 105px;
position: fixed;
z-index:999;
visibility: hidden;
}
/////////////




    #painel-gerar-jogos {
        position: fixed;
        margin-bottom: -20px;      /* ← fica acima do simulador */
        left: 0;
        width: 90% !important;
        height: 140px;
    }


    #painel-gerar-jogos h3 {
        position: absolute;
        margin-bottom: 120px;     /* ← sobe para fora do painel */
        font-size: .9rem;
        white-space: nowrap;
    }

  #painel-simulador-jogos {
        position: fixed;
        bottom: 20px;       /* ← fica na borda inferior */
        left: 0;
        width: 90% !important;
        height: 80px;
    }

 #painel-simulador-jogos h3 {
        position: absolute;
        bottom: 30px;     /* ← sobe para fora do painel */
        font-size: .9rem;
        white-space: nowrap;
    }


/* Mobile: ajusta posicao logo aposta */
#logoaposta { left:38%; top:135px; z-index: 0;width:150px;height:150px;}

/* Mobile: esconde logo bolao */
#logobolao { display: none; }


/* Mobile: esconde botao gerar e simulador paineis */
#painel-simulador-jogos { display: none; }
#painel-gerar-jogos  { display: none; }

/* desabilita titulos no mobile */
#painel-simulador-jogos h3 { display: none; }
#painel-gerar-jogos h3 { display: none; }

/*desabilita mobile botao simular*/
#so-mobile-simular  { display: none; }




/* habilitar e desabilitar grade 
@media (max-width: 768px) {
  #gradeWrapper {
    display: none;
  }

  #gradeWrapper.show {
    display: block;
  }
}
*/


}






/* ── MOBILE (≤ 768px): tabs ativas, painéis sob demanda ── */
@media (max-width: 768px) {

  /* Tab bar */
  .tab-nav {
  display: flex;  
  position: fixed;
  bottom: 0px;
  left: 0;
  width: 100%;
  height: 50px;
  z-index: 999; /* garante que fica por cima */

    background: var(--surface2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
}

  .tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 10px 4px;
    font-size: 0.7rem;
    font-weight: 600;
  
  }

  .tab-btn .tab-icon { font-size: 1rem; }

  .tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(0,229,255,0.06);
  }

.paineis-wrapper {
  padding-bottom: 52px; /* altura da nav + folga */
}
  /* Painéis: só o .active aparece */
  .paineis-wrapper .painel          { display: none !important; }
  .paineis-wrapper .painel.active   { display: block !important; }

}


.tab-btn[data-action="preview"] {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.08);
  border-bottom: 2px solid #ff6b6b;
}

/* quando estiver ativo */
.tab-btn[data-action="preview"].active {
  color: #fff;
  background: #ff6b6b;
  border-bottom: 2px solid #ff6b6b;
}



}




/* ── DESKTOP (≥ 769px): mostra todos os painéis, esconde tabs ── */
@media (min-width: 769px) {

  .tab-nav { display: none !important; }

  .paineis-wrapper .painel {
    display: block !important;
    margin-bottom: 0px;
  }

}




/* ── MOBILE PEQUENO (≤ 600px): ajustes de footer ── */
@media (max-width: 600px) {

/* desabilita footer */
#footerMegaBeta  { display: block; }



  #footerMegaBeta {
    margin-top: 50px !important;
    padding: 0px 20px !important;
  }

  #footerMegaBeta p {
    font-size: 0.75rem !important;
    line-height: 1.6 !important;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 15px !important;
    margin-top: 20px !important;
  }


}