/* ===== screens.css — Telas (home, lobby, pick, buff, end), header e HUD superior =====
   Gerado por tools/split-css-modules.mjs (Fase B-CSS). Nao editar a divisao manualmente sem
   reconferir a cascata. Ver VaultBrain/Brain/Padroes/Padroes CSS.md ===== */

/* MOLDURA DE CELULAR FALSA REMOVIDA (2026-06-30). Antes o #phone-wrapper desenhava um corpo de celular
   (bezel cinza, cantos arredondados, "notch"/home falsos) que so fazia sentido no PC e no celular real
   comia borda. Agora e so um container transparente; o #app preenche direto. O auto-fit foi ajustado
   (04-autofit-viewport.js) para nao contar mais o padding do bezel. */
#phone-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
#phone-wrapper::before,
#phone-wrapper::after {
  display: none;
}
#app {
  width: 390px;
  height: 820px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  touch-action: none;
  border-radius: 0;
}
/* Sliders (volume etc.): o #app tem touch-action:none, que BLOQUEIA arrastar o range no toque
   (so o clique/tap funcionava, dando a impressao de "controle de som nao funciona"). Reabilita o
   arraste horizontal so nos ranges. */
input[type='range'] {
  touch-action: pan-x;
}
.screen {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  box-sizing: border-box;
}
.screen.active {
  display: flex;
}
#home-screen.is-loading .home-content {
  opacity: 0;
  pointer-events: none;
}
#home-screen:not(.is-loading) #loading-mask {
  opacity: 0;
}
#home-screen:not(.is-loading) #loading-bar-wrap {
  opacity: 0;
  pointer-events: none;
}
.hdr {
  background: linear-gradient(180deg, #3a3f4a, #2a2e38, #1e2228);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(180, 180, 195, 0.25);
  flex-shrink: 0;
}
.hdr-title {
  font-family: 'Righteous', cursive;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: 1px;
}
.hdr-info {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}
.score-badge {
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--accent);
}
.gold-badge {
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: var(--radius-2xl);
  border: 1px solid gold;
  color: gold;
}
.phase-label {
  text-align: center;
  font-family: 'Righteous', cursive;
  font-size: 13px;
  color: var(--text2);
  letter-spacing: 2px;
  padding: 3px 0;
  background: var(--surface);
  flex-shrink: 0;
}
.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, clamp(74px, 30.9%, 106px)));
  grid-auto-rows: 97px;
  justify-content: center;
  row-gap: 6px;
  column-gap: 6px;
  padding: 4px clamp(8px, 3vw, 14px);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  align-content: start;
}
#lobby-screen {
  background: var(--bg);
}
.lobby-title {
  font-family: 'Righteous', cursive;
  font-size: 22px;
  color: var(--accent);
  text-align: center;
  padding: 10px 0 2px;
  letter-spacing: 1px;
}
.lobby-sub {
  font-size: 11px;
  color: var(--text2);
  text-align: center;
  margin-bottom: 8px;
}
.hdr {
  background: linear-gradient(180deg, #3a3f4a, #2a2e38, #1e2228);
  box-shadow: 0 2px 14px rgba(var(--black-rgb), 0.5);
  border-bottom: 2px solid rgba(180, 180, 195, 0.25);
}
.hdr-title {
  text-shadow:
    0 0 14px rgba(var(--accent-rgb), 0.5),
    0 0 30px rgba(var(--accent-rgb), 0.15);
}
.score-badge {
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.15);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
}
.gold-badge {
  box-shadow: 0 0 8px rgba(var(--gold-rgb), 0.2);
  border: 1px solid rgba(var(--gold-rgb), 0.35);
}
.phase-label {
  color: var(--text);
  letter-spacing: 3px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.08), transparent);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.2);
  font-size: 11px;
  text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.15);
}
#gold-counter-bot,
#gold-counter-player {
  backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
}
.screen.active {
  animation: screen-in 0.22s ease-out forwards;
}
#pick-screen {
  background: url('../img/escolher_time_buff.webp') center/cover no-repeat;
}
#loading-screen {
  background: #0a0f1a !important;
  animation: none !important;
}
.energy-bump {
  animation: energy-bump-anim 0.35s ease;
}
#gold-display {
  width: clamp(60px, 22vw, 90px);
  height: clamp(60px, 22vw, 90px);
}
#gold-display-num {
  font-size: clamp(22px, 9vw, 38px);
}
