:root {
  --bg: #06101e;
  --panel: #101d31;
  --panel-2: #14243b;
  --text: #f4f7fb;
  --muted: #b8c5d8;
  --line: rgba(255,255,255,.12);
  --accent: #4dd4ac;
  --accent-2: #ffd166;
  --accent-3: #5aa8ff;
  --danger: #ff6b6b;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(77,212,172,.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(255,209,102,.15), transparent 30rem),
    linear-gradient(180deg, #06101e 0%, #071424 48%, #050b15 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 72%);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: relative;
  overflow: hidden;
  padding: 58px 0 38px;
  isolation: isolate;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(40px);
  opacity: .55;
  z-index: -1;
}

.hero-glow-a {
  width: 360px;
  height: 360px;
  background: rgba(77, 212, 172, .36);
  top: -120px;
  left: -80px;
}

.hero-glow-b {
  width: 420px;
  height: 420px;
  background: rgba(255, 209, 102, .24);
  right: -120px;
  top: -90px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 34px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent-2);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .1em;
  font-size: .78rem;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin: 0 0 18px;
  line-height: 1.02;
  letter-spacing: -.07em;
  padding-bottom: .08em;
}

h1 span {
  display: block;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  font-weight: 950;
}

h1 strong {
  display: block;
  font-size: clamp(2.8rem, 7vw, 6.3rem);
  font-weight: 1000;
  background: linear-gradient(90deg, #ffffff, #ffd166 45%, #4dd4ac 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 28px 80px rgba(77, 212, 172, .12);
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  margin-bottom: 0;
}

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

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.hero-badges span {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .9rem;
  font-weight: 800;
}

.hero-visual {
  min-height: 360px;
}

.stadium-card {
  position: relative;
  min-height: 360px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at center 22%, rgba(255,209,102,.24), transparent 15rem),
    radial-gradient(circle at center bottom, rgba(77,212,172,.34), transparent 14rem),
    linear-gradient(145deg, rgba(20,36,59,.86), rgba(8,17,31,.88));
  box-shadow: 0 28px 70px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.14);
}

.stadium-card::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -70px;
  width: 120%;
  height: 210px;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 2px, transparent 2px 34px),
    linear-gradient(180deg, rgba(77,212,172,.12), rgba(77,212,172,.03));
  border-top: 1px solid rgba(77,212,172,.28);
}

.stadium-card::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none;
}

.stadium-lights {
  position: absolute;
  top: 26px;
  left: 50%;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.stadium-lights span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 16%, #ffd166 17% 52%, transparent 58%);
  box-shadow: 0 0 22px rgba(255,209,102,.75);
}

.trophy-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-bottom: 34px;
}

.trophy-cup {
  position: relative;
  z-index: 1;
  font-size: clamp(6rem, 14vw, 9rem);
  filter: drop-shadow(0 22px 28px rgba(0,0,0,.35));
  animation: floatCup 4.8s ease-in-out infinite;
}

.trophy-shadow {
  position: absolute;
  bottom: 95px;
  width: 180px;
  height: 28px;
  border-radius: 999px;
  background: rgba(0,0,0,.28);
  filter: blur(6px);
}

.floating-flags {
  position: absolute;
  width: 78px;
  height: 48px;
  border-radius: 14px;
  opacity: .95;
  border: 1px solid rgba(255,255,255,.20);
  box-shadow: 0 18px 36px rgba(0,0,0,.25);
  overflow: hidden;
}

.floating-flags::before,
.floating-flags::after {
  content: "";
  position: absolute;
  inset: 0;
}

.flag-one {
  left: 28px;
  top: 96px;
  transform: rotate(-9deg);
  background: linear-gradient(#75aadb 0 33%, #fff 33% 66%, #75aadb 66%);
}

.flag-two {
  right: 32px;
  top: 112px;
  transform: rotate(8deg);
  background: linear-gradient(90deg, #1a8f43 0 33%, #f2d02d 33% 66%, #1f5fbf 66%);
}

.flag-three {
  left: 62px;
  bottom: 86px;
  transform: rotate(7deg);
  background: linear-gradient(90deg, #21468b 0 33%, #fff 33% 66%, #ae1c28 66%);
}

.pitch-lines {
  position: absolute;
  left: 50%;
  bottom: 38px;
  width: 74%;
  height: 72px;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.18);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}

.pitch-lines span:nth-child(1) {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 72px;
  background: rgba(255,255,255,.14);
}

.pitch-lines span:nth-child(2) {
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
  transform: translateX(-50%);
}

.pitch-lines span:nth-child(3) {
  position: absolute;
  left: 50%;
  top: 32px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
  transform: translateX(-50%);
}

.visual-caption {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(244,247,251,.78);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .76rem;
}

@keyframes floatCup {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-card,
.card,
.notice,
.ad-slot,
.result-box,
.empty-state {
  border: 1px solid var(--line);
  background: rgba(16, 29, 49, .78);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notice {
  padding: 16px 18px;
  color: var(--muted);
  margin-bottom: 18px;
}

.notice strong { color: var(--text); }

.ad-slot {
  min-height: 82px;
  display: grid;
  place-items: center;
  color: rgba(244,247,251,.58);
  border-style: dashed;
  margin: 18px 0;
}

.mode-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.tab-button,
.primary-button,
.secondary-button,
.payment-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .14s ease, background .14s ease, opacity .14s ease, box-shadow .14s ease;
}

.large-button { padding: 15px 22px; }

.tab-button:hover,
.primary-button:hover,
.secondary-button:hover,
.payment-button:hover {
  transform: translateY(-1px);
}

.primary-button,
.secondary-button,
.payment-button,
.tab-button {
  white-space: nowrap;
}

.tab-button {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.tab-button.active {
  background: var(--accent);
  color: #062018;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin: 10px 0 18px;
}

.panel-header p { color: var(--muted); margin-bottom: 0; }

.card { padding: 22px; }

.simulator-card { margin-bottom: 18px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  background: #0a1424;
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 1rem;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.tournament-header {
  display: block;
  margin-bottom: 14px;
}

.tournament-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #84f0cf);
  color: #062018;
  box-shadow: 0 14px 30px rgba(77, 212, 172, .18);
}

.secondary-button {
  background: rgba(255,255,255,.09);
  color: var(--text);
  border: 1px solid var(--line);
}

.payment-button {
  background: linear-gradient(135deg, var(--accent-2), #ffe39a);
  color: #261c00;
  margin-top: 8px;
}

.result-box {
  margin-top: 20px;
  padding: 20px;
}

.hidden { display: none; }

.scoreline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  text-align: center;
}

.team-name {
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  font-weight: 950;
}

.score {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 1000;
  letter-spacing: -.06em;
}

.prob-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.prob-card {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.prob-card span {
  display: block;
  color: var(--muted);
  font-size: .86rem;
}

.prob-card strong {
  font-size: 1.35rem;
}

.tournament-result {
  display: block;
  width: 100%;
  clear: both;
  margin: 20px 0 42px;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.group-card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  border-radius: var(--radius);
  overflow: hidden;
}

.group-card h3 {
  padding: 14px 16px;
  margin: 0;
  background: rgba(255,255,255,.06);
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 460px;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.classified { color: var(--accent); font-weight: 900; }
.third-qualified { color: var(--accent-2); font-weight: 900; }

.bracket { margin-top: 26px; }

.round-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.match-card {
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px;
}

.match-card strong { color: var(--accent); }

.champion-box {
  border: 1px solid rgba(255,209,102,.45);
  background: linear-gradient(135deg, rgba(255,209,102,.18), rgba(77,212,172,.12));
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  margin-top: 22px;
  overflow: hidden;
  position: relative;
}

.champion-box::before {
  content: "";
  position: absolute;
  inset: -40% 20%;
  background: radial-gradient(circle, rgba(255,209,102,.24), transparent 62%);
  pointer-events: none;
}

.champion-box .trophy-icon {
  position: relative;
  display: block;
  font-size: 4rem;
  margin-bottom: 10px;
}

.champion-box p,
.champion-box strong { position: relative; }

.champion-box strong {
  display: block;
  font-size: clamp(2rem, 5vw, 4rem);
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 42px;
}

.support-card p { color: var(--muted); }
.premium-card li { margin-bottom: 8px; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding: 24px 0;
  color: var(--muted);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-grid p { margin: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: #f4f7fb;
  color: #08111f;
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: var(--shadow);
  font-weight: 900;
  z-index: 20;
}

.flag-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 18px;
  margin-right: 6px;
  vertical-align: -3px;
}

.flag-img {
  width: 26px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.flag-fallback {
  display: none;
  font-size: 18px;
  line-height: 1;
}

.flag-fallback.visible { display: inline-flex; }

.team-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.team-name .team-label { justify-content: center; }

.public-summary {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  color: var(--muted);
  text-align: center;
}

.public-summary p { margin: 6px 0; }

.champion-box .flag-wrap {
  display: inline-flex;
  vertical-align: middle;
  width: 34px;
  height: 24px;
  margin-right: 10px;
}

.champion-box .flag-img {
  width: 34px;
  height: 24px;
}

@media (max-width: 920px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual { min-height: 300px; }
  .stadium-card { min-height: 300px; }
}

@media (max-width: 820px) {
  .form-grid,
  .group-grid,
  .round-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .panel-header { flex-direction: column; }
  .tournament-actions {
    justify-content: flex-start;
    width: 100%;
  }
  .scoreline { grid-template-columns: 1fr; }
  .score { line-height: .85; }
  .prob-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header { padding-top: 38px; }
  .hero-actions { flex-direction: column; }
  .large-button { width: 100%; }
  .floating-flags { display: none; }
}

/* Ajustes de legibilidad de tablas: evita barras horizontales en grupos largos */
.group-grid {
  grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
  gap: 20px;
}

.group-card {
  overflow: hidden;
}

.table-wrap {
  overflow-x: hidden;
}

.group-card table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.group-card th,
.group-card td {
  padding: 8px 5px;
  font-size: .84rem;
  line-height: 1.18;
}

.group-card th:nth-child(1),
.group-card td:nth-child(1) {
  width: 30px;
  text-align: center;
}

.group-card th:nth-child(2),
.group-card td:nth-child(2) {
  width: auto;
  white-space: normal;
  word-break: normal;
}

.group-card th:nth-child(n+3),
.group-card td:nth-child(n+3) {
  width: 33px;
  text-align: center;
  white-space: nowrap;
}

.group-card .flag-wrap {
  flex: 0 0 auto;
}

.group-card td:nth-child(2) {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Comparación visual de atributos en el simulador de partidos */
.attribute-comparison {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 22% 18%, rgba(77,212,172,.14), transparent 18rem),
    radial-gradient(circle at 78% 28%, rgba(255,209,102,.12), transparent 18rem),
    rgba(255,255,255,.045);
  padding: 18px;
}

.attribute-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.attribute-title h3 {
  margin: 0;
  font-size: 1.15rem;
}

.attribute-title p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr;
  gap: 18px;
  align-items: center;
}

.radar-card {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(6, 16, 30, .46);
  padding: 12px;
}

.radar-chart {
  width: min(100%, 270px);
  height: auto;
  overflow: visible;
}

.radar-chart text {
  fill: rgba(244,247,251,.76);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
}

.radar-grid-fill {
  fill: rgba(255,255,255,.035);
}

.radar-grid {
  fill: none;
  stroke: rgba(255,255,255,.22);
  stroke-width: 1.4;
}

.radar-grid.muted {
  stroke: rgba(255,255,255,.11);
  stroke-width: 1;
}

.radar-axis {
  stroke: rgba(255,255,255,.13);
  stroke-width: 1;
}

.radar-team {
  stroke-width: 2.6;
  stroke-linejoin: round;
}

.radar-a {
  fill: rgba(77,212,172,.25);
  stroke: rgba(77,212,172,.94);
}

.radar-b {
  fill: rgba(255,209,102,.20);
  stroke: rgba(255,209,102,.94);
}

.radar-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 2px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 850;
}

.radar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.radar-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.legend-a { background: var(--accent); }
.legend-b { background: var(--accent-2); }

.attribute-bars {
  display: grid;
  gap: 12px;
}

.attribute-team {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(6, 16, 30, .36);
  padding: 14px;
}

.attribute-team h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.attribute-row {
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  color: var(--muted);
  font-weight: 850;
  font-size: .9rem;
}

.attribute-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  overflow: hidden;
}

.attribute-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(77,212,172,.72), rgba(77,212,172,1));
}

.attribute-team.team-b .attribute-track i {
  background: linear-gradient(90deg, rgba(255,209,102,.68), rgba(255,209,102,1));
}

@media (max-width: 1120px) {
  .group-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .radar-layout {
    grid-template-columns: 1fr;
  }

  .attribute-title {
    display: block;
  }

  .attribute-title h3 {
    margin-bottom: 6px;
  }

  .group-card th,
  .group-card td {
    padding: 7px 4px;
    font-size: .78rem;
  }

  .group-card th:nth-child(n+3),
  .group-card td:nth-child(n+3) {
    width: 29px;
  }
}

/* === Plataforma / sesión / cookies === */
.platform-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 8, 22, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.platform-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
  letter-spacing: .02em;
  text-decoration: none;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8d77a, #ff8a5b);
  color: #081224;
  box-shadow: 0 10px 30px rgba(255, 189, 89, .28);
}

.session-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.guest-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.11);
  color: rgba(255,255,255,.82);
  font-size: .84rem;
  font-weight: 700;
}

.small-button {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}

.small-button.accent {
  background: linear-gradient(135deg, #f8d77a, #ff8a5b);
  color: #071225;
  border-color: transparent;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.64);
  backdrop-filter: blur(8px);
}

.login-card {
  width: min(520px, 100%);
  position: relative;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(21, 36, 72, .98), rgba(8, 14, 30, .98));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 90px rgba(0,0,0,.45);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}

.login-actions {
  display: grid;
  gap: 12px;
  margin: 22px 0 14px;
}

.oauth-button {
  display: block;
  text-align: center;
  border-radius: 16px;
  padding: 13px 16px;
  font-weight: 900;
  text-decoration: none;
  color: #081224;
  background: #fff;
}

.oauth-button.facebook {
  background: #1877f2;
  color: #fff;
}

.legal-mini {
  font-size: .84rem;
  color: rgba(255,255,255,.70);
}

.legal-mini a,
.site-footer a {
  color: #f8d77a;
}

.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(8, 14, 30, .94);
  box-shadow: 0 22px 70px rgba(0,0,0,.42);
  backdrop-filter: blur(14px);
}

.cookie-banner p {
  margin: 6px 0 0;
  color: rgba(255,255,255,.74);
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.disabled-ticket:disabled {
  opacity: .58;
  cursor: not-allowed;
  filter: grayscale(.2);
}

.monetization-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.legal-page {
  padding-top: 48px;
  padding-bottom: 64px;
}

.legal-card {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
}

.legal-card h1,
.legal-card h2 {
  color: #fff;
}

.legal-card p,
.legal-card li {
  color: rgba(255,255,255,.78);
  line-height: 1.65;
}

@media (max-width: 860px) {
  .platform-bar-inner,
  .cookie-banner {
    align-items: flex-start;
    flex-direction: column;
  }
  .session-box {
    justify-content: flex-start;
  }
  .monetization-grid {
    grid-template-columns: 1fr;
  }
}

.playoneta-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 3000;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(12, 26, 43, 0.96);
  border: 1px solid rgba(98, 230, 197, 0.45);
  color: #f6fbff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  font-weight: 700;
}

.oauth-button small {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  opacity: 0.75;
  font-weight: 700;
}


button.oauth-button {
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  border: 0;
}

/* Fix modal visibility: .login-modal declares display:grid later than .hidden in the CSS,
   so this more specific rule guarantees the login window really disappears. */
.login-modal.hidden,
.cookie-banner.hidden,
.playoneta-toast.hidden {
  display: none !important;
}

.support-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: .9rem;
}

.payment-pending {
  opacity: .82;
}

code {
  color: var(--accent-2);
  background: rgba(255,255,255,.08);
  padding: 2px 6px;
  border-radius: 6px;
}


/* Aportes / transferencia */
.transfer-box {
  display: grid;
  gap: 7px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
}

.transfer-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.transfer-box strong {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

.transfer-box small {
  color: var(--muted);
  line-height: 1.45;
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.secondary-payment {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.payment-pending {
  opacity: 0.82;
}

/* Selector visual con banderas reales: evita que Windows muestre emojis como AR/DE. */
.native-team-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip-path: inset(50%) !important;
}

.custom-team-select {
  position: relative;
  width: 100%;
  margin-top: 2px;
}

.custom-team-select-button {
  width: 100%;
  border: 1px solid var(--line);
  background: #0a1424;
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}

.custom-team-select-button:hover,
.custom-team-select.open .custom-team-select-button {
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.08);
}

.custom-team-current,
.custom-team-select-button .team-label {
  min-width: 0;
}

.select-chevron {
  opacity: .75;
  font-size: .9rem;
  flex: 0 0 auto;
}

.custom-team-options {
  display: none;
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background: #071120;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

.custom-team-select.open .custom-team-options {
  display: grid;
  gap: 4px;
}

.custom-team-option {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 11px;
  font-size: .98rem;
  font-weight: 850;
  display: flex;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.custom-team-option:hover,
.custom-team-option.active {
  background: rgba(37, 99, 235, 0.28);
}

.custom-team-option .team-label,
.custom-team-current .team-label {
  width: 100%;
}

.custom-team-option .team-label > span:last-child,
.custom-team-current .team-label > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Login real con Supabase === */
.hidden {
  display: none !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: rgba(255,255,255,.68);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255,255,255,.14);
}

.auth-form {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: rgba(255,255,255,.84);
  font-weight: 800;
  font-size: .88rem;
}

.auth-form input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(98, 230, 197, .55);
  box-shadow: 0 0 0 4px rgba(98, 230, 197, .12);
}

.auth-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.text-button {
  border: 0;
  background: transparent;
  color: #f8d77a;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  padding: 3px 0;
}

@media (max-width: 540px) {
  .auth-form-actions {
    grid-template-columns: 1fr;
  }
}

/* === Confirmación de email / cuenta pendiente === */
.confirmation-box {
  margin: 14px 0 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(248, 215, 122, .35);
  background: rgba(248, 215, 122, .08);
  color: rgba(255,255,255,.92);
}

.confirmation-box strong {
  display: block;
  margin-bottom: 6px;
  color: #f8d77a;
}

.confirmation-box p {
  margin: 0 0 12px;
  font-size: .9rem;
  color: rgba(255,255,255,.82);
}

.confirmation-box button:disabled {
  opacity: .65;
  cursor: not-allowed;
}

/* === Perfil, recursos y gamificación: Tickets / Fichines / Copas / Medallas === */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  border: 2px solid rgba(255, 92, 92, .78);
  background: rgba(255,255,255,.075);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.user-chip:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.11);
}

.user-chip.connected {
  border-color: rgba(98, 230, 197, .85);
}

.user-chip.disconnected {
  border-color: rgba(255, 92, 92, .78);
}

.user-avatar-ring {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 92, 92, .45), rgba(255,255,255,.08));
}

.user-chip.connected .user-avatar-ring {
  background: linear-gradient(135deg, rgba(98, 230, 197, .7), rgba(248, 215, 122, .45));
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  background: #071225;
}

.user-chip-text {
  display: grid;
  text-align: left;
  line-height: 1.12;
}

.user-chip-text strong {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .9rem;
}

.user-chip-text small {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.68);
  font-size: .72rem;
  font-weight: 700;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.66);
  backdrop-filter: blur(8px);
}

.profile-card {
  width: min(720px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  position: relative;
  padding: 28px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(21, 36, 72, .98), rgba(8, 14, 30, .98));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 90px rgba(0,0,0,.48);
}

.profile-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  object-fit: cover;
  border: 3px solid rgba(98, 230, 197, .72);
  box-shadow: 0 18px 42px rgba(98,230,197,.14);
  background: rgba(255,255,255,.06);
}

.profile-muted {
  color: rgba(255,255,255,.68);
  margin: 4px 0 0;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 18px;
}

.profile-stat {
  padding: 13px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.075);
  text-align: center;
}

.profile-stat span {
  display: block;
  color: rgba(255,255,255,.68);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.profile-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 1.35rem;
}

.profile-stat.gold { border-color: rgba(248, 215, 122, .48); }
.profile-stat.silver { border-color: rgba(220, 228, 238, .42); }
.profile-stat.bronze { border-color: rgba(205, 127, 50, .48); }

.profile-edit-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.055);
}

.profile-edit-box.two-cols {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.profile-edit-box label {
  display: grid;
  gap: 7px;
  color: rgba(255,255,255,.82);
  font-weight: 800;
}

.profile-edit-box input,
.profile-edit-box select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

.profile-edit-box select option {
  color: #071225;
}

.public-link-box {
  display: grid;
  gap: 8px;
  align-content: end;
}

.public-link-box span {
  color: rgba(255,255,255,.72);
  font-weight: 800;
}

.achievements-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.045);
}

.achievements-box h3 {
  margin: 0 0 6px;
}

.achievements-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.empty-achievements {
  color: rgba(255,255,255,.66);
  font-weight: 700;
}

.achievement-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.055);
}

.achievement-item span {
  color: rgba(255,255,255,.72);
  text-align: right;
}

.profile-modal.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .profile-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-edit-box,
  .profile-edit-box.two-cols {
    grid-template-columns: 1fr;
  }

  .user-chip-text small {
    max-width: 150px;
  }
}

@media (max-width: 520px) {
  .profile-head {
    align-items: flex-start;
  }

  .profile-avatar {
    width: 68px;
    height: 68px;
    border-radius: 18px;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-chip-text small {
    display: none;
  }
}

/* === Ajustes login: logos OAuth, iconos email y recuperación de contraseña === */
.oauth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.oauth-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.oauth-icon svg {
  display: block;
}

.facebook-icon {
  background: #fff;
  color: #1877f2;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1;
}

.field-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.field-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(98, 230, 197, .14);
  border: 1px solid rgba(98, 230, 197, .24);
  font-size: .9rem;
}

.password-reset-box {
  margin: 14px 0 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(98, 230, 197, .35);
  background: rgba(98, 230, 197, .08);
  color: rgba(255,255,255,.92);
}

.password-reset-box strong {
  display: block;
  margin-bottom: 6px;
  color: #62e6c5;
}

.password-reset-box p {
  margin: 0 0 12px;
  font-size: .9rem;
  color: rgba(255,255,255,.82);
}

.password-reset-box label {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  color: rgba(255,255,255,.84);
  font-weight: 800;
  font-size: .88rem;
}

.password-reset-box input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

.password-reset-box input:focus {
  border-color: rgba(98, 230, 197, .55);
  box-shadow: 0 0 0 4px rgba(98, 230, 197, .12);
}


.auth-coming-soon {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.82);
}
.auth-coming-soon strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}
.auth-coming-soon p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

/* === Catálogo de juegos / portada de plataforma === */
.games-hub {
  margin: 28px 0;
  scroll-margin-top: 96px;
}

.games-hub-header {
  align-items: flex-end;
}

.games-hub-header h2 {
  margin: 4px 0 6px;
}

.hub-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(98, 230, 197, .28);
  color: #62e6c5;
  background: rgba(98, 230, 197, .08);
  font-size: .8rem;
  font-weight: 900;
  white-space: nowrap;
}

.game-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 92% 8%, rgba(98,230,197,.18), transparent 34%),
    linear-gradient(145deg, rgba(18,35,70,.98), rgba(7,14,31,.98));
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
}

.game-card-duel {
  background:
    radial-gradient(circle at 92% 8%, rgba(248,215,122,.19), transparent 34%),
    linear-gradient(145deg, rgba(31,42,70,.98), rgba(9,14,27,.98));
}

.game-card-art {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  font-size: 3rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}

.game-number {
  color: #f8d77a;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.game-card h3 {
  margin: 7px 0;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.game-card p {
  margin: 0;
  color: rgba(255,255,255,.74);
  line-height: 1.5;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.game-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.78);
  font-size: .72rem;
  font-weight: 800;
}

.game-launch {
  grid-column: 1 / -1;
  justify-self: start;
  text-decoration: none;
}

#simulador {
  scroll-margin-top: 96px;
}

/* === Lobby social reutilizable === */
.online-lobby {
  margin: 34px 0;
  scroll-margin-top: 96px;
}

.lobby-connection {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  font-size: .8rem;
  font-weight: 900;
}

.lobby-connection[data-state="online"] {
  color: #62e6c5;
  border-color: rgba(98,230,197,.3);
  background: rgba(98,230,197,.08);
}

.lobby-connection[data-state="warning"] {
  color: #f8d77a;
  border-color: rgba(248,215,122,.3);
}

.lobby-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.lobby-panel {
  min-width: 0;
  padding: 20px;
}

.create-room-panel {
  grid-column: 1 / -1;
}

.lobby-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.lobby-panel-title h3,
.lobby-panel h3 {
  margin: 0;
}

.lobby-panel-title > span {
  color: #62e6c5;
  font-size: .8rem;
  font-weight: 900;
}

.player-list,
.room-list {
  display: grid;
  gap: 9px;
  max-height: 340px;
  overflow-y: auto;
}

.room-list.room-tile-grid {
  max-height: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
}

.room-tile {
  position: relative;
  min-height: 190px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(145deg, #153456, #0d1c35);
  background-size: 28px 28px, 28px 28px, auto;
  color: #fff;
  text-align: left;
  font: inherit;
}

button.room-tile {
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease;
}

button.room-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(98,230,197,.42);
}

.room-create-tile {
  border-style: dashed;
  background:
    radial-gradient(circle at 78% 20%, rgba(98,230,197,.23), transparent 30%),
    linear-gradient(145deg, #123e48, #10253d);
}

.room-tile-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #62e6c5;
  color: #071225;
  font-size: 1.9rem;
  font-weight: 900;
}

.room-tile-ball {
  position: absolute;
  top: 19px;
  right: 20px;
  font-size: 2.65rem;
  filter: drop-shadow(0 9px 10px rgba(0,0,0,.25));
}

.room-tile-status {
  position: absolute;
  top: 19px;
  left: 19px;
  color: #62e6c5;
  font-size: .72rem;
}

.room-tile > strong {
  max-width: 86%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.05rem;
}

.room-tile > small {
  margin-top: 5px;
  color: rgba(255,255,255,.58);
}

.room-capacity {
  margin-top: 14px;
  color: #ffd166;
  font-size: .76rem;
  font-weight: 900;
}

.room-enter {
  margin-top: 5px;
  color: rgba(255,255,255,.72);
  font-size: .76rem;
  font-weight: 850;
}

.room-empty-tile {
  opacity: .68;
}

.room-empty-tile > span {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2.5rem;
}

.room-invitation {
  grid-column: 1 / -1;
}

.lobby-empty {
  min-height: 96px;
  place-items: center;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.13);
  color: rgba(255,255,255,.58);
  text-align: center;
}

.lobby-player,
.room-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 15px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}

.room-row.active-room {
  border-color: rgba(98,230,197,.34);
  background: rgba(98,230,197,.08);
}

.room-tile.active-room {
  border-color: rgba(98,230,197,.5);
  background: linear-gradient(145deg, rgba(30,104,86,.95), rgba(12,42,63,.96));
}

.room-row .join-room:disabled {
  color: #62e6c5;
  cursor: default;
  opacity: 1;
}

.room-tile.join-room:disabled {
  cursor: default;
  opacity: 1;
}

.presence-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #788397;
}

.presence-dot.online {
  background: #62e6c5;
  box-shadow: 0 0 0 4px rgba(98,230,197,.12);
}

.lobby-player-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}

.lobby-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lobby-player-copy,
.room-row > div {
  min-width: 0;
  flex: 1;
}

.lobby-player-copy strong,
.lobby-player-copy small,
.room-row strong,
.room-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-player-copy small,
.room-row small {
  margin-top: 2px;
  color: rgba(255,255,255,.58);
  font-size: .75rem;
}

.invite-player:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.lobby-form {
  display: grid;
  grid-template-columns: .8fr 1.4fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.lobby-form label {
  display: grid;
  gap: 7px;
  color: rgba(255,255,255,.78);
  font-weight: 800;
  font-size: .82rem;
}

.lobby-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lobby-form input,
.lobby-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 13px;
  background: #101d38;
  color: #fff;
  padding: 10px 12px;
  font: inherit;
}

.room-password-field {
  grid-column: 1 / -1;
}

.room-password-card {
  width: min(430px, 100%);
}

.room-password-label {
  display: grid;
  gap: 8px;
  margin: 20px 0 15px;
  font-weight: 850;
}

.room-password-label input {
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: #101d38;
  color: #fff;
  padding: 11px 13px;
  font: inherit;
}

@media (max-width: 540px) {
  .room-list.room-tile-grid {
    grid-template-columns: 1fr;
  }
}

.lobby-help {
  margin: 12px 0 0;
  color: rgba(255,255,255,.55);
  font-size: .8rem;
}

/* === Registro con email + Turnstile === */
.register-only-field small {
  color: rgba(255,255,255,.55);
  font-weight: 600;
}

.password-requirements {
  margin: -3px 0 0;
  color: rgba(255,255,255,.58);
  font-size: .8rem;
}

.captcha-wrap {
  min-height: 78px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(0,0,0,.14);
}

.captcha-slot {
  min-height: 1px;
}

.captcha-status {
  margin: 6px 0 0;
  font-size: .78rem;
  color: rgba(255,255,255,.62);
}

.captcha-status[data-state="success"] {
  color: #62e6c5;
}

.captcha-status[data-state="error"] {
  color: #ff8a8a;
}

/* === Páginas dedicadas de confirmación y recuperación === */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 15%, rgba(98,230,197,.18), transparent 30%),
    radial-gradient(circle at 82% 80%, rgba(248,215,122,.16), transparent 32%),
    #071225;
}

.auth-page-card {
  width: min(520px, 100%);
  padding: 30px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,20,42,.96);
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
  text-align: center;
}

.auth-page-card .auth-form {
  text-align: left;
  margin-top: 22px;
}

.auth-page-brand {
  justify-content: center;
  margin-bottom: 22px;
}

.auth-page-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(248,215,122,.12);
  border: 1px solid rgba(248,215,122,.34);
  color: #f8d77a;
  font-size: 2rem;
  font-weight: 900;
}

.auth-page-icon.success,
.auth-success {
  color: #62e6c5;
}

.auth-page-icon.error,
.auth-error {
  color: #ff8a8a;
}

.auth-page-link {
  display: inline-flex;
  margin-top: 18px;
  text-decoration: none;
}

@media (max-width: 820px) {
  .game-catalog {
    grid-template-columns: 1fr;
  }

  .lobby-grid {
    grid-template-columns: 1fr;
  }

  .create-room-panel {
    grid-column: auto;
  }

  .lobby-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .login-modal {
    align-items: start;
    overflow-y: auto;
  }

  .login-card {
    margin: 10px 0;
    padding: 22px 18px;
  }

  .game-card {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 18px;
  }

  .game-card-art {
    width: 68px;
    height: 68px;
    font-size: 2.2rem;
    border-radius: 18px;
  }
}

/* === Portada general de La Playoneta === */
.platform-home {
  background:
    radial-gradient(circle at 18% 8%, rgba(54, 213, 166, .18), transparent 28rem),
    radial-gradient(circle at 86% 18%, rgba(255, 196, 92, .16), transparent 28rem),
    linear-gradient(180deg, #071326 0%, #06101e 48%, #040a13 100%);
}

.platform-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.platform-nav a {
  padding: 9px 11px;
  border-radius: 999px;
  color: rgba(255,255,255,.72);
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
}

.platform-nav a:hover,
.platform-nav a.active {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.platform-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 62px;
}

.platform-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -180px;
  width: 860px;
  height: 350px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(98,230,197,.18);
  background: radial-gradient(circle, rgba(44,150,113,.22), transparent 66%);
  pointer-events: none;
}

.platform-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  gap: 54px;
  align-items: center;
}

.platform-hero-copy h1 {
  line-height: 1.02;
}

.platform-hero-copy h1 span,
.platform-hero-copy h1 strong {
  display: block;
}

.platform-hero-copy h1 span {
  color: #fff;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
}

.platform-hero-copy h1 strong {
  font-size: clamp(3.15rem, 7vw, 6.6rem);
}

.platform-hero-copy > p:not(.eyebrow) {
  max-width: 670px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  line-height: 1.62;
}

.platform-hero-actions,
.rooms-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 27px;
}

.platform-hero-actions a,
.rooms-hero-actions a,
.platform-game-body a {
  text-decoration: none;
}

.platform-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 24px;
  color: rgba(255,255,255,.7);
  font-size: .84rem;
  font-weight: 800;
}

.platform-proof span::first-letter {
  color: var(--accent);
}

.platform-hero-stage {
  position: relative;
  min-height: 410px;
  display: grid;
  place-items: center;
  align-content: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 38px;
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(49,210,166,.24), transparent 50%),
    linear-gradient(145deg, rgba(18,37,69,.95), rgba(7,15,31,.98));
  background-size: 42px 42px, 42px 42px, auto, auto;
  box-shadow: 0 34px 90px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.12);
}

.platform-hero-stage::after {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.platform-logo-ball {
  position: relative;
  z-index: 2;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 34px;
  background: linear-gradient(145deg, #fff2c4, #f4bb54);
  color: #06101e;
  font-size: 4.5rem;
  transform: rotate(-5deg);
  box-shadow: 0 24px 60px rgba(248,190,82,.28);
}

.platform-hero-stage > strong {
  position: relative;
  z-index: 2;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  letter-spacing: .08em;
}

.platform-hero-stage > span:not(.platform-orbit) {
  position: relative;
  z-index: 2;
  margin-top: 7px;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.platform-orbit {
  position: absolute;
  z-index: 3;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(8,20,41,.88);
  box-shadow: 0 16px 32px rgba(0,0,0,.24);
  font-size: 1.6rem;
}

.orbit-a { top: 44px; right: 52px; transform: rotate(8deg); }
.orbit-b { left: 44px; top: 155px; transform: rotate(-9deg); }
.orbit-c { right: 42px; bottom: 48px; transform: rotate(7deg); }

.platform-main {
  padding-bottom: 70px;
}

.platform-games {
  padding: 48px 0 38px;
  scroll-margin-top: 86px;
}

.platform-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.platform-section-heading h2,
.platform-community h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -.05em;
}

.platform-section-heading > p {
  max-width: 460px;
  margin-bottom: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.platform-game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.platform-game-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 28px;
  background: rgba(14,29,53,.88);
  box-shadow: 0 24px 62px rgba(0,0,0,.24);
  transition: transform .2s ease, border-color .2s ease;
}

.platform-game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,.22);
}

.platform-game-cover {
  position: relative;
  min-height: 178px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px;
  overflow: hidden;
}

.platform-game-cover::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -85px;
  width: 230px;
  height: 180px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
}

.platform-game-card.simulator .platform-game-cover {
  background: linear-gradient(145deg, #1e7b68, #12395b);
}

.platform-game-card.penalties .platform-game-cover {
  background: linear-gradient(145deg, #ce5b38, #782949);
}

.platform-game-card.coming .platform-game-cover {
  background: linear-gradient(145deg, #344057, #171e2d);
}

.platform-game-cover span {
  align-self: flex-start;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 999px;
  background: rgba(0,0,0,.15);
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .1em;
}

.platform-game-cover strong {
  position: relative;
  z-index: 1;
  font-size: 4.6rem;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.24));
}

.platform-game-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
}

.platform-game-body h3 {
  margin-bottom: 9px;
  font-size: 1.55rem;
}

.platform-game-body > p:not(.eyebrow) {
  flex: 1;
  color: var(--muted);
  line-height: 1.55;
}

.platform-game-body .primary-button,
.platform-game-body .secondary-button {
  margin-top: 12px;
}

.platform-community {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 38px;
  align-items: center;
  margin-top: 52px;
  padding: 36px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 32px;
  background:
    radial-gradient(circle at 10% 20%, rgba(98,230,197,.14), transparent 30%),
    rgba(12,25,47,.82);
}

.coin-store {
  padding: 52px 0 24px;
  scroll-margin-top: 96px;
}

.coin-package-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.coin-package {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 23px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 25px;
  background:
    radial-gradient(circle at 90% 8%, rgba(255,209,102,.14), transparent 33%),
    rgba(13,27,51,.92);
}

.coin-package.featured {
  transform: translateY(-8px);
  border-color: rgba(255,209,102,.42);
  box-shadow: 0 22px 60px rgba(0,0,0,.32);
}

.coin-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.68);
  font-size: .68rem;
  font-weight: 900;
}

.coin-badge.saving {
  color: #ffd166;
  background: rgba(255,209,102,.1);
}

.coin-amount {
  margin-top: 23px;
  color: #ffd166;
  font-size: 3.5rem;
  line-height: .9;
}

.coin-package > span:not(.coin-badge) {
  margin-top: 5px;
  color: rgba(255,255,255,.6);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
}

.coin-price {
  margin: 24px 0 3px;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 950;
}

.coin-price small {
  color: rgba(255,255,255,.5);
  font-size: .66rem;
}

.coin-unit {
  flex: 1;
  color: rgba(255,255,255,.52);
  font-size: .78rem;
}

.coin-buy {
  width: 100%;
  margin-top: 17px;
}

.store-disclaimer {
  max-width: 900px;
  margin: 16px 0 0;
  color: rgba(255,255,255,.52);
  font-size: .78rem;
  line-height: 1.55;
}

@media (max-width: 940px) {
  .coin-package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .coin-package-grid {
    grid-template-columns: 1fr;
  }

  .coin-package.featured {
    transform: none;
  }
}

.platform-community > div > p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.community-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.community-features article {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px;
  background: rgba(255,255,255,.05);
}

.community-features article > strong {
  font-size: 1.8rem;
}

.community-features h3 {
  margin: 12px 0 7px;
  font-size: 1rem;
}

.community-features p {
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: .84rem;
  line-height: 1.45;
}

/* === Entrada social de Duelo de Egos === */
.rooms-page {
  background:
    radial-gradient(circle at 82% 5%, rgba(215,77,55,.22), transparent 30rem),
    radial-gradient(circle at 10% 25%, rgba(39,179,143,.16), transparent 32rem),
    linear-gradient(180deg, #091225, #060d19 58%, #040811);
}

.rooms-hero {
  padding: 54px 0 30px;
}

.rooms-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap: 48px;
  align-items: center;
}

.rooms-back {
  display: inline-flex;
  margin-bottom: 28px;
  color: rgba(255,255,255,.66);
  font-weight: 800;
  text-decoration: none;
}

.rooms-back:hover {
  color: #fff;
}

.rooms-hero-copy h1 {
  line-height: 1.02;
}

/* === Selector limpio del simulador === */
.simulator-choice-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(77,212,172,.18), transparent 30rem),
    radial-gradient(circle at 82% 15%, rgba(255,209,102,.17), transparent 28rem),
    #06101e;
}

.simulator-choice {
  min-height: calc(100vh - 150px);
  padding-top: 54px;
  padding-bottom: 72px;
}

.simulator-choice-heading {
  max-width: 780px;
  margin-bottom: 35px;
}

.simulator-choice-heading h1 span,
.simulator-choice-heading h1 strong {
  display: block;
}

.simulator-choice-heading h1 span {
  font-size: clamp(2.2rem, 5vw, 4.3rem);
}

.simulator-choice-heading h1 strong {
  font-size: clamp(3.2rem, 7vw, 6.3rem);
}

.simulator-choice-heading > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.simulator-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.simulator-choice-card {
  position: relative;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 32px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 28px 75px rgba(0,0,0,.28);
  transition: transform .2s ease, border-color .2s ease;
}

.simulator-choice-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,.3);
}

.simulator-choice-card.quick {
  background:
    radial-gradient(circle at 80% 15%, rgba(255,255,255,.18), transparent 27%),
    linear-gradient(145deg, #19785f, #123d5d 68%, #102846);
}

.simulator-choice-card.tournament {
  background:
    radial-gradient(circle at 78% 18%, rgba(255,235,177,.2), transparent 29%),
    linear-gradient(145deg, #9d4b30, #6b2c47 62%, #331e3e);
}

.choice-number {
  position: absolute;
  top: 24px;
  left: 26px;
  color: rgba(255,255,255,.48);
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: .16em;
}

.choice-art {
  position: absolute;
  top: 30px;
  right: 34px;
  font-size: clamp(5rem, 10vw, 8rem);
  filter: drop-shadow(0 20px 22px rgba(0,0,0,.25));
  transform: rotate(5deg);
}

.simulator-choice-card h2 {
  max-width: 440px;
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  letter-spacing: -.04em;
}

.simulator-choice-card p:not(.eyebrow) {
  max-width: 480px;
  color: rgba(255,255,255,.76);
  line-height: 1.55;
}

.choice-cta {
  display: inline-flex;
  margin-top: 15px;
  color: #fff3c4;
}

.simulator-mode-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 18px;
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 17px;
  background: rgba(255,255,255,.045);
}

.simulator-mode-strip a {
  color: rgba(255,255,255,.7);
  font-weight: 850;
  text-decoration: none;
}

.simulator-mode-strip > div {
  display: flex;
  gap: 7px;
}

.simulator-mode-strip .mode-link {
  padding: 8px 12px;
  border-radius: 999px;
}

.simulator-mode-strip .mode-link.active {
  color: #071225;
  background: var(--accent);
}

body[data-simulator-mode="partido"] .simulator-current-mode,
body[data-simulator-mode="torneo"] .simulator-current-mode {
  display: none;
}

@media (max-width: 720px) {
  .simulator-choice-grid {
    grid-template-columns: 1fr;
  }

  .simulator-choice-card {
    min-height: 350px;
  }
}

.rooms-hero-copy h1 span {
  font-size: clamp(2.2rem, 4.5vw, 4.2rem);
}

.rooms-hero-copy h1 strong {
  font-size: clamp(3rem, 5.8vw, 5.35rem);
  white-space: nowrap;
  background: linear-gradient(90deg, #fff, #ffb177 48%, #ff647d);
  -webkit-background-clip: text;
  background-clip: text;
}

.rooms-hero-copy > p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.62;
}

.penalty-room-art {
  position: relative;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 36px;
  background:
    radial-gradient(circle at center 32%, rgba(255,178,107,.2), transparent 34%),
    linear-gradient(180deg, #172a4c 0 42%, #17694f 43% 100%);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

.penalty-room-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 42px, transparent 42px 84px);
  pointer-events: none;
}

.goal-frame {
  position: absolute;
  top: 68px;
  left: 50%;
  width: 72%;
  height: 180px;
  transform: translateX(-50%);
  border: 7px solid rgba(255,255,255,.92);
  border-bottom-width: 5px;
  border-radius: 5px 5px 0 0;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
}

.goal-net {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 22px 22px;
}

.goalkeeper {
  position: absolute;
  left: 50%;
  bottom: 2px;
  z-index: 2;
  font-size: 4.4rem;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 8px rgba(0,0,0,.24));
}

.penalty-ball {
  position: absolute;
  right: 21%;
  bottom: -62px;
  z-index: 3;
  font-size: 2.8rem;
  transform: rotate(12deg);
  filter: drop-shadow(0 9px 7px rgba(0,0,0,.28));
}

.room-score {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 17px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 15px;
  background: rgba(5,12,25,.82);
  box-shadow: 0 16px 32px rgba(0,0,0,.24);
}

.room-score span {
  color: rgba(255,255,255,.66);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .08em;
}

.room-score strong {
  color: #fff2c1;
  font-size: 1.45rem;
}

.penalty-room-art > p {
  position: relative;
  z-index: 4;
  margin: 13px 0 0;
  color: rgba(255,255,255,.74);
  font-size: .82rem;
  font-weight: 800;
}

.rooms-main {
  padding-bottom: 70px;
}

.rooms-page #guestModeBtn {
  display: none !important;
}

.rooms-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 6px;
}

.rooms-guide article {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 19px;
  background: rgba(255,255,255,.045);
}

.rooms-guide article > span {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255,177,119,.13);
  color: #ffb177;
  font-weight: 950;
}

.rooms-guide strong,
.rooms-guide p {
  display: block;
}

.rooms-guide p {
  margin: 3px 0 0;
  color: rgba(255,255,255,.57);
  font-size: .78rem;
}

.rooms-lobby {
  margin-top: 40px;
}

.rooms-lobby-header {
  padding: 25px;
  border: 1px solid rgba(255,255,255,.1);
  border-bottom: 0;
  border-radius: 25px 25px 0 0;
  background: rgba(15,29,53,.82);
}

.rooms-lobby .lobby-grid {
  padding: 0 16px 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-top: 0;
  border-radius: 0 0 25px 25px;
  background: rgba(15,29,53,.82);
}

.rooms-lobby .lobby-panel {
  background: rgba(6,15,30,.76);
}

.create-room-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.create-room-heading .eyebrow {
  margin-bottom: 8px;
}

.format-pill {
  padding: 8px 12px;
  border: 1px solid rgba(255,177,119,.25);
  border-radius: 999px;
  background: rgba(255,177,119,.08);
  color: #ffb177;
  font-size: .75rem;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .platform-hero-grid,
  .rooms-hero-grid {
    grid-template-columns: 1fr;
  }

  .platform-hero-stage,
  .penalty-room-art {
    min-height: 350px;
  }

  .platform-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-game-card.coming {
    grid-column: 1 / -1;
  }

  .platform-community {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .platform-bar-inner {
    flex-direction: row;
    align-items: center;
  }

  .platform-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .session-box {
    margin-left: auto;
    justify-content: flex-end;
  }
}

@media (max-width: 680px) {
  .platform-hero,
  .rooms-hero {
    padding-top: 42px;
  }

  .platform-game-grid,
  .community-features,
  .rooms-guide {
    grid-template-columns: 1fr;
  }

  .platform-game-card.coming {
    grid-column: auto;
  }

  .platform-section-heading,
  .create-room-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .platform-community {
    padding: 24px;
  }

  .rooms-hero-copy h1 strong {
    white-space: normal;
  }
}

@media (max-width: 540px) {
  .platform-bar-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .platform-nav {
    grid-column: 1 / -1;
  }

  .session-box .user-chip-text small,
  .session-box #guestModeBtn,
  .session-box #logoutBtn {
    display: none;
  }

  .platform-hero-stage,
  .penalty-room-art {
    min-height: 310px;
    border-radius: 27px;
  }

  .platform-logo-ball {
    width: 94px;
    height: 94px;
    font-size: 3.6rem;
  }

  .platform-orbit {
    width: 46px;
    height: 46px;
  }

  .orbit-a { top: 28px; right: 30px; }
  .orbit-b { left: 24px; top: 125px; }
  .orbit-c { right: 28px; bottom: 34px; }

  .goal-frame {
    top: 52px;
    height: 150px;
  }
}


/* AdSense / anuncios por uso */
.ad-trigger-slot.hidden { display: none; }
.ad-trigger-slot.ad-visible {
  display: grid;
  min-height: 120px;
  place-items: center;
  border-style: solid;
  border-color: rgba(77, 212, 172, .35);
  background: linear-gradient(135deg, rgba(77,212,172,.10), rgba(255,209,102,.08));
}
.ad-trigger-slot span {
  font-size: .86rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Ajuste mobile de tablas del torneo: evita superposición en celulares */
@media (max-width: 640px) {
  .group-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
  }

  .table-wrap {
    overflow-x: hidden;
  }

  .group-card table {
    table-layout: fixed;
    min-width: 0;
    width: 100%;
  }

  .group-card th,
  .group-card td {
    padding: 7px 3px;
    font-size: .72rem;
    line-height: 1.1;
  }

  .group-card th:nth-child(1),
  .group-card td:nth-child(1) { width: 24px; }

  .group-card th:nth-child(2),
  .group-card td:nth-child(2) {
    width: auto;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .group-card th:nth-child(n+3),
  .group-card td:nth-child(n+3) {
    width: 23px;
    font-size: .68rem;
    padding-left: 1px;
    padding-right: 1px;
  }

  .group-card .flag-wrap,
  .group-card .flag-img {
    width: 21px;
    height: 15px;
    margin-right: 3px;
  }

  .group-card td:nth-child(2) {
    gap: 3px;
  }

  .round-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .match-card p {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .group-card th,
  .group-card td {
    font-size: .66rem;
  }

  .group-card th:nth-child(n+3),
  .group-card td:nth-child(n+3) {
    width: 21px;
    font-size: .62rem;
  }

  .group-card th:nth-child(1),
  .group-card td:nth-child(1) { width: 22px; }
}
