/* ============================================================
   GAMECENTER — lobby
   Club privado: obsidiana, esmeralda y latón.
   ============================================================ */

:root {
  --bg: #07090a;
  --bg-2: #0b0f0e;
  --panel: rgba(17, 22, 21, 0.72);
  --panel-solid: #111615;
  --emerald: #0f2a22;
  --gold: #d6b26a;
  --gold-hi: #f2dca6;
  --gold-lo: #9c7a3c;
  --ink: #f3eee4;
  --ink-dim: rgba(243, 238, 228, 0.66);
  --ink-faint: rgba(243, 238, 228, 0.42);
  --line: rgba(243, 238, 228, 0.08);
  --line-strong: rgba(243, 238, 228, 0.16);
  --line-gold: rgba(214, 178, 106, 0.38);
  --danger: #e8776b;

  --p1: #e2665b;
  --p2: #7fa6e6;
  --p3: #6cc995;
  --p4: #d6b26a;
  --p5: #b994f0;
  --p6: #5fd0c6;

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-ui: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.is-hidden { display: none !important; }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 200;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-1%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------------- tipografía compartida ---------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow-line {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-hi);
}

/* ---------------- barra superior ---------------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 18px var(--gutter);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(7, 9, 10, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}

.player-btn,
.settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px 0 6px;
  background: rgba(17, 22, 21, 0.5);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.player-btn { justify-self: start; max-width: 100%; }
.settings-btn { justify-self: end; padding: 0 16px 0 14px; }
.player-btn:hover,
.settings-btn:hover { border-color: var(--line-gold); background: rgba(214, 178, 106, 0.08); }

.icon-circle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-hi), var(--gold-lo));
  color: #1a1408;
  flex: 0 0 auto;
}
.player-meta { display: flex; flex-direction: column; line-height: 1.1; text-align: left; min-width: 0; }
.player-meta small {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
#playerLabel {
  font-weight: 700;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14ch;
}

.settings-btn svg { transition: transform 0.6s var(--ease); }
.settings-btn:hover svg { transform: rotate(90deg); }
.settings-label { font-size: 0.82rem; font-weight: 600; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-gold);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold-hi);
  background: radial-gradient(circle at 30% 25%, rgba(214, 178, 106, 0.25), transparent 70%);
}
.brand-mark-sm { width: 28px; height: 28px; font-size: 0.9rem; }
.brand-word {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand-word em { font-weight: 300; }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px var(--gutter) 56px;
  overflow: hidden;
  isolation: isolate;
}

.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: hero-in 2.4s var(--ease) both;
}
@keyframes hero-in {
  from { opacity: 0; transform: scale(1.12); }
  to { opacity: 1; transform: scale(1.04); }
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 10, 0.92) 0%, rgba(7, 9, 10, 0.55) 45%, rgba(7, 9, 10, 0.1) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(7, 9, 10, 0) 40%),
    linear-gradient(180deg, rgba(7, 9, 10, 0.7) 0%, rgba(7, 9, 10, 0) 22%);
}

.hero-inner { max-width: 760px; }

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 7.4rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-variation-settings: 'opsz' 144;
}
.hero-title em {
  background: linear-gradient(100deg, var(--gold-hi) 10%, var(--gold) 45%, var(--gold-hi) 60%, var(--gold-lo) 90%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 7s ease-in-out infinite;
}
@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-lead {
  max-width: 46ch;
  margin: 26px 0 0;
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  color: var(--ink-dim);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn svg { transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-gold {
  color: #1a1408;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 50%, var(--gold-lo));
  box-shadow: 0 10px 40px -10px rgba(214, 178, 106, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 18px 50px -12px rgba(214, 178, 106, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.btn-ghost {
  background: rgba(243, 238, 228, 0.04);
  border-color: var(--line-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: var(--line-gold); background: rgba(214, 178, 106, 0.08); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 64px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
  max-width: 640px;
}
.hero-stats div { flex: 1 1 0; min-width: 120px; padding-right: 24px; }
.hero-stats div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.hero-stats dt {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hero-stats dd {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 400;
}
.hero-stats dd span { color: var(--gold); }

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 56px;
  width: 26px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 9px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--gold);
  animation: cue 2s var(--ease) infinite;
}
@keyframes cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(16px); }
}

/* ---------------- secciones ---------------- */

.lobby { position: relative; padding: 110px var(--gutter) 40px; }
.lobby::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 600px;
  z-index: -1;
  background: radial-gradient(60% 60% at 50% 0%, rgba(15, 42, 34, 0.55), transparent 70%);
  pointer-events: none;
}

.section-head { max-width: 1320px; margin: 0 auto 48px; }
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.section-lead { max-width: 52ch; margin: 18px 0 0; color: var(--ink-dim); }

/* ---------------- tarjetas de juego ---------------- */

.game-grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.game-card {
  --mx: 50%;
  --my: 30%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 560px;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  cursor: pointer;
  outline: none;
  transform: translateY(0);
  transition: transform 0.6s var(--ease), border-color 0.5s var(--ease), box-shadow 0.6s var(--ease);
}
.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.game-card:hover,
.game-card:focus-visible { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.game-card:hover::after { opacity: 1; }
.game-card.selected {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 40px 90px -40px color-mix(in srgb, var(--accent) 55%, transparent);
}

.cover { position: absolute; inset: 0; margin: 0; z-index: -1; }
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(0.9) brightness(0.85);
  transition: transform 1.2s var(--ease), filter 0.8s var(--ease);
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 10, 0.25) 0%, rgba(7, 9, 10, 0) 30%, rgba(7, 9, 10, 0.7) 58%, rgba(7, 9, 10, 0.97) 100%);
}
.game-card:hover .cover img,
.game-card.selected .cover img { transform: scale(1.08); filter: saturate(1.05) brightness(0.95); }

.card-index {
  position: absolute;
  top: 22px;
  left: 24px;
  z-index: 2;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-dim);
}

.selected-flag {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(7, 9, 10, 0.55);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.selected-flag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.game-card.selected .selected-flag { opacity: 1; transform: translateY(0); }

.card-body { position: relative; z-index: 2; padding: 28px 26px 26px; }

.card-kicker {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.game-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 2.6vw, 2.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.game-desc { margin: 10px 0 0; color: var(--ink-dim); font-size: 0.92rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.chips li {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-dim);
  background: rgba(7, 9, 10, 0.35);
}

.game-actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 8px;
  margin-top: 22px;
}

.enter-btn {
  position: relative;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(243, 238, 228, 0.05);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.enter-btn:hover { border-color: var(--line-gold); background: rgba(214, 178, 106, 0.1); }
.enter-btn:active { transform: scale(0.97); }
.enter-primary {
  color: #1a1408;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
}
.enter-primary:hover { background: linear-gradient(135deg, #fff1c9, var(--gold-hi) 55%, var(--gold)); border-color: transparent; }

.enter-btn.is-busy { color: transparent; pointer-events: none; }
.enter-btn.is-busy::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid rgba(26, 20, 8, 0.25);
  border-top-color: #1a1408;
  animation: spin 0.7s linear infinite;
}
.enter-btn:not(.enter-primary).is-busy::after { border-color: var(--line-strong); border-top-color: var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }

.carousel-dots { display: none; }

/* ---------------- pasos ---------------- */

.ritual { padding: 130px 0 40px; }
.steps {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.step {
  position: relative;
  padding: 34px 30px 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 22, 21, 0.8), rgba(11, 15, 14, 0.4));
  overflow: hidden;
}
.step::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-gold), transparent);
}
.step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--gold);
}
.step h3 { margin: 26px 0 8px; font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--ink-dim); font-size: 0.94rem; }

/* ---------------- footer ---------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  margin-top: 60px;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 0.82rem;
}
.footer-dim { color: var(--ink-faint); }

/* ---------------- revelado al hacer scroll ---------------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.hero .reveal { transition-duration: 1.4s; }
.hero .reveal:nth-child(2) { transition-delay: 0.12s; }
.hero .reveal:nth-child(3) { transition-delay: 0.24s; }
.hero .reveal:nth-child(4) { transition-delay: 0.36s; }
.hero-stats.reveal { transition-delay: 0.5s; }
.steps .step:nth-child(2) { transition-delay: 0.1s; }
.steps .step:nth-child(3) { transition-delay: 0.2s; }

/* ---------------- modales ---------------- */

.gc-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 6, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.gc-overlay.is-open { opacity: 1; pointer-events: auto; }

.gc-modal {
  position: relative;
  width: min(400px, 100%);
  padding: 34px 30px 28px;
  text-align: center;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(22, 28, 27, 0.96), rgba(12, 16, 15, 0.98));
  border: 1px solid var(--line-strong);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.5s var(--ease);
}
.gc-modal::before {
  content: "";
  position: absolute;
  inset: 0 20% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.gc-overlay.is-open .gc-modal { transform: none; }

.modal-kicker {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.modal-kicker:empty { display: none; }

.gc-modal h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.gc-modal-note,
.gc-sub { margin: 0 0 18px; color: var(--ink-dim); font-size: 0.84rem; }

.gc-modal input[type="text"],
.gc-modal input[type="number"] {
  width: 100%;
  background: rgba(7, 9, 10, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  padding: 13px 16px;
  margin-bottom: 8px;
  outline: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.gc-modal input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(214, 178, 106, 0.14); }

.gc-modal-actions { display: flex; gap: 10px; margin-top: 22px; }

.gc-btn {
  flex: 1;
  height: 48px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.gc-btn:active { transform: scale(0.98); }
.gc-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.gc-btn-gold { color: #1a1408; background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); }
.gc-btn-gold:hover:not(:disabled) { background: linear-gradient(135deg, #fff1c9, var(--gold-hi) 55%, var(--gold)); }
.gc-btn-ghost { color: var(--ink-dim); background: rgba(243, 238, 228, 0.04); border-color: var(--line-strong); }
.gc-btn-ghost:hover { color: var(--ink); border-color: var(--line-gold); }

/* ---------------- modal ancho (configuración / sala) ---------------- */

.gc-modal-wide {
  width: min(640px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  text-align: left;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.gc-modal-wide > .modal-kicker,
.gc-modal-wide > h3 { text-align: center; }
.gc-modal-wide > h3 { margin-bottom: 22px; }

.settings-section { border-top: 1px solid var(--line); padding: 20px 0; }
.settings-section:first-of-type { border-top: none; padding-top: 0; }

.settings-section h4 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: rgba(7, 9, 10, 0.5);
  border: 1px solid var(--line);
}
.config-row label { font-size: 0.9rem; font-weight: 600; }

.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(243, 238, 228, 0.1);
  border: 1px solid var(--line-strong);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.switch-track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink-dim);
  transition: transform 0.35s var(--ease), background 0.3s var(--ease);
}
.switch input:checked + .switch-track { background: rgba(214, 178, 106, 0.25); border-color: var(--gold); }
.switch input:checked + .switch-track::before { transform: translateX(20px); background: var(--gold-hi); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--gold); outline-offset: 3px; }

.amount-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease), margin 0.4s var(--ease);
}
.amount-fields.is-visible { max-height: 240px; opacity: 1; margin: 4px 0 6px; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 4px 0 6px;
}

.num-field label,
.amount-field label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.amount-field .input-money { position: relative; }
.amount-field .input-money span {
  position: absolute;
  left: 15px;
  top: calc(50% - 4px);
  transform: translateY(-50%);
  color: var(--gold);
  font-weight: 700;
}
.gc-modal .amount-field input { padding-left: 30px; }
.gc-modal .num-field input,
.gc-modal .amount-field input { font-variant-numeric: tabular-nums; }

.level-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 6px;
}
.level-opt {
  padding: 12px 8px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(7, 9, 10, 0.5);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.level-opt:hover { border-color: var(--line-gold); }
.level-opt strong { display: block; font-size: 0.88rem; }
.level-opt small { display: block; margin-top: 2px; font-size: 0.72rem; color: var(--ink-faint); }
.level-opt.selected { border-color: var(--gold); background: rgba(214, 178, 106, 0.12); }
.level-opt.selected strong { color: var(--gold-hi); }

/* ---------------- ventana de sala ---------------- */

.room-code-big {
  margin: 4px 0 6px;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 3.8rem);
  font-weight: 400;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--gold-hi);
}

.room-hint { margin: 0 0 18px; text-align: center; color: var(--ink-faint); font-size: 0.84rem; }

.room-players {
  list-style: none;
  margin: 0 0 16px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(7, 9, 10, 0.4);
}
.room-players li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
}
.room-players li:hover { background: rgba(243, 238, 228, 0.03); }
.room-players li.li-enter { animation: room-li-in 0.5s var(--ease); }
@keyframes room-li-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.room-players li .avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.8rem;
  color: #0b0d0c;
  background: var(--p, var(--ink));
}
.room-players li.off .avatar { opacity: 0.4; filter: grayscale(1); }
.room-players li .player-name {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-players li em {
  margin-left: auto;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.room-bet-note {
  margin: 0 0 16px;
  padding: 10px 14px;
  text-align: center;
  font-weight: 600;
  font-size: 0.86rem;
  border-radius: 999px;
  color: var(--gold-hi);
  border: 1px solid var(--line-gold);
  background: rgba(214, 178, 106, 0.08);
}

.room-wait { margin: 12px 0 0; text-align: center; color: var(--ink-faint); font-size: 0.82rem; }
.room-error { margin: 8px 0 0; text-align: center; color: var(--danger); font-size: 0.86rem; }

.gc-modal .code-input-big {
  text-align: center;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  text-transform: uppercase;
  padding: 14px 12px;
}

.gc-toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 120;
  max-width: calc(100vw - 32px);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(17, 22, 21, 0.92);
  border: 1px solid var(--line-gold);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.gc-toast.is-in { opacity: 1; transform: translateX(-50%) translateY(0); }
.gc-toast.is-out { opacity: 0; transform: translateX(-50%) translateY(-8px); }

/* ---------------- responsive ---------------- */

@media (max-width: 1100px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-card { min-height: 520px; }
}

@media (max-width: 760px) {
  .topbar { grid-template-columns: auto 1fr auto; padding: 12px 16px; }
  .topbar.is-scrolled { padding: 10px 16px; }
  .brand { justify-self: center; }
  .brand-word { display: none; }
  .settings-label { display: none; }
  .settings-btn { width: 44px; padding: 0; justify-content: center; }
  .player-meta small { display: none; }

  .hero { padding: 120px 16px 40px; }
  .hero-video { object-position: 62% 50%; }
  .hero-shade {
    background:
      linear-gradient(0deg, var(--bg) 8%, rgba(7, 9, 10, 0.7) 50%, rgba(7, 9, 10, 0.35) 100%),
      linear-gradient(180deg, rgba(7, 9, 10, 0.6) 0%, rgba(7, 9, 10, 0) 25%);
  }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-stats { margin-top: 44px; }
  .hero-stats div { min-width: 0; padding-right: 12px; }
  .hero-stats div + div { padding-left: 12px; }
  .hero-stats dd { font-size: 1.35rem; }
  .scroll-cue { display: none; }

  .lobby { padding: 80px 0 24px; }
  .section-head { padding: 0 16px; margin-bottom: 32px; }

  .game-grid {
    display: flex;
    gap: 14px;
    padding: 6px 16px 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    scrollbar-width: none;
  }
  .game-grid::-webkit-scrollbar { display: none; }
  .game-card { flex: 0 0 84%; min-height: 500px; scroll-snap-align: center; }
  .game-card:hover,
  .game-card:focus-visible { transform: none; }

  .carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
  .carousel-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: var(--line-strong);
    cursor: pointer;
    transition: width 0.4s var(--ease), background 0.4s var(--ease);
  }
  .carousel-dots button.active { width: 26px; background: var(--gold); }

  .ritual { padding: 90px 0 20px; }
  .steps { grid-template-columns: 1fr; gap: 12px; padding: 0 16px; }

  .gc-modal { padding: 28px 20px 22px; }
  .gc-modal-actions { flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
