: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: .88;
  letter-spacing: -.07em;
}

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;
}
