/* ==========================================================================
   BARRA BRAVA — NOWEY
   ========================================================================= */

.titulo-juego {
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  color: #ff7b00;
  text-shadow: 0 0 12px rgba(255, 123, 0, 0.6);
  letter-spacing: 2px;
  margin: 20px 0 10px 0;
}

.gm-container { display: flex; flex-direction: column; align-items: center; padding: 0 10px 30px 10px; }

/* Color de acento según el modo */
.gm-viewport { --acc: #ff7b00; --acc-rgb: 255, 123, 0; --acc2: #b35700; }
.gm-viewport[data-modo="hinchas"]  { --acc: #ff7b00; --acc-rgb: 255, 123, 0; --acc2: #b35700; }
.gm-viewport[data-modo="barras"]   { --acc: #14ffe9; --acc-rgb: 20, 255, 233; --acc2: #0a9e91; }
.gm-viewport[data-modo="canticos"] { --acc: #ffe94d; --acc-rgb: 255, 233, 77; --acc2: #b3a300; }
.gm-viewport[data-modo="penales"]  { --acc: #39ff14; --acc-rgb: 57, 255, 20; --acc2: #1f9e0a; }
.gm-viewport[data-modo="bengalas"] { --acc: #ff2b5e; --acc-rgb: 255, 43, 94; --acc2: #a31238; }
.gm-viewport[data-modo="loro"]     { --acc: #27c24a; --acc-rgb: 39, 194, 74; --acc2: #14852e; }

.gm-viewport {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #04080c;
}
.gm-viewport:fullscreen { max-width: none !important; justify-content: center; padding: 10px; box-sizing: border-box; }
.gm-viewport:fullscreen .gm-board { width: auto; height: calc(100vh - 170px); max-width: 100%; margin: 0 auto; }
.vista-juego { width: 100%; display: flex; flex-direction: column; align-items: center; }
.oculto { display: none !important; }

/* ---------- Paneles (menú / intro / fin) ---------- */
.bb-panel {
  width: 100%;
  box-sizing: border-box;
  background: #04080c;
  border: 1px solid rgba(var(--acc-rgb), 0.25);
  border-radius: 10px;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 0 30px rgba(var(--acc-rgb), 0.06) inset;
}
.bb-panel h2 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--acc);
  text-shadow: 0 0 12px rgba(var(--acc-rgb), 0.6);
  margin: 0 0 10px 0;
}
#vista-fin h2 { color: #ff2b5e; text-shadow: 0 0 12px rgba(255, 43, 94, 0.6); }
.bb-panel p {
  font-family: 'Chakra Petch', monospace;
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0 0 16px 0;
  max-width: 360px;
}
.bb-sub { margin-bottom: 18px !important; }
.intro-emoji { font-size: 3rem; margin-bottom: 4px; }

/* ---------- Tarjetas del menú ---------- */
.menu-modo {
  width: 100%;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: rgba(var(--c-rgb), 0.07);
  border: 1px solid rgba(var(--c-rgb), 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  color: #e2e8f0;
  font-family: 'Chakra Petch', monospace;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.menu-modo:hover { box-shadow: 0 0 16px rgba(var(--c-rgb), 0.35); }
.menu-modo:active { transform: scale(0.97); }
.mm-emoji { font-size: 2.2rem; flex-shrink: 0; }
.mm-texto { display: flex; flex-direction: column; gap: 2px; }
.mm-nombre { font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 0.9rem; color: var(--c); text-shadow: 0 0 8px rgba(var(--c-rgb), 0.5); }
.mm-desc { font-size: 0.75rem; color: #94a3b8; }
.mm-record { font-size: 0.7rem; color: #64748b; letter-spacing: 1px; }
.mm-record b { color: var(--c); }

/* ---------- HUD y tablero ---------- */
.gm-hud {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-family: 'Chakra Petch', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: #94a3b8;
  padding: 8px 4px;
}
.hud-item span { color: var(--acc); text-shadow: 0 0 6px rgba(var(--acc-rgb), 0.5); }

.gm-board {
  position: relative;
  width: 100%;
  background: #04080c;
  border: 1px solid rgba(var(--acc-rgb), 0.25);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(var(--acc-rgb), 0.08) inset;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#gm-canvas { width: 100%; height: 100%; display: block; }

.gm-logo-fondo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32%;
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
}

.btn-icono {
  position: absolute;
  top: 8px;
  z-index: 25;
  background: rgba(4, 8, 12, 0.7);
  border: 1px solid rgba(var(--acc-rgb), 0.35);
  color: var(--acc);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icono:hover { background: rgba(var(--acc-rgb), 0.15); }
.btn-fullscreen-mate { right: 8px; }
.btn-pausa-mate { right: 50px; }
.btn-sonido-mate { right: 92px; }

/* Pausa compacta (cabe incluso en el tablero horizontal) */
.overlay-pausa {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 12, 0.93);
  padding: 10px;
}
.overlay-pausa h2 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--acc);
  text-shadow: 0 0 12px rgba(var(--acc-rgb), 0.6);
  margin: 0 0 10px 0;
}
.pausa-botones { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.pausa-botones .btn-mate { margin-bottom: 0; padding: 10px 18px; }

/* ---------- Botones y chips ---------- */
.record-chip {
  font-family: 'Chakra Petch', monospace;
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: #94a3b8;
  border: 1px solid rgba(var(--acc-rgb), 0.25);
  border-radius: 20px;
  padding: 6px 16px;
  margin-bottom: 14px;
  background: rgba(var(--acc-rgb), 0.06);
}
.record-chip span { color: var(--acc); font-weight: 800; text-shadow: 0 0 6px rgba(var(--acc-rgb), 0.5); }

.record-nuevo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  color: #ffe94d !important;
  text-shadow: 0 0 10px rgba(255, 233, 77, 0.7);
  font-size: 0.9rem !important;
  margin: -6px 0 14px 0 !important;
  animation: record-brillo 0.9s ease-in-out infinite;
}
@keyframes record-brillo { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }

.btn-mate {
  font-family: 'Chakra Petch', monospace;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  color: #04080c;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(var(--acc-rgb), 0.4);
  margin-bottom: 10px;
  min-width: 210px;
}
.btn-mate:active { transform: scale(0.96); }
.btn-mate.btn-secundario {
  background: rgba(var(--acc-rgb), 0.08);
  color: var(--acc);
  border: 1px solid rgba(var(--acc-rgb), 0.4);
  box-shadow: none;
}
.btn-salir {
  display: inline-block;
  color: #94a3b8;
  text-decoration: none;
  font-family: 'Chakra Petch', monospace;
  font-size: 0.8rem;
  margin-top: 6px;
}
.btn-volver {
  background: none;
  border: none;
  color: #64748b;
  font-family: 'Chakra Petch', monospace;
  font-size: 0.8rem;
  cursor: pointer;
}

.gm-board.sacudida { animation: sacudida-tablero 0.3s ease; }
@keyframes sacudida-tablero {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(4px); }
}

/* ---------- Controles táctiles (Pelea de Barras) ---------- */
.gm-controles {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.ctl-grupo { display: flex; gap: 8px; }
.ctl-btn {
  min-width: 58px;
  height: 58px;
  padding: 0 8px;
  background: rgba(var(--acc-rgb), 0.08);
  border: 1px solid rgba(var(--acc-rgb), 0.35);
  color: var(--acc);
  font-size: 1.3rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.ctl-btn small { font-family: 'Chakra Petch', monospace; font-weight: 700; font-size: 0.5rem; letter-spacing: 0.5px; margin-top: 2px; }
.ctl-btn:active { background: rgba(var(--acc-rgb), 0.28); }
.ctl-especial { opacity: 0.35; }
.ctl-especial.listo { opacity: 1; border-color: #ffe94d; color: #ffe94d; box-shadow: 0 0 14px rgba(255, 233, 77, 0.55); animation: ctl-pulso 0.8s ease-in-out infinite; }
@keyframes ctl-pulso { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@media (hover: hover) and (pointer: fine) { .gm-controles { display: none !important; } }

.staff-footer-note { margin-top: 18px; text-align: center; }
.staff-footer-note a { color: #64748b; text-decoration: none; font-family: 'Chakra Petch', monospace; font-size: 0.8rem; }
