/* ════════════════════════════════════════════════════════════════════
   ORBITAL SIEGE — Menú moderno (sci-fi / glass / neón)
   Independiente de main.css (que sigue usando el lobby/juego).
   ════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-display: 'Orbitron', 'Segoe UI', sans-serif;
  --font-ui:      'Rajdhani', 'Segoe UI', sans-serif;

  /* Acento de la interfaz: BLANCO por defecto. Cada robot usa su propio color (--robot). */
  --accent:     #ffffff;
  --accent-rgb: 255, 255, 255;

  --ink:    #eaf2ff;
  --ink-dim:#8b96c0;
  --glass:  rgba(20, 24, 48, 0.55);
  --glass-2:rgba(12, 14, 30, 0.72);
  --line:   rgba(140, 170, 255, 0.14);
}

html, body { width: 100%; height: 100%; overflow: hidden; }

body {
  background: #04030c;
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

#bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

#app {
  position: relative;
  z-index: 1;
  height: 100vh;       /* fallback navegadores viejos */
  height: 100svh;      /* alto visible CON las barras del navegador → nunca se corta */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* respeta notch / barra de navegación / home indicator (safe areas) */
  padding:
    max(clamp(8px, 2.2vh, 18px), env(safe-area-inset-top))
    max(clamp(12px, 4vw, 48px), env(safe-area-inset-right))
    max(clamp(8px, 2.2vh, 18px), env(safe-area-inset-bottom))
    max(clamp(12px, 4vw, 48px), env(safe-area-inset-left));
  gap: clamp(4px, 1.2vh, 12px);
}

/* ── Header ─────────────────────────────────────── */
.top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(6px, 1.4vh, 14px);
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(15px, 3vw, 32px);
  letter-spacing: clamp(2px, 0.5vw, 4px);
  background: linear-gradient(180deg, #ffffff 0%, var(--accent) 120%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(var(--accent-rgb), 0.55));
}
.tagline {
  font-size: clamp(10px, 1.4vw, 15px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-dim);
}
@media (max-height: 430px) { .tagline { display: none; } }

/* ── Stepper (escalera vertical, alineado a la izquierda) ── */
.stepper { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(4px, 1vh, 8px); }
.stepper .step-pill:nth-child(2) { margin-left: 20px; }
.stepper .step-pill:nth-child(3) { margin-left: 40px; }
.step-pill {
  display: flex; align-items: center; gap: 7px;
  padding: clamp(4px, 1vh, 7px) clamp(10px, 1.4vw, 14px);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  font-family: var(--font-display);
  font-size: clamp(9px, 1.1vw, 11px); font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--ink-dim);
  transition: .3s;
  white-space: nowrap;
}
.step-pill .num {
  display: grid; place-items: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  font-size: 9px;
}
.step-pill.active {
  color: #04030c;
  border-color: transparent;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.6);
}
.step-pill.active .num { background: rgba(0,0,0,0.25); color: #fff; }
.step-pill.done { color: var(--accent); border-color: rgba(var(--accent-rgb),0.4); }
.step-sep { display: none; }

/* ── Stage / carrusel ───────────────────────────── */
.screen { display: none; flex: 1; min-height: 0; }
.screen.active { display: flex; }

/* HUD lateral: panel escalonado a la IZQUIERDA, hero a la derecha */
.select-screen { flex-direction: row; align-items: center; justify-content: center; gap: clamp(16px, 4vw, 56px); }
.stage-col {
  flex: 1 1 auto; min-width: 0; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.hud {
  flex: 0 0 auto;
  width: clamp(186px, 24vw, 300px);
  max-height: 100%;
  display: flex; flex-direction: column; gap: clamp(6px, 1.4vh, 12px);
  padding: clamp(10px, 2vh, 18px) clamp(12px, 1.4vw, 20px);
  border: 1px solid var(--line);
  border-right: 2px solid rgba(var(--accent-rgb), 0.6);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(0,0,0,0.4), 0 0 26px rgba(var(--accent-rgb), 0.12);
}
/* cascada escalonada de los elementos del HUD */
.hud > *:nth-child(2) { margin-left: 12px; }
.hud > *:nth-child(3) { margin-left: 24px; }
.hud > *:nth-child(4) { margin-left: 36px; }
.hud-head { display: flex; flex-direction: column; gap: 1px; }
.hud .cf-name { text-align: left; }
.hud .cf-role { text-align: left; }

/* Barra de información (clase · pasiva · habilidad / blindaje · perfil) */
.info-bar { display: flex; flex-direction: column; gap: clamp(4px, 0.9vh, 6px); width: 100%; }
.info-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: clamp(4px, 0.9vh, 7px) 12px;
  border-radius: 9px;
  background: rgba(255,255,255,0.045);
  border-left: 2px solid rgba(var(--accent-rgb), 0.55);
}
.info-row .ik {
  font-family: var(--font-display);
  font-size: clamp(8px, 1vh, 9px); letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-dim);
}
.info-row .iv {
  font-size: clamp(12px, 1.8vh, 16px); font-weight: 700; letter-spacing: .5px; color: #fff;
  font-family: var(--font-display);
}
.info-row .iv.accent { color: var(--accent); text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6); }

/* Variante horizontal: barra de info ENCIMA del carrusel (chips centradas) */
.stage-col .info-bar {
  flex-direction: row; flex-wrap: wrap; justify-content: center; align-self: center;
  width: auto; max-width: 100%; gap: 8px;
}
.stage-col .info-row {
  flex-direction: column; align-items: center; justify-content: center; gap: 0;
  text-align: center; min-width: clamp(72px, 9vw, 110px);
  padding: clamp(4px, 0.9vh, 7px) 14px;
  border-left: none;
  border-bottom: 2px solid rgba(var(--accent-rgb), 0.55);
  border-radius: 10px;
}
.stage-col .info-row .ik { margin-bottom: 1px; }
.hud .field { align-self: flex-start; flex-wrap: wrap; border-radius: 12px; padding: 6px 12px; gap: 8px; }
.hud .field label { font-size: 9px; }
.hud .field input { width: clamp(96px, 11vw, 140px); font-size: 15px; }
.hud .colors { flex-wrap: wrap; max-width: 158px; gap: 6px; }
.hud .sw { width: 18px; height: 18px; }
.hud .btn { align-self: flex-start; }
.hud .nav-row { flex-direction: column; align-items: flex-start; gap: 8px; }
.hud .stat-card { align-self: flex-start; padding: 8px 16px; }

.stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}

/* Flechas laterales */
.arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(44px, 6vw, 64px);
  height: clamp(44px, 6vw, 64px);
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  background: var(--glass-2);
  backdrop-filter: blur(8px);
  color: var(--accent);
  cursor: pointer;
  z-index: 6;
  transition: .18s;
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb),0.5);
}
.arrow-btn svg { width: 46%; height: 46%; }
.arrow-btn:hover {
  background: var(--accent);
  color: #04030c;
  box-shadow: 0 0 28px rgba(var(--accent-rgb), 0.7);
  transform: translateY(-50%) scale(1.08);
}
.arrow-btn:active { transform: translateY(-50%) scale(0.96); }
.arrow-l { left: clamp(0px, 3vw, 40px); }
.arrow-r { right: clamp(0px, 3vw, 40px); }

/* Coverflow */
.carousel {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  --cw: clamp(140px, 32vh, 240px);
  --ch: clamp(180px, 46vh, 330px);
}
.cf-item {
  position: absolute;
  top: 50%; left: 50%;
  width: var(--cw);
  height: var(--ch);
  margin-left: calc(var(--cw) / -2);
  margin-top: calc(var(--ch) / -2);
  display: flex; flex-direction: column; align-items: center;
  transition: transform .45s cubic-bezier(.22,.61,.36,1), opacity .45s, filter .45s;
  cursor: pointer;
  will-change: transform, opacity;
}
.cf-item.center { cursor: default; }

/* ── Proyección holográfica ───────────────────────────────
   .platform contiene:  .beam (cono de luz) · .proj (figura) · .emitter (disco)
   La figura "flota" justo encima del disco emisor en la base.            */
.platform { position: relative; flex: 1; min-height: 0; width: 100%; }

/* Disco emisor en la base (debajo de los pies) */
.emitter {
  position: absolute;
  left: 50%; bottom: 1%; transform: translateX(-50%);
  width: 64%; height: 13%;
  z-index: 4; pointer-events: none;
}
.emitter::before {            /* halo del disco */
  content: ''; position: absolute; inset: -60% -22%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(var(--accent-rgb), 0.6), rgba(var(--accent-rgb), 0.10) 55%, transparent 72%);
}
.emitter::after {             /* placa con anillo */
  content: ''; position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%,
    rgba(255,255,255,0.9) 0 14%, rgba(var(--accent-rgb),0.55) 16% 34%, rgba(var(--accent-rgb),0.12) 38% 100%);
  border: 2px solid rgba(var(--accent-rgb), 0.9);
  box-shadow: 0 0 26px rgba(var(--accent-rgb), 0.75), inset 0 0 16px rgba(var(--accent-rgb), 0.55);
  animation: ringPulse 2.6s ease-in-out infinite;
}
@keyframes ringPulse {
  0%,100% { box-shadow: 0 0 26px rgba(var(--accent-rgb),0.75), inset 0 0 16px rgba(var(--accent-rgb),0.55); }
  50%     { box-shadow: 0 0 42px rgba(var(--accent-rgb),0.95), inset 0 0 22px rgba(var(--accent-rgb),0.7); }
}

/* Cono de luz que sube desde el disco (más ancho arriba) */
.beam {
  position: absolute;
  left: 50%; bottom: 7%; transform: translateX(-50%);
  width: 82%; height: 92%;
  z-index: 1; pointer-events: none;
  background: linear-gradient(to top,
    rgba(var(--accent-rgb), 0.34), rgba(var(--accent-rgb), 0.08) 55%, transparent 90%);
  clip-path: polygon(6% 0, 94% 0, 60% 100%, 40% 100%);
  filter: blur(2px);
  animation: beamFlick 5s ease-in-out infinite;
}
/* Rayos / partículas de luz que ascienden desde la plataforma */
.beam::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(to right,
    transparent 0 15px, rgba(var(--accent-rgb), 0.9) 15px 17px, transparent 17px 19px);
  -webkit-mask:
    repeating-linear-gradient(to top, #000 0 5px, transparent 5px 22px),
    linear-gradient(to top, #000 0%, transparent 82%);
  -webkit-mask-composite: source-in;
  mask:
    repeating-linear-gradient(to top, #000 0 5px, transparent 5px 22px),
    linear-gradient(to top, #000 0%, transparent 82%);
  mask-composite: intersect;
  animation: rayRise 1s linear infinite;
}
@keyframes beamFlick { 0%,100% { opacity: .95; } 50% { opacity: .6; } }
@keyframes rayRise {
  from { -webkit-mask-position: 0 0, 0 0; mask-position: 0 0, 0 0; }
  to   { -webkit-mask-position: 0 -22px, 0 0; mask-position: 0 -22px, 0 0; }
}

/* La figura proyectada (robot o nave) */
.proj {
  position: absolute;
  left: 0; right: 0; bottom: 6%;
  height: 93%;
  z-index: 3;
  animation: floaty 4s ease-in-out infinite;
}
.proj .hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; object-position: bottom center;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* Líneas de escaneo (confinadas a la silueta vía máscara) */
.scan {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  -webkit-mask: var(--hero) no-repeat bottom center / contain;
          mask: var(--hero) no-repeat bottom center / contain;
  background:
    repeating-linear-gradient(0deg,
      rgba(255,255,255,0.16) 0 1px, transparent 1px 4px),
    linear-gradient(to bottom, transparent, rgba(255,255,255,0.55), transparent);
  background-size: 100% 4px, 100% 28%;
  background-repeat: repeat, no-repeat;
  background-position: 0 0, 0 -40%;
  mix-blend-mode: screen;
  opacity: .75;
  animation: scanLines 2.5s linear infinite, scanSweep 4s linear infinite;
}
@keyframes scanLines { from { background-position: 0 0, 0 var(--sweep,-40%); } to { background-position: 0 4px, 0 var(--sweep,-40%); } }
@keyframes scanSweep {
  0%   { --sweep: -40%; }
  100% { --sweep: 140%; }
}
@property --sweep { syntax: '<percentage>'; inherits: false; initial-value: -40%; }

/* Tinte holográfico del ROBOT (gris -> color del jugador).
   Flota sobre el disco (más pequeño), igual que las naves. */
.proj.robot {
  bottom: 16%; height: 66%;
  filter: drop-shadow(0 0 12px rgba(var(--robot-rgb, var(--accent-rgb)), 0.7))
          drop-shadow(0 0 30px rgba(var(--robot-rgb, var(--accent-rgb)), 0.4));
  animation: floaty 4s ease-in-out infinite, holoFlicker 7s steps(1) infinite;
}
.proj.robot .hero-img { filter: brightness(1.12) contrast(1.05); opacity: .9; }
.proj.robot .tint {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: var(--robot, var(--accent));
  -webkit-mask: var(--hero) no-repeat bottom center / contain;
          mask: var(--hero) no-repeat bottom center / contain;
  mix-blend-mode: color;
  opacity: .85;
}
@keyframes holoFlicker {
  0%, 96%, 100% { opacity: .95; }
  97%           { opacity: .68; }
  98%           { opacity: .9; }
  99%           { opacity: .72; }
}

/* La NAVE conserva su color, pero también se proyecta con haz + escaneo.
   Es apaisada, así que flota centrada sobre el disco (vista showroom). */
.proj.ship {
  bottom: 15%; height: 72%;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.4)) drop-shadow(0 8px 18px rgba(0,0,0,.5));
}
.proj.ship .hero-img { object-position: center; }
.proj.ship .scan {
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain;   mask-size: contain;
}
.cf-item:not(.center) .scan { opacity: .35; }

/* Estados del coverflow (set por JS con data-pos) */
.cf-item[data-pos="0"]  { transform: translateZ(0) scale(1);        opacity: 1;   z-index: 5; }
.cf-item[data-pos="-1"] { transform: translateX(-118%) translateZ(-220px) rotateY(34deg) scale(.82);  opacity: .5; z-index: 3; filter: brightness(.6) saturate(.7); }
.cf-item[data-pos="1"]  { transform: translateX(118%)  translateZ(-220px) rotateY(-34deg) scale(.82); opacity: .5; z-index: 3; filter: brightness(.6) saturate(.7); }
.cf-item[data-pos="-2"] { transform: translateX(-205%) translateZ(-440px) rotateY(44deg) scale(.62);  opacity: .18; z-index: 1; filter: brightness(.4); }
.cf-item[data-pos="2"]  { transform: translateX(205%)  translateZ(-440px) rotateY(-44deg) scale(.62); opacity: .18; z-index: 1; filter: brightness(.4); }
.cf-item[data-pos="hidden"] { opacity: 0; transform: translateZ(-600px) scale(.4); pointer-events: none; }

/* Nombre / rol del personaje (mostrado en el HUD) */
.cf-name {
  font-family: var(--font-display);
  font-size: clamp(14px, 2.6vh, 22px);
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: #fff; line-height: 1.1;
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.7);
}
.cf-role {
  font-size: clamp(11px, 1.8vh, 15px);
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent);
}

/* Indicador de puntos */
.dots { display: flex; gap: 9px; justify-content: center; }
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  cursor: pointer; transition: .25s;
}
.dot.on { background: var(--accent); box-shadow: 0 0 12px var(--accent); transform: scale(1.25); }

/* Ficha de stats de la nave */
.stat-card {
  display: flex; gap: 18px; align-items: center;
  padding: 10px 22px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--glass);
  backdrop-filter: blur(8px);
}
.stat { text-align: center; }
.stat .v { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: #fff; }
.stat .k { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-dim); }

/* ── Panel inferior de controles ────────────────── */
.dock {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
}
.field {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 4px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass);
  backdrop-filter: blur(8px);
}
.field label {
  font-family: var(--font-display); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-dim);
}
.field input {
  background: transparent; border: none; outline: none;
  color: var(--ink); font-family: var(--font-ui); font-size: 18px;
  letter-spacing: 1px; width: 150px;
}
.field input::placeholder { color: rgba(139,150,192,0.6); }

/* Selector de color */
.colors { display: flex; gap: 7px; align-items: center; }
.sw {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--c); cursor: pointer;
  border: 2px solid rgba(255,255,255,0.18);
  transition: .15s;
}
.sw:hover { transform: scale(1.15); }
.sw.on {
  border-color: #fff;
  box-shadow: 0 0 14px var(--c), 0 0 0 2px var(--c);
  transform: scale(1.2);
}

/* ── Botones ────────────────────────────────────── */
.btn {
  font-family: var(--font-display);
  font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  border: none; cursor: pointer; border-radius: 12px;
  padding: clamp(9px, 1.6vh, 14px) clamp(18px, 2.2vw, 30px);
  font-size: clamp(11px, 1.5vh, 14px);
  transition: .18s; display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.btn-primary {
  color: #04030c;
  background: linear-gradient(135deg, #ffffff, var(--accent));
  box-shadow: 0 8px 26px rgba(var(--accent-rgb), 0.45);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.6); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  color: var(--ink); background: var(--glass);
  border: 1px solid var(--line); backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: rgba(var(--accent-rgb),0.6); color: var(--accent); }
.btn-lg { padding: 18px 44px; font-size: 17px; border-radius: 14px; }

.nav-row { display: flex; gap: 12px; align-items: center; justify-content: center; }

/* ── Pantalla LISTO (loadout guardado) ──────────── */
.ready-screen { flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 2.4vh, 24px); }
.ready-heroes { display: flex; align-items: center; gap: clamp(8px, 4vw, 60px); }
.ready-slot { position: relative; width: clamp(110px, 30vh, 220px); height: clamp(150px, 42vh, 300px); display: flex; }
.ready-slot .platform { flex: 1; }
.ready-info { text-align: center; display: flex; flex-direction: column; gap: clamp(3px, 0.8vh, 8px); }
.ready-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(20px, 4.4vh, 40px); letter-spacing: 3px;
  background: linear-gradient(180deg,#fff, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ready-load { font-size: clamp(12px, 1.9vh, 18px); letter-spacing: 2px; color: var(--ink-dim); text-transform: uppercase; }
.ready-load b { color: var(--accent); font-weight: 700; }

/* ── Join row ───────────────────────────────────── */
.join {
  display: flex; gap: 10px; align-items: center;
  padding: 6px 6px 6px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(8px);
}
.join input {
  background: transparent; border: none; outline: none; color: var(--ink);
  font-family: var(--font-display); font-size: 16px; letter-spacing: 4px; width: 110px;
  text-transform: uppercase;
}
.join input::placeholder { letter-spacing: 2px; color: rgba(139,150,192,0.6); }

.sep-or {
  display: flex; align-items: center; gap: 14px; color: var(--ink-dim);
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
}
.sep-or::before, .sep-or::after { content:''; height:1px; width:48px; background: var(--line); }

.error {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  padding: 12px 22px; border-radius: 10px;
  background: rgba(255,60,80,0.16); border: 1px solid rgba(255,80,100,0.5);
  color: #ffb0bc; font-size: 15px; letter-spacing: 1px; z-index: 50;
  backdrop-filter: blur(6px);
}
.hidden { display: none !important; }

/* ── Overlay: salas disponibles ── */
.rooms-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 3, 12, 0.72); backdrop-filter: blur(6px);
  padding: 16px;
}
.rooms-panel {
  width: 100%; max-width: 460px; max-height: 86vh; max-height: 86svh;
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px;
  border: 1px solid var(--line); border-top: 2px solid rgba(var(--accent-rgb), 0.7);
  border-radius: 16px;
  background: var(--glass-2); backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(var(--accent-rgb), 0.15);
}
.rooms-head { display: flex; align-items: center; justify-content: space-between; }
.rooms-title {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: var(--glass); color: var(--accent);
  font-size: 18px; line-height: 1; transition: .18s;
}
.icon-btn:hover { background: var(--accent); color: #04030c; }
.rooms-search { display: flex; gap: 8px; }
.rooms-search input {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); font-family: var(--font-display); font-size: 16px;
  letter-spacing: 3px; text-transform: uppercase; padding: 10px 14px; outline: none;
}
.rooms-search input::placeholder { letter-spacing: 1px; color: rgba(139,150,192,0.7); font-size: 13px; }
.rooms-search input:focus { border-color: var(--accent); }
.rooms-search .btn { padding: 10px 18px; }
.rooms-list { flex: 1; min-height: 60px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.rooms-empty {
  text-align: center; color: var(--ink-dim); font-size: 16px;
  letter-spacing: .5px; padding: 26px 10px; line-height: 1.5;
}
.room-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line); border-left: 3px solid rgba(var(--accent-rgb), 0.6);
  transition: .15s;
}
.room-row:hover { background: rgba(var(--accent-rgb), 0.12); border-left-color: var(--accent); transform: translateX(2px); }
.room-code {
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  letter-spacing: 3px; color: var(--accent); min-width: 92px;
}
.room-meta { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.room-host { font-size: 16px; color: var(--ink); font-weight: 600; }
.room-sub  { font-size: 13px; color: var(--ink-dim); letter-spacing: .5px; }
.room-go {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 1px; color: var(--accent); white-space: nowrap;
}

/* ── Rotar dispositivo ──────────────────────────── */
#rotate-prompt {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: #04030c; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 40px; gap: 18px;
}
.rotate-icon { font-size: 64px; animation: rotate-hint 2s infinite ease-in-out; }
.rotate-title { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; color: var(--accent); }
.rotate-sub { color: var(--ink-dim); letter-spacing: 1px; }
@keyframes rotate-hint { 0%,100%{transform:rotate(0)} 50%{transform:rotate(-90deg)} }

@media (orientation: portrait) and (max-width: 1024px) {
  #rotate-prompt { display: flex; }
  #app, #bg-canvas { display: none !important; }
}

/* Pantallas muy bajas (móvil landscape pequeño): compactar carrusel */
@media (max-height: 430px) {
  .carousel { --cw: clamp(120px, 38vh, 180px); --ch: clamp(150px, 52vh, 230px); }
}

/* ── Barra de login (Hubmy) ── */
.auth-bar {
  position: fixed;
  top: 10px; right: 12px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hubmy-login {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: rgba(20, 24, 48, 0.7);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: .3px;
  backdrop-filter: blur(8px);
  transition: border-color .15s, background .15s;
}
.hubmy-login:hover { border-color: #40d0ff; background: rgba(30, 40, 70, 0.85); }
.auth-user {
  font-family: var(--font-ui); font-weight: 700; color: var(--ink);
  background: rgba(20, 24, 48, 0.6); border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 10px; backdrop-filter: blur(8px);
}
.auth-logout {
  font-family: var(--font-ui); font-weight: 700; cursor: pointer;
  color: var(--ink-dim); background: transparent;
  border: 1px solid var(--line); padding: 7px 12px; border-radius: 10px;
}
.auth-logout:hover { color: #ff8080; border-color: #ff6060; }

/* ── Puerta de login a pantalla completa (login obligatorio) ── */
body.gated #app { display: none !important; }
body.gated .auth-bar { display: none; }
.login-gate {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20,24,52,0.6), rgba(4,3,12,0.92));
  backdrop-filter: blur(4px);
}
.login-gate.hidden { display: none; }
.login-card {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 38px 34px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  text-align: center;
}
.login-logo {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(26px, 5vw, 40px); letter-spacing: 3px;
  color: #fff; text-shadow: 0 0 24px rgba(64,208,255,0.5);
}
.login-sub { color: var(--ink-dim); font-size: clamp(14px, 2vh, 17px); }
.hubmy-login.lg { padding: 13px 22px; font-size: 16px; border-radius: 12px; }
.login-err { color: #ff8080; font-size: 13px; min-height: 16px; }
