/* ================================================================
   JUEGOS PARA TOMAR — Estilos completos
   Estetica party game / arcade moderno
   ================================================================ */

:root {
  color-scheme: dark;
  --tomar-bg: #180d2a;
  --tomar-bg2: #0f0820;
  --tomar-panel: rgba(255, 255, 255, 0.08);
  --tomar-panel-solid: rgba(30, 14, 55, 0.95);
  --tomar-card: rgba(255, 255, 255, 0.1);
  --tomar-text: #fff8fb;
  --tomar-muted: #c8b8d8;
  --tomar-line: rgba(255, 255, 255, 0.15);
  --tomar-pink: #ff4fa3;
  --tomar-pink2: #ff85c8;
  --tomar-orange: #ffb347;
  --tomar-lime: #b9f47a;
  --tomar-cyan: #6ee7f3;
  --tomar-purple: #8b5cf6;
  --tomar-danger: #fb7185;
  --tomar-gold: #fbbf24;
  --tomar-radius: 14px;
  --tomar-tap: 52px;
  --tomar-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  --tomar-glow-pink: 0 0 32px rgba(255, 79, 163, 0.4);
  --tomar-glow-cyan: 0 0 32px rgba(110, 231, 243, 0.35);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; overflow-x: hidden; }

body {
  margin: 0;
  color: var(--tomar-text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at 8% 0%,  rgba(255, 79, 163, 0.4) 0%, transparent 40%),
    radial-gradient(ellipse at 92% 8%, rgba(110, 231, 243, 0.3) 0%, transparent 40%),
    radial-gradient(ellipse at 45% 100%, rgba(139, 92, 246, 0.35) 0%, transparent 50%),
    linear-gradient(160deg, #1e0d38 0%, #0f0820 60%, #180d2a 100%);
}

body.tomar-modal-open { overflow: hidden; }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

/* ================================================================
   LAYOUT BASE
   ================================================================ */

.tomar-app {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 1rem;
}

.tomar-back-to-games {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.6rem;
  margin-bottom: 1rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--tomar-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--tomar-muted);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 180ms, background 180ms, border-color 180ms;
}

.tomar-back-to-games:hover {
  color: var(--tomar-text);
  background: rgba(255, 79, 163, 0.14);
  border-color: var(--tomar-pink);
}

/* ================================================================
   EYEBROW / LABELS
   ================================================================ */

.tomar-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--tomar-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ================================================================
   HERO
   ================================================================ */

.tomar-hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  min-height: 52vh;
  padding: clamp(1.5rem, 6vw, 3rem);
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 79, 163, 0.28), transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(110, 231, 243, 0.2), transparent 40%),
    rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  box-shadow: var(--tomar-shadow);
}

@media (min-width: 720px) {
  .tomar-hero { grid-template-columns: 1fr 1fr; min-height: 56vh; }
}

.tomar-hero-content {}

.tomar-hero-content h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(3rem, 13vw, 6rem);
  font-weight: 900;
  line-height: 0.92;
  background: linear-gradient(135deg, #fff8fb 0%, var(--tomar-pink2) 50%, var(--tomar-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tomar-hero-content > p {
  max-width: 36rem;
  color: var(--tomar-muted);
  line-height: 1.65;
  margin: 0;
}

/* ================================================================
   ROOM CREATION CARD (in hero)
   ================================================================ */

.tomar-room-card {
  display: grid;
  gap: 0.8rem;
  padding: 1.5rem;
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
}

.tomar-room-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: var(--tomar-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.tomar-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--tomar-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.tomar-divider::before, .tomar-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--tomar-line);
}

.tomar-join-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

/* ================================================================
   AVISO
   ================================================================ */

.tomar-warning {
  max-width: 100%;
  margin: 0.8rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 179, 71, 0.3);
  border-radius: var(--tomar-radius);
  background: rgba(255, 179, 71, 0.1);
  color: rgba(255, 230, 160, 0.9);
  font-size: 0.88rem;
  font-weight: 700;
}

/* ================================================================
   PANEL
   ================================================================ */

.tomar-panel {
  margin-top: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  box-shadow: var(--tomar-shadow);
}

/* ================================================================
   SECTION TITLE
   ================================================================ */

.tomar-section-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.tomar-section-title h2 { margin: 0; }

/* ================================================================
   GAME CARDS GRID
   ================================================================ */

.tomar-grid {
  display: grid;
  gap: 0.85rem;
}

.tomar-card {
  display: grid;
  gap: 0.6rem;
  min-height: 13rem;
  padding: 1.2rem;
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 79, 163, 0.16), transparent 55%),
    rgba(255, 255, 255, 0.08);
  color: var(--tomar-text);
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  cursor: pointer;
}

.tomar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(255, 79, 163, 0.22);
  border-color: rgba(255, 79, 163, 0.4);
}

.tomar-card:active { transform: translateY(-1px); }

.tomar-card > span {
  width: max-content;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  background: rgba(110, 231, 243, 0.12);
  border: 1px solid rgba(110, 231, 243, 0.2);
  color: var(--tomar-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tomar-card h3 {
  margin: 0;
  font-size: clamp(1.25rem, 5vw, 1.7rem);
  line-height: 1.1;
}

.tomar-card p {
  margin: 0;
  color: var(--tomar-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tomar-card strong {
  align-self: end;
  width: max-content;
  padding: 0.6rem 0.9rem;
  border-radius: var(--tomar-radius);
  background: linear-gradient(135deg, var(--tomar-orange), var(--tomar-pink));
  color: #26112c;
  font-size: 0.9rem;
  transition: filter 160ms;
}

.tomar-card:hover strong { filter: brightness(1.12); }

.tomar-random-mode {
  background:
    radial-gradient(circle at 90% 0%, rgba(185, 244, 122, 0.22), transparent 50%),
    radial-gradient(circle at 10% 100%, rgba(139, 92, 246, 0.2), transparent 50%),
    linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(255, 79, 163, 0.12));
  border-color: rgba(185, 244, 122, 0.25);
}

.tomar-random-mode:hover {
  border-color: rgba(185, 244, 122, 0.5);
  box-shadow: 0 16px 48px rgba(185, 244, 122, 0.18);
}

/* ================================================================
   BOTONES
   ================================================================ */

.tomar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tomar-tap);
  padding: 0.82rem 1.2rem;
  border: 0;
  border-radius: var(--tomar-radius);
  color: #26112c;
  font-weight: 900;
  font-size: 0.97rem;
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
  text-decoration: none;
}

.tomar-button:hover  { transform: translateY(-2px); filter: brightness(1.08); }
.tomar-button:active { transform: translateY(0);    filter: brightness(0.95); }

.tomar-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.5;
  transform: none;
}

.tomar-primary {
  background: linear-gradient(135deg, var(--tomar-pink), var(--tomar-orange));
  box-shadow: 0 4px 20px rgba(255, 79, 163, 0.4);
}

.tomar-primary:hover { box-shadow: 0 8px 30px rgba(255, 79, 163, 0.55); }

.tomar-secondary {
  background: linear-gradient(135deg, var(--tomar-cyan), var(--tomar-lime));
  box-shadow: 0 4px 16px rgba(110, 231, 243, 0.3);
}

.tomar-ghost {
  border: 1px solid var(--tomar-line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--tomar-text);
}

.tomar-ghost:hover {
  background: rgba(255, 79, 163, 0.12);
  border-color: var(--tomar-pink);
}

.tomar-danger-btn {
  border: 1px solid rgba(251, 113, 133, 0.3);
  background: rgba(251, 113, 133, 0.1);
  color: var(--tomar-danger);
}

/* ================================================================
   FORMS
   ================================================================ */

label {
  display: grid;
  gap: 0.35rem;
  color: var(--tomar-muted);
  font-weight: 800;
  font-size: 0.88rem;
}

input, select, textarea {
  width: 100%;
  min-height: var(--tomar-tap);
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--tomar-text);
  outline: none;
  padding: 0.78rem 0.9rem;
  transition: border-color 150ms, box-shadow 150ms;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--tomar-pink);
  box-shadow: 0 0 0 3px rgba(255, 79, 163, 0.18);
}

select option { background: #1e0d38; color: var(--tomar-text); }

textarea { min-height: 7rem; resize: vertical; }

.tomar-code-field { min-width: min(100%, 16rem); }

/* ================================================================
   ACTIONS / GROUPS
   ================================================================ */

.tomar-actions,
.tomar-player-box,
.tomar-room-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

/* ================================================================
   OVERLAY MODAL (modo local)
   ================================================================ */

.tomar-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: start center;
  padding: 1rem;
  padding-top: max(1rem, env(safe-area-inset-top));
  background: rgba(10, 4, 22, 0.75);
  backdrop-filter: blur(16px);
  overflow-y: auto;
  animation: tomar-fade-in 180ms ease both;
}

.tomar-modal {
  width: min(1000px, 100%);
  min-height: min-content;
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background:
    radial-gradient(circle at 95% 0%, rgba(255, 79, 163, 0.22), transparent 40%),
    radial-gradient(circle at 5% 100%, rgba(110, 231, 243, 0.15), transparent 40%),
    linear-gradient(160deg, rgba(45, 20, 75, 0.98), rgba(20, 10, 40, 0.98));
  box-shadow: var(--tomar-shadow);
  padding: 1.2rem;
  margin: auto;
}

/* ================================================================
   GAME STAGE (pantalla de juego — modal local y sala)
   ================================================================ */

.tomar-game-shell {
  display: grid;
  gap: 1rem;
}

/* Header del juego activo */
.tomar-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background: rgba(255, 255, 255, 0.06);
}

.tomar-stage-header-left { display: grid; gap: 0.1rem; }

.tomar-stage-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.tomar-stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.tomar-stage-badge {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 79, 163, 0.2);
  border: 1px solid rgba(255, 79, 163, 0.3);
  color: var(--tomar-pink2);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Carta de pregunta/reto — el centro de la experiencia */
.tomar-stage-card {
  display: grid;
  gap: 0.9rem;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid rgba(255, 79, 163, 0.25);
  border-radius: var(--tomar-radius);
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 179, 71, 0.2), transparent 55%),
    radial-gradient(circle at 8% 92%, rgba(255, 79, 163, 0.15), transparent 55%),
    rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 60px rgba(255, 79, 163, 0.12);
  text-align: center;
  animation: tomar-card-in 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.tomar-prompt-text {
  margin: 0;
  font-size: clamp(1.6rem, 6vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--tomar-text);
}

.tomar-prompt-sub {
  margin: 0;
  color: var(--tomar-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Grid de opciones de voto */
.tomar-choice-grid {
  display: grid;
  gap: 0.65rem;
}

.tomar-choice-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.tomar-choice-btn {
  min-height: var(--tomar-tap);
  padding: 0.9rem 1rem;
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--tomar-text);
  font-weight: 800;
  font-size: 1rem;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  text-align: center;
  cursor: pointer;
}

.tomar-choice-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 79, 163, 0.2);
  border-color: var(--tomar-pink);
  box-shadow: 0 4px 16px rgba(255, 79, 163, 0.25);
}

.tomar-choice-btn.selected {
  background: linear-gradient(135deg, rgba(185, 244, 122, 0.3), rgba(110, 231, 243, 0.3));
  border-color: var(--tomar-lime);
  color: var(--tomar-lime);
  transform: scale(0.98);
}

.tomar-choice-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Barra de progreso de respuestas */
.tomar-progress-bar {
  display: grid;
  gap: 0.5rem;
}

.tomar-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--tomar-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.tomar-progress-label strong { color: var(--tomar-cyan); }

.tomar-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.tomar-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tomar-cyan), var(--tomar-lime));
  transition: width 400ms ease;
}

/* Tira de jugadores (quienes respondieron) */
.tomar-player-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tomar-player-dot {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--tomar-line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--tomar-muted);
  transition: all 250ms ease;
}

.tomar-player-dot.answered {
  border-color: var(--tomar-lime);
  background: rgba(185, 244, 122, 0.14);
  color: var(--tomar-lime);
}

.tomar-player-dot.active-player {
  border-color: var(--tomar-gold);
  background: rgba(251, 191, 36, 0.18);
  color: var(--tomar-gold);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
  animation: tomarPulse 2s ease-in-out infinite;
}

/* Spotlight del jugador activo */
.tomar-spotlight-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.5rem;
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: var(--tomar-radius);
  background: rgba(251, 191, 36, 0.1);
  text-align: center;
  animation: tomarSpotlight 400ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.tomar-spotlight-label {
  color: var(--tomar-gold);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tomar-spotlight-name {
  font-size: clamp(1.5rem, 7vw, 2.4rem);
  font-weight: 900;
  color: var(--tomar-gold);
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

/* Panel de revelacion */
.tomar-reveal-panel {
  display: grid;
  gap: 0.7rem;
  padding: 1.2rem;
  border: 1px solid rgba(185, 244, 122, 0.3);
  border-radius: var(--tomar-radius);
  background: rgba(185, 244, 122, 0.08);
  animation: tomar-card-in 300ms ease both;
}

.tomar-reveal-panel h4 {
  margin: 0;
  color: var(--tomar-lime);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tomar-result-ranking { display: grid; gap: 0.5rem; }

/* ================================================================
   RANDOMIZER MACHINE (modo fiesta)
   ================================================================ */

.tomar-randomizer-machine {
  padding: 0.5rem;
  border: 1px solid rgba(110, 231, 243, 0.3);
  border-radius: var(--tomar-radius);
  background: rgba(110, 231, 243, 0.08);
  overflow: hidden;
}

.tomar-randomizer { /* backward compat */ margin-top: 0; border: none; background: none; }

.tomar-slot {
  display: grid;
  place-items: center;
  gap: 0.25rem;
  min-height: 6rem;
  padding: 1rem;
  animation: tomar-slot-flash 120ms ease both;
  text-align: center;
}

.tomar-slot span {
  color: var(--tomar-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tomar-slot strong {
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--tomar-cyan), var(--tomar-pink2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ================================================================
   VS / ESPECTRO
   ================================================================ */

.tomar-vs {
  color: var(--tomar-pink);
  font-size: 1.1rem;
  font-weight: 950;
  text-transform: uppercase;
}

.tomar-spectrum {
  display: grid;
  grid-template-columns: 1fr minmax(8rem, 2fr) 1fr;
  gap: 0.7rem;
  align-items: center;
  text-align: center;
}

.tomar-spectrum input { accent-color: var(--tomar-pink); }

/* ================================================================
   CHIPS DE JUGADORES (modo local)
   ================================================================ */

.tomar-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.6rem 0 0;
}

.tomar-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.4rem;
  border: 1px solid var(--tomar-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--tomar-text);
  padding: 0.4rem 0.75rem;
  font-weight: 800;
  font-size: 0.9rem;
  transition: background 150ms, border-color 150ms;
  cursor: pointer;
}

.tomar-chip:hover { background: rgba(251, 113, 133, 0.2); border-color: var(--tomar-danger); }

.tomar-chip span {
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
}

.tomar-counter {
  min-height: var(--tomar-tap);
  display: inline-flex;
  align-items: center;
  color: var(--tomar-cyan);
  font-weight: 900;
  font-size: 0.9rem;
}

/* ================================================================
   ROUND CARD (modo local — backward compat)
   ================================================================ */

.tomar-round-card {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: clamp(1.2rem, 4vw, 2rem);
  border: 1px solid rgba(255, 79, 163, 0.22);
  border-radius: var(--tomar-radius);
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 179, 71, 0.18), transparent 50%),
    rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 40px rgba(255, 79, 163, 0.1);
  animation: tomar-card-in 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.tomar-round-card h3 {
  margin: 0;
  font-size: clamp(1.4rem, 6vw, 2rem);
  line-height: 1.1;
}

.tomar-round-card p { margin: 0; color: var(--tomar-muted); line-height: 1.55; }

/* ================================================================
   LISTA DE JUGADORES EN SALA
   ================================================================ */

.tomar-player-list { display: grid; gap: 0.5rem; }

.tomar-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
}

.tomar-badge {
  width: max-content;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(185, 244, 122, 0.16);
  border: 1px solid rgba(185, 244, 122, 0.3);
  color: var(--tomar-lime);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tomar-badge.muted {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--tomar-line);
  color: var(--tomar-muted);
}

/* ================================================================
   VOTOS (backward compat + mejorado)
   ================================================================ */

.tomar-votes { display: grid; gap: 0.6rem; }

.tomar-votes .tomar-button {
  min-height: var(--tomar-tap);
  border: 1px solid var(--tomar-line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--tomar-text);
}

.tomar-votes .tomar-button.selected,
.tomar-button.selected {
  outline: 2px solid rgba(185, 244, 122, 0.5);
  background: linear-gradient(135deg, rgba(185, 244, 122, 0.25), rgba(110, 231, 243, 0.25));
  color: var(--tomar-lime);
}

.tomar-result-box { display: grid; gap: 0.5rem; }
.tomar-result-box h4 { margin: 0.4rem 0 0; color: var(--tomar-lime); }

/* ================================================================
   RANKING / REVELACION
   ================================================================ */

.tomar-rank {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background: rgba(255, 255, 255, 0.07);
  animation: tomar-card-in 200ms ease both;
}

.tomar-rank.winner {
  border-color: rgba(185, 244, 122, 0.5);
  background: rgba(185, 244, 122, 0.14);
  box-shadow: 0 0 18px rgba(185, 244, 122, 0.2);
}

/* ================================================================
   MISC
   ================================================================ */

.tomar-target {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--tomar-gold);
}

.tomar-target span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(251, 191, 36, 0.7);
}

.tomar-secret {
  padding: 0.85rem;
  border-radius: var(--tomar-radius);
  background: rgba(255, 79, 163, 0.12);
  border: 1px solid rgba(255, 79, 163, 0.25);
}

.tomar-bingo {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.tomar-bingo button {
  min-height: var(--tomar-tap);
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--tomar-text);
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 200ms ease;
  padding: 0.5rem;
  cursor: pointer;
}

.tomar-bingo button.marked {
  background: linear-gradient(135deg, var(--tomar-lime), var(--tomar-cyan));
  border-color: var(--tomar-lime);
  color: #26112c;
  transform: scale(0.96);
}

/* ================================================================
   TOAST
   ================================================================ */

.tomar-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 0.9rem 1.2rem;
  border-radius: var(--tomar-radius);
  background: rgba(20, 10, 40, 0.96);
  border: 1px solid var(--tomar-pink);
  color: var(--tomar-text);
  font-weight: 700;
  box-shadow: var(--tomar-shadow), var(--tomar-glow-pink);
  opacity: 0;
  transform: translateY(0.8rem);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.tomar-toast.visible { opacity: 1; transform: translateY(0); }

/* ================================================================
   SALA — LOBBY VS GAME STAGE
   ================================================================ */

/* El lobby es la vista por defecto */
.tomar-room-lobby {}

/* El game stage se oculta hasta que empieza el juego */
.tomar-game-stage {
  display: none;
  flex-direction: column;
  gap: 1rem;
  min-height: calc(100dvh - 5rem);
}

/* Cuando el body tiene la clase playing, intercambiamos vistas */
body.tomar-room-playing .tomar-room-lobby { display: none; }
body.tomar-room-playing .tomar-game-stage  { display: flex; }

/* Hero de la sala (en lobby) */
.tomar-room-hero {
  min-height: auto;
  padding: 1.5rem;
}

.tomar-room-hero h1 {
  margin: 0.2rem 0;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--tomar-cyan), var(--tomar-lime));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tomar-room-code-label {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(110, 231, 243, 0.14);
  border: 1px solid rgba(110, 231, 243, 0.3);
  color: var(--tomar-cyan);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

/* Controles del anfitrion */
.tomar-host-controls {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 79, 163, 0.22);
  border-radius: var(--tomar-radius);
  background: rgba(255, 79, 163, 0.07);
}

.tomar-host-controls h4 {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tomar-pink);
}

.tomar-waiting-msg {
  margin: 0.8rem 0 0;
  padding: 0.9rem;
  border-radius: var(--tomar-radius);
  border: 1px solid var(--tomar-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--tomar-muted);
  font-size: 0.92rem;
  text-align: center;
}

/* Game stage header */
.tomar-game-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--tomar-line);
  border-radius: var(--tomar-radius);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
}

.tomar-game-stage-title {
  margin: 0;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 900;
}

.tomar-game-stage-round {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 79, 163, 0.18);
  color: var(--tomar-pink2);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ================================================================
   ANIMACIONES
   ================================================================ */

@keyframes tomar-card-in {
  from { opacity: 0; transform: translateY(0.5rem) scale(0.97); }
}

@keyframes tomar-fade-in {
  from { opacity: 0; }
}

@keyframes tomar-slot-flash {
  from { opacity: 0.4; transform: translateY(0.4rem) scale(0.97); }
}

@keyframes tomarPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(251, 191, 36, 0.3); }
  50%       { box-shadow: 0 0 20px rgba(251, 191, 36, 0.6); }
}

@keyframes tomarSpotlight {
  from { opacity: 0; transform: scale(0.92); }
}

@keyframes tomarReveal {
  from { opacity: 0; transform: translateY(0.6rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* ================================================================
   UTILIDADES
   ================================================================ */

.hidden { display: none !important; }
.tomar-muted { color: var(--tomar-muted); font-size: 0.9rem; }

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (min-width: 700px) {
  .tomar-app { padding: 1.5rem; }
  .tomar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tomar-player-list,
  .tomar-votes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tomar-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tomar-choice-grid.single-col { grid-template-columns: 1fr; }
}

@media (min-width: 1040px) {
  .tomar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .tomar-app { padding: 0.75rem; }

  .tomar-hero { min-height: auto; padding: 1.2rem; }

  .tomar-hero-content h1 { font-size: clamp(2.6rem, 16vw, 4rem); }

  .tomar-actions .tomar-button,
  .tomar-code-field,
  .tomar-player-box .tomar-button { width: 100%; }

  .tomar-overlay { padding: 0; }

  .tomar-modal {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    padding: 0.9rem;
  }

  .tomar-join-group { grid-template-columns: 1fr; }

  .tomar-spectrum { grid-template-columns: 1fr; }

  .tomar-bingo { grid-template-columns: 1fr; }

  .tomar-choice-grid { grid-template-columns: 1fr; }

  .tomar-stage-card { padding: 1.2rem; }

  .tomar-prompt-text { font-size: clamp(1.4rem, 7vw, 2rem); }
}
