/* ==========================
   RESET & BASE
========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Poppins', Arial, sans-serif;
  background: linear-gradient(135deg, #1a0f1f, #2a0939, #1a0f1f);
  color: #fff;
  line-height: 1.6;
  padding-top: 60px;
  padding-bottom: 70px;
}
h1, h2, h3 { font-weight: bold; }

/* ==========================
   CABEÇALHO FIXO
========================== */
.topbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #2a0939;
  border-bottom: 2px solid #ff4da6;
  z-index: 1000;
}
.topbar .logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ff4da6;
}
.topbar nav a {
  margin-left: 15px;
  text-decoration: none;
  color: #f8bbd0;
  font-weight: 500;
  transition: 0.3s;
}
.topbar nav a:hover { color: #ff4da6; }

/* ==========================
   CONTEÚDO CENTRAL
========================== */
.conteudo {
  padding: 20px;
  text-align: center;
}
.secao { display: none; }
.secao.ativo { display: block; }

/* ==========================
   MODAL LOGIN / CADASTRO
========================== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
}
.modal.ativo { display: flex; }

.modal-content {
  background: #1c0f2e;
  border: 2px solid #ff4da6;
  border-radius: 15px;
  padding: 25px;
  width: 320px;
  text-align: center;
  box-shadow: 0 0 25px rgba(255,77,166,0.6);
  position: relative;
  animation: fadeIn 0.3s ease;
}
.modal-content h2 {
  margin-bottom: 15px;
  color: #ff4da6;
}
.modal-content input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid #ff85c1;
  background: #2b1b3f;
  color: #fff;
}
.modal-content input::placeholder {
  color: #bbb;
}
.modal-content button {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: none;
  background: #ff4da6;
  color: #fff;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}
.modal-content button:hover {
  background: #ff74c6;
}
.modal-content .msg {
  margin-top: 10px;
  font-size: 0.9rem;
}
.modal-content .trocar {
  color: #f8bbd0;
  font-size: 0.85rem;
  margin-top: 10px;
  cursor: pointer;
  text-decoration: underline;
}
.modal-content .trocar:hover {
  color: #ff4da6;
}
.fechar {
  position: absolute;
  top: 8px;
  right: 12px;
  color: #ff4da6;
  font-size: 1.6rem;
  cursor: pointer;
  font-weight: bold;
}
.fechar:hover { color: #fff; }

/* ==========================
   HOME
========================== */
.foto-principal {
  width: 180px;
  margin: 20px 0;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
#home h1 { color: #ff4da6; }
#home p { color: #f8bbd0; }

/* ==========================
   BOTÃO FLUTUANTE (TIMER INTELIGENTE)
========================== */
#btnEntrada {
  position: fixed;
  bottom: 85px;
  left: 20px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: #ff4da6;
  color: #fff;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 0 20px rgba(255,77,166,0.8);
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
}
#btnEntrada i {
  font-size: 1rem;
  margin-bottom: 2px;
}
#btnEntrada:hover {
  transform: scale(1.1);
  box-shadow: 0 0 35px rgba(255,77,166,1);
}

/* ===== EFEITO DE ALERTA NOS ÚLTIMOS SEGUNDOS ===== */
#btnEntrada.alerta {
  background: #ff0000;
  animation: alertaPulse 0.8s infinite alternate;
}
@keyframes alertaPulse {
  from {
    box-shadow: 0 0 10px #ff4da6;
    transform: scale(1.0);
  }
  to {
    box-shadow: 0 0 25px #ff0000;
    transform: scale(1.1);
  }
}
/* ==========================
   CARD DE INFORMAÇÕES
========================== */
#cardEntrada {
  position: fixed;
  bottom: 160px;
  left: 20px;
  background: #1c0f2e;
  border: 2px solid #ff4da6;
  border-radius: 15px;
  width: 240px;
  color: #fff;
  padding: 15px;
  z-index: 9998;
  box-shadow: 0 0 25px rgba(255,77,166,0.6);
  display: none;
  animation: fadeIn 0.3s ease;
}
#cardEntrada.ativo { display: block; }

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

#cardEntrada h3 {
  color: #ff4da6;
  margin-bottom: 8px;
  font-size: 1.1rem;
  text-align: center;
}
#cardEntrada .info {
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.4;
}
#cardEntrada .info p {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}
#cardEntrada .info b {
  color: #ff85c1;
}

.faixa-gray {
  background: #2b2b3f;
  color: #fff;
  padding: 6px;
  border-radius: 6px;
  margin-top: 8px;
  font-size: 0.75rem;
  text-align: center;
}
.faixa-red {
  background: #ff3b3b;
  color: #fff;
  padding: 6px;
  border-radius: 6px;
  margin-top: 6px;
  font-size: 0.75rem;
  text-align: center;
  font-weight: bold;
}
#cardEntrada .fechar-card {
  margin-top: 8px;
  padding: 6px 12px;
  background: #ff4da6;
  border: none;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  width: 100%;
}
#cardEntrada .fechar-card:hover {
  background: #ff74c6;
}

/* ==========================
   BOTÃO FLUTUANTE DICAS
========================== */
#btnDicas {
  position: fixed;
  bottom: 10px;
  left: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ffb84d;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 20px rgba(255,184,77,0.8);
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
}
#btnDicas:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(255,184,77,1);
}

/* ==========================
   CARD DE DICAS INTELIGENTES
========================== */
#cardDicas {
  position: fixed;
  bottom: 85px;
  left: 100px;
  background: #1c0f2e;
  border: 2px solid #ffb84d;
  border-radius: 15px;
  width: 240px;
  color: #fff;
  padding: 15px;
  z-index: 9998;
  box-shadow: 0 0 25px rgba(255,184,77,0.6);
  display: none;
  animation: fadeIn 0.3s ease;
}
#cardDicas.ativo { display: block; }

#cardDicas h3 {
  color: #ffb84d;
  margin-bottom: 10px;
  text-align: center;
  font-size: 1.1rem;
}
#cardDicas p {
  font-size: 0.9rem;
  margin-bottom: 10px;
}
#cardDicas input {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ffb84d;
  background: #2b1b3f;
  color: #fff;
  margin-bottom: 10px;
  text-align: center;
}
#cardDicas input::placeholder {
  color: #ccc;
}
#cardDicas button {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: #ffb84d;
  color: #1c0f2e;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
#cardDicas button:hover {
  background: #ffd280;
}
#resultadoDica {
  margin-top: 10px;
  text-align: center;
  font-weight: bold;
  font-size: 0.95rem;
}

/* CORES DE RESULTADO */
#resultadoDica.media { color: #00e0ff; }   /* 70% */
#resultadoDica.alta { color: #ffb84d; animation: glowPulse 1s infinite alternate; }

/* Botão de fechar */
#cardDicas .fechar-card {
  margin-top: 8px;
  padding: 6px 12px;
  background: #ffb84d;
  border: none;
  color: #1c0f2e;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  width: 100%;
  font-weight: bold;
}
#cardDicas .fechar-card:hover {
  background: #ffd280;
}

/* ==========================
   HISTÓRICO (TIPMINER GRID)
========================== */
#historicoTip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  justify-content: center;
  align-items: center;
  padding: 15px;
}
.card-historico {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s, background 0.3s;
}
.card-historico:hover {
  transform: scale(1.05);
}

/* CORES AUTOMÁTICAS */
.card-historico.verde { background: #2ecc71; }   /* bons ganhos */
.card-historico.cinza { background: #3b3b3b; }   /* neutros */
.card-historico.ouro  { background: #f1c40f; }   /* multiplicadores altos */

/* ==========================
   FULLSCREEN JOGAR
========================== */
#jogar.ativo {
  padding: 0;
  margin: 0;
}
.jogar-fullscreen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 1005;
  display: flex;
  flex-direction: column;
}
#voltarMenu {
  position: absolute;
  top: 15px;
  right: 20px;
  background: rgba(255,77,166,0.9);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1006;
  transition: 0.3s;
}
#voltarMenu:hover { background: #ff6fcf; }
.jogo-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================
   RODAPÉ FIXO
========================== */
.footer-bar {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0;
  background: #2a0939;
  border-top: 2px solid #ff4da6;
  z-index: 1000;
}
.footer-bar a {
  flex: 1;
  text-align: center;
  color: #f8bbd0;
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: 0.3s;
}
.footer-bar a i { font-size: 1.2rem; }
.footer-bar a:hover,
.footer-bar a.ativo {
  color: #ff4da6;
}

/* ==========================
   ANIMAÇÕES GERAIS
========================== */
@keyframes glowPulse {
  from { text-shadow: 0 0 15px #fff, 0 0 30px #ff4da6; }
  to   { text-shadow: 0 0 25px #ff85c1, 0 0 40px #ffb6e6; }
}

/* ==========================
   RESPONSIVIDADE
========================== */
@media (max-width: 768px) {
  .topbar { flex-direction: row; padding: 10px 15px; }
  .logo { font-size: 1.2rem; }
  .conteudo { padding: 10px; }
  .jogo-frame { height: 400px; }
}
@media (max-width: 480px) {
  .footer-bar a span { display: none; }
  .footer-bar a i { font-size: 1.4rem; }
}