/* Component classes in plain CSS so Tailwind CDN doesn't need to @apply custom tokens */
html, body { touch-action: manipulation; }

.press:active { transform: translateY(2px); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.25rem;
  min-height: 52px;
  border-radius: 18px;
  color: #fff;
  background: #58cc02;
  border: none;
  border-bottom: 4px solid #378200;
  transition: transform 0.08s ease;
  user-select: none;
  cursor: pointer;
  text-decoration: none;
}
.btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}
.btn-lg {
  font-size: 1.125rem;
  padding: 1rem 1.5rem;
  min-height: 60px;
}
.btn-sky   { background: #1cb0f6; border-bottom-color: #0e7bb5; }
.btn-sun   { background: #ffc800; color: #2b2d33; border-bottom-color: #c99a00; }
.btn-fire  { background: #ff4b4b; border-bottom-color: #b53232; }
.btn-ghost {
  background: #fff;
  color: #2b2d33;
  border: 2px solid rgba(0,0,0,0.08);
  border-bottom: 4px solid rgba(0,0,0,0.12);
}

/* --- Cards --- */
.card {
  background: #fff;
  border-radius: 18px;
  border: 2px solid rgba(0,0,0,0.05);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  padding: 1rem;
}

/* --- Chips --- */
.chip {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 900;
  background: rgba(0,0,0,0.05);
  color: #2b2d33;
}
.chip-A { background: rgba(28,176,246,0.15); color: #0e7bb5; }
.chip-B { background: rgba(255,200,0,0.25); color: #b45309; }

/* --- Cores das mesas: 1 azul, 2 vermelha --- */
.mesa-1 { background: #eef3ff; border: 3px solid #1e50c8; }
.mesa-2 { background: #fff0ef; border: 3px solid #d7261e; }
.chip.mesa-chip-1 { background: #1e50c8; color: #fff; }
.chip.mesa-chip-2 { background: #d7261e; color: #fff; }
.btn.mesa-btn-1 { background: #1e50c8; border-bottom-color: #133585; }
.btn.mesa-btn-2 { background: #d7261e; border-bottom-color: #8f1913; }
.btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

/* --- Avatar --- */
.ava {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 0 4px #fff;
}

/* --- Inputs --- */
input[type="text"], input[type="number"], input:not([type]) {
  outline: none;
}
input:focus {
  box-shadow: 0 0 0 3px rgba(88,204,2,0.3);
}

/* --- Logo bola 8 (topo no celular, menu lateral no desktop) --- */
.sidenav-ball {
  width: 30px; height: 30px; border-radius: 50%; background: #111; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset -2px -3px 4px rgba(0,0,0,.5), inset 2px 2px 3px rgba(255,255,255,.25);
}
.sidenav-ball i {
  font-style: normal; font-size: 11px; font-weight: 900; color: #111;
  background: #fff; border-radius: 50%; width: 15px; height: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* --- Menu: lateral (desktop) / barra inferior (celular) --- */
.has-nav { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.sidenav { display: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: #1b120c;
  border-top: 3px solid #5a3418;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.25);
}
.tabbar-link {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; border-radius: 12px;
  color: rgba(246,239,228,0.6);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 9.5px; font-weight: 800; text-decoration: none;
  white-space: nowrap; overflow: hidden;
}
.tabbar-link svg, .sidenav-link svg {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.tabbar-link.is-active { color: #fff; background: #137a40; }
.tabbar-link:active { transform: translateY(1px); }

@media (min-width: 768px) {
  .has-nav { padding-bottom: 0; padding-left: 232px; }
  .tabbar { display: none; }
  .sidenav {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
    width: 232px; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 4px;
    padding: 20px 14px;
    background:
      repeating-linear-gradient(95deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 9px),
      linear-gradient(180deg, #2a1b12, #1b120c);
    border-right: 4px solid #5a3418;
    font-family: 'Nunito', system-ui, sans-serif;
  }
  .sidenav-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 18px; margin-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #fff8ec; font-size: 1.2rem; font-weight: 900; text-decoration: none;
  }
  .sidenav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 14px;
    color: rgba(246,239,228,0.75); font-weight: 800; text-decoration: none;
  }
  .sidenav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
  .sidenav-link.is-active { background: #137a40; color: #fff; box-shadow: inset 0 -3px 0 #0b4d27; }
  .sidenav-sep {
    margin: 14px 12px 4px; font-size: 0.68rem; font-weight: 900;
    letter-spacing: 0.2em; text-transform: uppercase; color: #e9b44c;
  }
  .hide-desktop { display: none !important; }
}

/* --- Regras --- */
.rules { line-height: 1.6; }
.rules h1 { font-size: 1.6rem; font-weight: 900; margin: 0 0 .5rem; }
.rules h2 { font-size: 1.15rem; font-weight: 900; margin: 1.4rem 0 .4rem; padding-top: .9rem;
            border-top: 2px solid rgba(0,0,0,0.06); color: #137a40; }
.rules h3 { font-size: 1rem; font-weight: 900; margin: 1rem 0 .3rem; }
.rules p { margin: .4rem 0; color: rgba(43,45,51,0.85); }
.rules ul, .rules ol { margin: .3rem 0 .3rem 1.2rem; }
.rules ul { list-style: disc; }
.rules ol { list-style: decimal; }
.rules li { margin: .2rem 0; }

/* --- Foto do jogador --- */
.ava { flex: none; }
.ava-img { object-fit: cover; background: #ddd; }

/* --- Sequências (estilo Kahoot) --- */
.streak {
  display: inline-flex; align-items: center; gap: 1px; margin-left: .35rem;
  padding: .05rem .4rem; border-radius: 9999px; white-space: nowrap;
  font-size: .75em; font-weight: 900; line-height: 1.4; vertical-align: middle;
}
.streak-warm { background: #fff1e0; color: #c2410c; }
.streak-hot  { background: #ffe0d1; color: #c2410c; animation: streak-pulse 1.1s ease-in-out infinite; }
.streak-max  { background: linear-gradient(90deg, #ff4b4b, #ffc800); color: #fff;
               box-shadow: 0 0 10px rgba(255, 120, 0, .7); animation: streak-pulse .8s ease-in-out infinite; }
.streak-cold { background: #e0f2fe; color: #0369a1; }
@keyframes streak-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .streak-hot, .streak-max { animation: none; } }

/* --- Aviso "pegando fogo" (estilo Kahoot) --- */
.hot-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(circle at 50% 40%, rgba(150,55,0,.94), rgba(15,6,0,.97) 70%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: hot-in .35s ease-out;
}
.hot-overlay[hidden] { display: none; }
.hot-card { text-align: center; color: #fff; max-width: 34rem; }
.hot-emoji { font-size: clamp(4rem, 22vw, 8rem); line-height: 1; animation: hot-pop 0.9s ease-in-out infinite; }
.hot-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: .5rem auto;
             border: 5px solid #ffc800; box-shadow: 0 0 30px rgba(255,160,0,.9); display: block; }
.hot-photo[hidden] { display: none; }
.hot-title { font-size: clamp(1.8rem, 9vw, 3.5rem); font-weight: 900; line-height: 1.05;
             text-shadow: 0 4px 0 #b53232, 0 0 24px rgba(255,120,0,.8); }
.hot-sub { margin-top: .5rem; font-size: 1.1rem; font-weight: 900; letter-spacing: .15em;
           text-transform: uppercase; color: #ffd27a; }
.hot-overlay.is-max { background: radial-gradient(circle at 50% 40%, rgba(170,20,30,.94), rgba(25,0,8,.97) 70%); }
@keyframes hot-in { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@keyframes hot-pop { 0%, 100% { transform: scale(1) rotate(-4deg); } 50% { transform: scale(1.15) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .hot-overlay, .hot-emoji { animation: none; } }

/* --- link do jogador na tabela --- */
.player-link { color: inherit; text-decoration: none; border-bottom: 2px dotted rgba(0,0,0,.18); }
.player-link:hover, .player-link:active { border-bottom-color: #58cc02; }
