/* ─── Fight · control/style.css ─────────────────────────────────────────────
   Mando móvil optimizado para landscape en celular con controles grandes.
   ──────────────────────────────────────────────────────────────────────────── */

/* ── Reset y variables ───────────────────────────────────────────────────── */
:root {
  font-family: 'Inter', Arial, sans-serif;
  color: #f3f6fb;
  background: #060911;
  color-scheme: dark;
  --green:  #9dfd48;
  --red:    #fc685b;
  --blue:   #5080ff;
  --energy: #a060ff;
  --card-bg: #0f1824;
  --border:  #2a3649;
}
* {
  box-sizing: border-box;
  -webkit-touch-callout: none;
}
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none; /* Bloqueo estricto de gestos de zoom y doble toque */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  background: #060911; /* Fondo oscuro continuo sin bordes grises */
}
#join {
  touch-action: pan-y;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
}

/* ── Portrait overlay ────────────────────────────────────────────────────── */
#rotate-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #050810;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 32px;
}
#rotate-overlay .rotate-icon {
  font-size: 72px;
  animation: rotatePhone 2s ease-in-out infinite;
}
@keyframes rotatePhone {
  0%   { transform: rotate(0deg); }
  40%  { transform: rotate(0deg); }
  60%  { transform: rotate(-90deg); }
  100% { transform: rotate(-90deg); }
}
#rotate-overlay h2 { font-size: clamp(20px, 5vw, 26px); font-weight: 800; margin: 0; }
#rotate-overlay p  { font-size: 14px; color: #8899b4; margin: 0; max-width: 260px; }

/* ── Header ──────────────────────────────────────────────────────────────── */
header {
  height: 46px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  flex-shrink: 0;
  background: #090e18;
}
body.playing header,
body:has(#pad:not([hidden])) header {
  display: none !important;
}
header strong { font-size: 18px; letter-spacing: -0.5px; font-weight: 900; }
header strong span { color: var(--green); margin-left: 3px; }
#status { font-size: 10px; color: #8fa3c0; letter-spacing: 1px; text-transform: uppercase; }

/* ── Join Form ───────────────────────────────────────────────────────────── */
main {
  padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
  max-width: 960px;
  margin: auto;
  box-sizing: border-box;
}
body.playing main,
body:has(#pad:not([hidden])) main {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
}
form { max-width: 400px; margin: 10px auto; }
.eyebrow { color: var(--green); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; }
h1 {
  font-size: clamp(26px, 6vw, 40px);
  line-height: 1.05;
  letter-spacing: -1.2px;
  margin: 14px 0;
}
label, .label-heading { display: block; font-size: 13px; color: #9aacc6; margin: 12px 0 5px; }
input, select {
  width: 100%;
  padding: 12px 13px;
  font: inherit;
  border: 1px solid #3d506a;
  background: #10182a;
  color: #f3f6fb;
  border-radius: 7px;
  transition: border-color .15s;
}
input:focus, select:focus { outline: none; border-color: var(--green); }
#room {
  letter-spacing: 4px;
  text-transform: uppercase;
  font-family: monospace;
  font-size: 18px;
}
button {
  font: inherit;
  cursor: pointer;
  border: 1px solid #3d506a;
  color: inherit;
  background: #172234;
  border-radius: 8px;
  padding: 10px 16px;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.primary {
  width: 100%;
  background: var(--green);
  color: #0c1705;
  border: 0;
  font-weight: 800;
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: #aabbcf; font-size: 14px; }
#error { color: #ffbfa3; font-size: 13px; min-height: 18px; }
[hidden] { display: none !important; }

/* ── Color picker ────────────────────────────────────────────────────────── */
.color-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 8px;
}
.color-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.color-opt input[type="radio"] { display: none; }
.color-opt:hover { background: #1a2a40; }
.color-opt.selected {
  border-color: var(--green);
  background: #9dfd4812;
}
.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
  border: 2px solid #ffffff20;
}
.color-swatch--black  { background: #2a2a2a; box-shadow: 0 0 0 2px #aaaaaa inset; }
.color-swatch--red    { background: #e03030; }
.color-swatch--green  { background: #30c040; }
.color-swatch--blue   { background: #2060e0; }
.color-swatch--yellow { background: #d4c020; }
.color-name { font-size: 11px; color: #9aacc6; letter-spacing: .3px; }

/* ── Prep panel (J1) ─────────────────────────────────────────────────────── */
.prep-card {
  max-width: 420px;
  margin: 20px auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.prep-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.btn-leave {
  padding: 5px 14px;
  font-size: 12px;
  border-radius: 6px;
  background: #1a2a3f;
  border-color: #3d506a;
}
.prep-mode-row,
.prep-diff-row {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prep-label { font-size: 11px; letter-spacing: 2px; color: #8490a8; text-transform: uppercase; }
.prep-modes { display: flex; gap: 8px; }
.prep-mode-btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #3d506a;
  background: #111c2e;
  color: #b0bfd6;
  transition: background .15s, border-color .15s;
}
.prep-mode-btn.selected { background: #9dfd4818; border-color: var(--green); color: var(--green); }
.prep-diff-btns { display: flex; gap: 8px; }
.prep-diff-btn {
  flex: 1;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 16px;
  border: 1px solid #3d506a;
  background: #111c2e;
  color: #b0bfd6;
}
.prep-diff-btn.selected { background: #9dfd4818; border-color: var(--green); color: var(--green); }

.prep-time-row {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prep-time-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.prep-time-btn {
  flex: 1;
  min-width: 60px;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 16px;
  border: 1px solid #3d506a;
  background: #111c2e;
  color: #b0bfd6;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.prep-time-btn:hover { border-color: #9dfd4860; color: #d0e8b8; }
.prep-time-btn.selected { background: #9dfd4818; border-color: var(--green); color: var(--green); }

/* ── Escenarios y colores en el mando de J1 ──────────────────────────────── */
.prep-stage-row, .prep-color-row {
  margin: 12px 0 8px;
}
.prep-stage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 6px;
}
.prep-stage-btn {
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  background: #111c2e;
  border: 1px solid #2f4568;
  color: #b0bfd6;
  cursor: pointer;
  transition: all .15s ease;
  text-align: center;
}
.prep-stage-btn.selected {
  background: #9dfd4818;
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 10px #9dfd4833;
}
.prep-color-btns {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  align-items: center;
}
.prep-color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.prep-color-dot.selected {
  border-color: #ffffff;
  transform: scale(1.18);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}
.prep-color--green  { background: #30c040; }
.prep-color--red    { background: #e03030; }
.prep-color--blue   { background: #2060e0; }
.prep-color--yellow { background: #d4c020; }
.prep-color--black  { background: #2a2a2a; border-color: #777; }

.prep-players { display: flex; gap: 10px; margin: 14px 0; }
.prep-player {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2d3e55;
  background: #0a1220;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.pp-label { font-weight: 800; font-size: 12px; letter-spacing: 1px; color: #9aacc6; }
.pp-name { flex: 1; font-weight: 600; }
.pp-badge { font-size: 14px; color: #3d506a; }
.pp-badge.connected { color: var(--green); }
.prep-start-btn { font-size: 16px; padding: 16px; letter-spacing: .3px; }
.prep-hint { font-size: 12px; color: #8490a8; text-align: center; margin-top: 8px; }
.wait-msg { color: #9aacc6; font-size: 15px; margin: 16px 0; text-align: center; }

/* ── Ventana flotante de resultado / revancha (J1) ───────────────────────── */
.result-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(4, 7, 14, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.result-modal[hidden] {
  display: none !important;
}
.result-card {
  background: linear-gradient(145deg, #101c2e, #0c1422);
  border: 2px solid #38bdf888;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 22px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}
.rm-tag {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--green);
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}
.result-card h2 {
  margin: 6px 0 8px;
  font-size: 26px;
  font-weight: 900;
  color: #f3f6fb;
  letter-spacing: -.5px;
}
.rm-desc {
  margin: 0 0 18px;
  font-size: 13px;
  color: #8fa3c0;
}
.rm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rm-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: .3px;
}
.rm-rematch {
  background: var(--green);
  color: #0c1705;
  border: none;
  box-shadow: 0 4px 16px rgba(157, 253, 72, 0.45);
}
.rm-rematch:active {
  transform: translateY(2px);
  filter: brightness(1.2);
}
.rm-lobby {
  background: #17263c;
  color: #e2e8f0;
  border: 1px solid #3d506a;
}
.rm-lobby:active {
  transform: translateY(2px);
  background: #20334e;
}

/* ── Pad (landscape) ─────────────────────────────────────────────────────── */
#pad {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  z-index: 100;
  background: #060911;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
#pad[hidden] {
  display: none !important;
}
.padhead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  height: 28px;
  box-sizing: border-box;
  background: #090e18;
}
#who { font-size: 13px; font-weight: 800; letter-spacing: .5px; }
#latency { font-size: 11px; color: #7a8fab; }
#leave {
  margin-left: auto;
  padding: 2px 10px;
  font-size: 11px;
  border-radius: 6px;
  background: #1a2a3f;
  border-color: #3d506a;
}

/* ── Controls area: ocupa toda la pantalla en landscape sin recortes ──────── */
.controls-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  padding: 4px max(14px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  box-sizing: border-box;
  height: calc(100% - 28px);
  max-height: calc(100% - 28px);
}

/* ── Cruceta (izquierda) ─────────────────────────────────────────────────── */
.dpad-zone {
  flex: 0 0 auto;
  width: min(39vw, calc(100dvh - 36px), 290px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: clamp(4px, 1.2vw, 10px);
  width: min(38vw, calc(100dvh - 40px), 280px);
  height: min(38vw, calc(100dvh - 40px), 280px);
  max-width: 100%;
  max-height: 100%;
}

/* ── Centro: botones de pausa y salir + leyenda única centralizada ───────── */
.center-zone {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  text-align: center;
  min-width: 0;
  max-width: 240px;
  margin: 0 auto;
  gap: 12px;
}
.pad-legend-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.compact-legend {
  font-size: clamp(10px, 1.3vw, 12px);
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.3px;
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
}

/* ── Acciones en rombo (derecha) ─────────────────────────────────────────── */
.actions-zone {
  flex: 0 0 auto;
  width: min(39vw, calc(100dvh - 54px), 280px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.actions-diamond {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: clamp(4px, 1.2vw, 10px);
  width: min(38vw, calc(100dvh - 58px), 270px);
  height: min(38vw, calc(100dvh - 58px), 270px);
  max-width: 100%;
  max-height: 100%;
}

/* Posición de los botones en el grid de rombo */
.act-special { grid-area: 1 / 2; } /* △ arriba  */
.act-punch   { grid-area: 2 / 1; } /* □ izquierda */
.act-block   { grid-area: 2 / 3; } /* ○ derecha  */
.act-kick    { grid-area: 3 / 2; } /* × abajo   */

/* ── Estilos comunes de todos los botones del pad ────────────────────────── */
.controls-area button {
  touch-action: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 4px 0 #020509;
  border-radius: 50%;
  transition: filter .05s, transform .05s, box-shadow .05s;
  padding: 0;
  line-height: 1;
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
}
.controls-area button small {
  font-size: clamp(9px, 1.4vw, 12px);
  letter-spacing: .5px;
  font-weight: 800;
  display: block;
  margin-top: 2px;
  line-height: 1;
}

/* Símbolo principal con alta luminosidad y notoriedad */
.act-symbol {
  font-size: clamp(34px, 7.5vw, 52px);
  line-height: 1;
  font-weight: 900;
  font-family: 'Inter', Arial, sans-serif;
  display: block;
}

/* Cruceta — botones grandes con flechas luminosas */
.dpad button {
  border-radius: 16px;
  background: radial-gradient(circle at 35% 35%, #1e293b 0%, #0b1320 85%, #050a12 100%);
  border: 2.5px solid #38bdf888;
  box-shadow: 0 6px 0 #020617, 0 0 16px rgba(56, 189, 248, 0.35), inset 0 0 12px rgba(56, 189, 248, 0.15);
  font-size: clamp(26px, 5.5vw, 40px);
  color: #38bdf8;
  text-shadow: 0 0 10px #38bdf8, 0 0 20px #0284c7;
}
.dpad button small {
  color: #7dd3fc;
  font-weight: 800;
  text-shadow: 0 0 6px #0284c7;
}
.up    { grid-area: 1 / 2; }
.left  { grid-area: 2 / 1; }
.right { grid-area: 2 / 3; }
.down  { grid-area: 3 / 2; }

/* ── Botones de acción luminosos (□, △, ○, ×) ────────────────────────────── */

/* □ PUÑO: Verde Neón Luminoso */
.act-punch {
  background: radial-gradient(circle at 35% 35%, #15803d 0%, #052e16 80%, #021a0d 100%);
  border: 3.5px solid #4ade80;
  box-shadow: 0 6px 0 #011208, 0 0 24px rgba(34, 197, 94, 0.7), inset 0 0 18px rgba(74, 222, 128, 0.5);
  color: #ffffff;
}
.act-punch .act-symbol {
  color: #ffffff;
  text-shadow: 0 0 8px #4ade80, 0 0 20px #22c55e, 0 0 35px #16a34a, 0 0 45px #15803d;
}
.act-punch small {
  color: #86efac;
  text-shadow: 0 0 8px #22c55e;
}

/* × PATADA: Rojo / Coral Neón Luminoso */
.act-kick {
  background: radial-gradient(circle at 35% 35%, #b91c1c 0%, #450a0a 80%, #240505 100%);
  border: 3.5px solid #f87171;
  box-shadow: 0 6px 0 #180202, 0 0 24px rgba(239, 68, 68, 0.7), inset 0 0 18px rgba(248, 113, 113, 0.5);
  color: #ffffff;
}
.act-kick .act-symbol {
  color: #ffffff;
  text-shadow: 0 0 8px #f87171, 0 0 20px #ef4444, 0 0 35px #dc2626, 0 0 45px #991b1b;
}
.act-kick small {
  color: #fca5a5;
  text-shadow: 0 0 8px #ef4444;
}

/* ○ BLOQUEO: Azul / Cian Neón Luminoso */
.act-block {
  background: radial-gradient(circle at 35% 35%, #0284c7 0%, #082f49 80%, #031c2d 100%);
  border: 3.5px solid #38bdf8;
  box-shadow: 0 6px 0 #02121e, 0 0 24px rgba(14, 165, 233, 0.7), inset 0 0 18px rgba(56, 189, 248, 0.5);
  color: #ffffff;
}
.act-block .act-symbol {
  color: #ffffff;
  text-shadow: 0 0 8px #38bdf8, 0 0 20px #0ea5e9, 0 0 35px #0284c7, 0 0 45px #0369a1;
}
.act-block small {
  color: #7dd3fc;
  text-shadow: 0 0 8px #0ea5e9;
}

/* △ ESPECIAL: Púrpura Eléctrico Neón Luminoso */
.act-special {
  background: radial-gradient(circle at 35% 35%, #7e22ce 0%, #2e0854 80%, #17042a 100%);
  border: 3.5px solid #c084fc;
  box-shadow: 0 6px 0 #0d0118, 0 0 24px rgba(168, 85, 247, 0.75), inset 0 0 18px rgba(192, 132, 252, 0.5);
  color: #ffffff;
}
.act-special .act-symbol {
  color: #ffffff;
  text-shadow: 0 0 8px #e879f9, 0 0 20px #c084fc, 0 0 35px #a855f7, 0 0 45px #7e22ce;
}
.act-special small {
  color: #d8b4fe;
  text-shadow: 0 0 8px #a855f7;
}

/* Especial deshabilitado si no hay carga */
.act-special.disabled {
  opacity: .45;
  filter: grayscale(.4);
  box-shadow: 0 6px 0 #0d0118;
}

/* Especial cargado al 100%: Resplandor vibrante animado */
.act-special.ready {
  opacity: 1;
  filter: none;
  border-color: #ffea00;
  box-shadow: 0 6px 0 #0d0118, 0 0 32px #c084fc, 0 0 50px #ffea0080;
  animation: glow-special .7s ease-in-out infinite alternate;
}
.act-special.ready .act-symbol {
  color: #fff;
  text-shadow: 0 0 10px #ffea00, 0 0 25px #c084fc, 0 0 45px #a855f7;
}
@keyframes glow-special {
  from {
    transform: scale(1);
    box-shadow: 0 6px 0 #0d0118, 0 0 20px #a855f7, 0 0 30px #c084fc80;
  }
  to {
    transform: scale(1.04);
    box-shadow: 0 6px 0 #0d0118, 0 0 40px #ffea00, 0 0 60px #a855f7;
  }
}

/* Estado pulsado para todos los botones táctiles */
.controls-area button.pressed {
  transform: translateY(5px) scale(0.98);
  box-shadow: none;
  filter: brightness(1.75);
}

/* ── Orientación ─────────────────────────────────────────────────────────── */
@media (orientation: portrait) {
  #pad { visibility: hidden; }
  #rotate-overlay { display: flex; }
}
@media (orientation: landscape) {
  #rotate-overlay { display: none !important; }
  #pad { visibility: visible; }
}

/* ── Botones de Pausa y Salir en el centro del Mando ──────────────────────── */
.pad-center-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 14px);
  margin-bottom: 6px;
  width: 100%;
}
.btn-ctrl-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: clamp(6px, 1.4vh, 9px) clamp(10px, 2.2vw, 16px);
  border-radius: 20px;
  font-family: inherit;
  font-size: clamp(11px, 2.2vw, 13px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: all .15s ease;
  border: 1.5px solid transparent;
  outline: none;
  white-space: nowrap;
}
.btn-ctrl-pause {
  background: linear-gradient(135deg, rgba(254, 240, 138, 0.15) 0%, rgba(20, 26, 38, 0.85) 100%);
  border-color: rgba(254, 240, 138, 0.45);
  color: #fef08a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 0 8px rgba(254, 240, 138, 0.1);
}
.btn-ctrl-pause:active {
  transform: scale(0.94);
  background: rgba(254, 240, 138, 0.3);
  border-color: #fef08a;
  box-shadow: 0 0 14px rgba(254, 240, 138, 0.5);
}
.btn-ctrl-leave {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(20, 26, 38, 0.85) 100%);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 0 8px rgba(239, 68, 68, 0.1);
}
.btn-ctrl-leave:active {
  transform: scale(0.94);
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5);
}
.bcc-icon {
  font-size: 13px;
  line-height: 1;
}

/* ── Modales de Pausa y Salir en el Mando ──────────────────────────────────── */
.pad-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(6, 9, 17, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modal-fade-in .18s ease-out;
}
.pad-modal[hidden] {
  display: none !important;
}
@keyframes modal-fade-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.pad-modal-card {
  background: #0d1522;
  border: 1.5px solid #2d3e58;
  border-radius: 18px;
  padding: clamp(16px, 3vh, 24px) clamp(20px, 4vw, 32px);
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(37, 53, 76, 0.5);
}
.pm-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(254, 240, 138, 0.15);
  border: 1px solid rgba(254, 240, 138, 0.4);
  color: #fef08a;
  margin-bottom: 8px;
}
.pm-tag--danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.pm-tag--warning {
  background: rgba(255, 170, 64, 0.2);
  color: #ffaa40;
  border-color: #ffaa40;
}
#pause-modal-by {
  color: #9dfd48;
  font-weight: 700;
  margin: 6px 0 10px;
  font-size: 14px;
}
#j1-approval-title {
  margin-top: 8px;
}
#j1-approval-desc {
  margin-bottom: 14px;
  color: #cbd5e1;
  font-size: 13px;
}
.pad-modal-card h2 {
  font-size: clamp(18px, 3.5vw, 22px);
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px;
}
.pad-modal-card p {
  font-size: 13px;
  color: #8fa5c2;
  margin: 0 0 18px;
  line-height: 1.45;
}
.pm-btn {
  padding: 12px 20px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  width: 100%;
  transition: all .15s ease;
}
.pm-btn--danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.pm-btn--danger:active {
  transform: scale(0.97);
}
.pm-btn--cancel {
  background: #172438;
  color: #b4c6e0;
  border: 1px solid #2d3e58;
}
.pm-btn--cancel:active {
  background: #1f304a;
}
.pm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Selector de personaje en mando (Join y Prep) ─────────────────────────── */
.pad-char-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.pad-char-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  background: #0f1826;
  border: 1.5px solid #2d3e58;
  border-radius: 12px;
  color: #c0d0e4;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.pad-char-btn .pad-char-avatar,
.prep-char-btn .pad-char-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  background: #141f32;
  border: 1px solid #304462;
  flex-shrink: 0;
  transition: transform .15s ease, border-color .15s ease;
}
.pad-char-btn.selected .pad-char-avatar,
.prep-char-btn.selected .pad-char-avatar {
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(157, 253, 72, 0.4);
}
.pad-char-btn .pcb-icon {
  font-size: 20px;
}
.pad-char-btn.selected {
  background: #1a2c47;
  border-color: var(--green);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(157, 253, 72, 0.25);
}
.join-char-hint {
  font-size: 11px;
  color: #7088a8;
  margin: 4px 0 12px;
  line-height: 1.4;
}

/* Prep row para J1 */
.prep-char-row {
  margin-bottom: 12px;
}
.prep-char-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.prep-char-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: #0e1724;
  border: 1.5px solid #263850;
  border-radius: 10px;
  color: #b0c4de;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.prep-char-btn.selected {
  background: #172c47;
  border-color: var(--green);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(157, 253, 72, 0.2);
}

/* Wait assigned box para J2 */
.wait-assigned-box {
  background: #0c1626;
  border: 1px solid #253954;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  text-align: center;
}
.wab-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #ff9d5c;
  margin-bottom: 4px;
}
.wait-assigned-box strong {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}


