* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #0f172a, #020617);
  font-family: 'Inter', sans-serif;
  color: #fff;
  min-height: 100vh;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOPO */
.app-header {
  height: 60px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.app-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* CONTEÚDO */
.app-content {
  flex: 1;
  padding: 16px;
}

.categoria-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.categoria-card {
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
  border-radius: 16px;
  padding: 18px 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  color: #fff;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: 0.2s ease;
}

.categoria-card:active {
  transform: scale(0.96);
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
}

/* RODAPÉ */
.app-footer {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-voltar {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  background: #0891b2;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  border: none;
}

/* TELA DA CATEGORIA */

.categoria-content {
  flex: 1;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.categoria-titulo {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
}

.categoria-info {
  font-size: 14px;
  color: #cbd5f5;
  margin-bottom: 28px;
}

.btn-novo-jogo {
  background: linear-gradient(135deg, #22c55e, #15803d);
  border: none;
  color: white;
  padding: 14px 44px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(34,197,94,.35);
  transition: 0.2s ease;
}

.btn-novo-jogo:active {
  transform: scale(0.95);
  box-shadow: 0 4px 10px rgba(34,197,94,.4);
}

.btn-back {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
}

.header-space {
  width: 22px;
}

/* MODAL CONFIG JOGO */

.config-modal {
  background: #0f172a;
  color: #fff;
  border-radius: 18px;
  padding: 10px 4px;
}

.config-modal .modal-title {
  font-weight: 700;
  font-size: 20px;
}

.slider-value {
  text-align: center;
  font-size: 14px;
  margin-top: 4px;
  color: #cbd5f5;
}

.btn-add-player {
  width: 100%;
  margin-top: 8px;
  background: #4c1d95;
  color: #fff;
  font-weight: 600;
  border-radius: 12px;
  padding: 10px;
  border: none;
}

.btn-cancelar {
  background: transparent;
  color: #a5b4fc;
  font-weight: 600;
  border: none;
}

.btn-iniciar {
  background: #22c55e;
  color: white;
  padding: 8px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
}

/* =========================
   TELA DE TRANSIÇÃO
========================= */

.tela-transicao {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #1e3a8a, #020617);
  padding: 20px;
}

.transicao-card {
  width: 100%;
  max-width: 360px;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 22px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  animation: fadeScale 0.4s ease;
}

.transicao-titulo {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.transicao-sub {
  font-size: 14px;
  color: #cbd5f5;
  margin-bottom: 26px;
}

.contador-animado {
  font-size: 64px;
  font-weight: 900;
  color: #22c55e;
  margin-bottom: 26px;
  animation: pulse 1s infinite;
}

/* Barra de progresso */
.barra-progresso {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,.1);
  border-radius: 10px;
  overflow: hidden;
}

.barra {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  animation: barraTempo 5s linear forwards;
}

.transicao-player {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 20px;
  color: #60a5fa;
}


/* Animações */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes barraTempo {
  from { width: 100%; }
  to { width: 0%; }
}

@keyframes fadeScale {
  from {
    opacity: 0;
    transform: scale(.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================
   TELA DO JOGO (ESTILO APP)
========================= */

.tela-jogo {
  background: #facc15;
  min-height: 100vh;
  padding: 12px;
}

.topo-jogo {
  background: #1e3a8a;
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
}

.topo-jogo small {
  font-weight: 400;
  font-size: 12px;
}

.perfil-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 14px;
  margin-top: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

.perfil-header {
  background: linear-gradient(135deg,#2563eb,#1e3a8a);
  color: white;
  border-radius: 16px;
  padding: 16px;
}

.perfil-tag {
  background: rgba(255,255,255,.2);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  margin-bottom: 6px;
}

.perfil-titulo {
  font-size: 20px;
  font-weight: 900;
}

.perfil-dicas {
  margin-top: 14px;
}

.dica-item {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.15s;
}

.dica-texto {
  font-size: 14px;
  transition: 0.15s;
}

.dica-texto.oculto {
  color: #9ca3af;
  text-decoration: line-through;
}

.dica-item[data-revelado="1"] .dica-texto {
  color: #111827;
  text-decoration: none;
  font-weight: 600;
}

.btn-estrela {
  background: #2563eb;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* BOTÕES DE AÇÃO */
.acoes-finais {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn-acao {
  flex: 1;
  border: none;
  padding: 12px 6px;
  border-radius: 14px;
  font-weight: 900;
  color: white;
  font-size: 14px;
}

.btn-desfazer {
  background: #ec4899;
}

.btn-pular {
  background: #f59e0b;
}

.btn-acertou {
  background: #22c55e;
}

.dica-texto.oculto {
  color: #9ca3af;
  text-decoration: line-through;
}

.dica-item.revelada {
  background: #ecfdf3;
  border: 1px solid #22c55e;
}

.dica-item.revelada .dica-texto {
  color: #14532d;
  text-decoration: none;
  font-weight: 600;
}

/* botão estrela normal */
.btn-estrela {
  background: #2563eb;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* quando revelado, vira "check" clarinho */
.btn-estrela.btn-check {
  background: #dcfce7;
  color: #16a34a;
  border-radius: 999px;
  width: 42px;
  height: 28px;
  font-size: 16px;
}

.modal {
  z-index: 99999 !important;
}

.modal-backdrop {
  z-index: 99998 !important;
}
.btn-placar {
  background: #0ea5e9;
}

/* =========================
   PWA INSTALL PROMPT
========================= */
.pwa-install-prompt {
  position: fixed;
  bottom: -100%; /* Começa escondido */
  left: 12px;
  right: 12px;
  background: #1e293b;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 10000;
  transition: bottom 0.5s ease-in-out;
}

.pwa-install-prompt.show {
  bottom: 12px; /* Aparece */
}

.pwa-install-prompt p {
  margin: 0;
  font-size: 14px;
}
