/* =========================================================
   LOGG Hard Store — Prode Mundialista 2026
   UI v2.0 · Dark Gaming Theme
   ========================================================= */

:root {
  --logg-green:        #7CB32D;
  --logg-green-dark:   #5E8A1A;
  --logg-green-light:  #91CC38;
  --logg-green-glow:   rgba(124,179,45,.18);
  --logg-green-border: rgba(124,179,45,.32);

  --bg:           #030303;
  --surface:      #111111;
  --surface-mid:  #1a1a1a;
  --surface-high: #232323;

  --text:         #ffffff;
  --text-muted:   #c7c7c7;
  --text-dim:     #777777;

  --line:         rgba(255,255,255,.08);
  --line-strong:  rgba(255,255,255,.16);

  --ok:    #7CB32D;
  --warn:  #f59e0b;
  --danger:#ef4444;

  --radius:    18px;
  --radius-sm: 12px;
  --radius-xs: 8px;

  --shadow:       0 4px 32px rgba(0,0,0,.65);
  --shadow-green: 0 0 28px rgba(124,179,45,.22);
  --transition:   250ms cubic-bezier(.4,0,.2,1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== TIPOGRAFÍA ===== */
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }
code { font-family: 'Courier New', monospace; font-size: .85em; background: var(--surface-mid); padding: 2px 6px; border-radius: 4px; color: var(--logg-green); word-break: break-all; }

a { color: var(--logg-green); text-decoration: none; }
a:hover { opacity: .8; }

.kicker {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--logg-green);
  margin: 0 0 6px;
}
.section-lead { color: var(--text-muted); font-size: .93rem; margin: 4px 0 0; }

/* ===== LAYOUT ===== */
.app-shell { display: flex; flex-direction: column; min-height: 100vh; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 100px;
}

/* ===== TOPBAR / HEADER ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(3,3,3,.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.topbar.is-scrolled {
  border-color: var(--line);
  background: rgba(3,3,3,.96);
}
.brand {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 62px;
  padding: 0 4px;
  gap: 0;
}
.brand-logo {
  height: 54px;
  width: auto;
  max-width: 200px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.admin-header-pill {
  margin-left: 14px;
  display: inline-flex;
  align-items: center;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--logg-green);
  border: 1px solid var(--logg-green-border);
  border-radius: 99px;
  padding: 4px 14px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.admin-header-pill:hover {
  background: var(--logg-green);
  color: #000;
  opacity: 1;
}

/* ===== ALERTAS ===== */
.alert {
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  margin-bottom: 14px;
  font-size: .9rem;
}
.alert p { margin: 0; }
.alert.error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.28);
  color: #fca5a5;
}
.alert.ok {
  background: rgba(124,179,45,.1);
  border: 1px solid var(--logg-green-border);
  color: var(--logg-green-light);
}
.inline-error { color: #fca5a5; font-size: .85rem; display: block; margin-top: 8px; }

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  animation: fade-up .3s ease both;
}
.card + .card { animation-delay: .04s; }
.card + .card + .card { animation-delay: .08s; }

/* ===== BOTONES ===== */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background var(--transition), color var(--transition),
              box-shadow var(--transition), transform var(--transition),
              border-color var(--transition), opacity var(--transition);
  white-space: nowrap;
  line-height: 1.2;
}
.btn-primary {
  background: var(--logg-green);
  color: #000;
  border: 1px solid var(--logg-green);
}
.btn-primary:hover {
  background: var(--logg-green-light);
  border-color: var(--logg-green-light);
  box-shadow: 0 4px 20px var(--logg-green-glow);
  transform: translateY(-1px);
  color: #000;
  opacity: 1;
}
.btn-primary:active  { transform: translateY(0); box-shadow: none; }
.btn-primary:disabled,
.btn-primary[disabled] {
  background: var(--surface-mid);
  border-color: var(--line);
  color: var(--text-dim);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-secondary {
  background: transparent;
  color: var(--logg-green);
  border: 1px solid var(--logg-green-border);
}
.btn-secondary:hover {
  background: var(--logg-green);
  color: #000;
  border-color: var(--logg-green);
  opacity: 1;
}
.btn-secondary:disabled,
.btn-secondary[disabled] {
  color: var(--text-dim);
  border-color: var(--line);
  cursor: not-allowed;
}

/* ===== INPUTS ===== */
label {
  display: block;
  font-size: .83rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="datetime-local"],
select,
textarea {
  display: block;
  width: 100%;
  background: #0d0d0d;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: inherit;
  font-size: .9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 14px;
}
input::placeholder,
textarea::placeholder { color: var(--text-dim); }
input:focus,
select:focus,
textarea:focus {
  border-color: var(--logg-green);
  box-shadow: 0 0 0 3px var(--logg-green-glow);
}
input[disabled],
select[disabled] { opacity: .4; cursor: not-allowed; }
input.is-empty { border-color: rgba(239,68,68,.5) !important; }

select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237CB32D' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--logg-green);
  display: inline;
  cursor: pointer;
  margin-bottom: 0;
  margin-right: 6px;
  vertical-align: middle;
}

/* ===== TABLA ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--line); }
th {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--logg-green);
  background: var(--surface-mid);
  white-space: nowrap;
}
td { color: var(--text-muted); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,.03); }

/* ===== STATUS PILLS ===== */
.status-pill {
  display: inline-block;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 3px 10px;
  border: 1px solid;
}
.status-pill.status-enabled  { background: rgba(124,179,45,.12); color: var(--logg-green);     border-color: var(--logg-green-border); }
.status-pill.status-disabled { background: var(--surface-mid);   color: var(--text-dim);        border-color: var(--line); }
.status-pill.status-closed   { background: rgba(245,158,11,.1);  color: #f59e0b;               border-color: rgba(245,158,11,.3); }

/* ===== MATCH STATUS BADGES ===== */
.match-status-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 2px 9px;
  border: 1px solid;
  flex-shrink: 0;
}
.status-live {
  background: rgba(239,68,68,.12);
  color: #f87171;
  border-color: rgba(239,68,68,.28);
  animation: blink 1.6s ease infinite;
}
.status-finished {
  background: rgba(124,179,45,.1);
  color: var(--logg-green);
  border-color: var(--logg-green-border);
}
.status-upcoming {
  background: var(--surface-mid);
  color: var(--text-dim);
  border-color: var(--line);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .55; }
}

/* ===== TOAST ===== */
#toast-root {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}
.toast {
  background: var(--surface-high);
  border: 1px solid var(--logg-green-border);
  color: var(--text);
  padding: 10px 24px;
  border-radius: 99px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: toast-in .22s ease both;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================================
   PÁGINA: HOME / REGISTRO
   ========================================================= */
.auth-layout.single-prode-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Hero card */
.auth-hero {
  background: linear-gradient(140deg, #0c1a06 0%, var(--surface) 100%);
  border-color: var(--logg-green-border);
  position: relative;
  overflow: hidden;
  padding: 32px 28px;
}
.auth-hero::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(124,179,45,.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-main-logo {
  height: 120px;
  width: auto;
  display: block;
  margin-bottom: 22px;
  object-fit: contain;
}
.hero-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--logg-green);
  border: 1px solid var(--logg-green-border);
  border-radius: 99px;
  padding: 4px 14px;
  margin-bottom: 20px;
  background: rgba(124,179,45,.07);
}
.auth-hero h2 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.28;
  margin-bottom: 10px;
}
.auth-hero p { color: var(--text-muted); font-size: .95rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Sponsors */
.hero-sponsors {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.hero-sponsors-title {
  font-size: .65rem !important;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.hero-sponsors-logos {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.sponsor-logo {
  height: auto;
  width: 100px;
  display: block;
  object-fit: cover;
  opacity: .7;
  filter: brightness(1);
  transition: opacity var(--transition), filter var(--transition), transform var(--transition);
}
.sponsor-logo:hover {
  opacity: 1;
  filter: brightness(1.25) drop-shadow(0 0 8px rgba(124,179,45,.4));
  transform: scale(1.06);
}

/* Auth forms */
.auth-forms  { display: flex; flex-direction: column; gap: 16px; }
.form-card   { padding: 28px; }
.form-card h2 { font-size: 1.2rem; margin-bottom: 6px; }
.form-card h3 { font-size: 1rem; margin-bottom: 4px; }
.form-card > p { color: var(--text-muted); font-size: .88rem; margin-bottom: 16px; }

/* =========================================================
   PÁGINA: FIXTURE / PREDICCIONES
   ========================================================= */
.participant-card {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 20px;
  align-items: center;
  border-color: var(--logg-green-border);
}
.participant-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.participant-card p  { margin-bottom: 3px; font-size: .88rem; }
.participant-card strong { color: var(--text); font-weight: 700; }

.intro-card { text-align: center; padding: 28px; }
.intro-card h2 { font-size: 1.3rem; margin-bottom: 8px; }

/* Rounds grid */
.knockout-grid { display: flex; flex-direction: column; gap: 16px; }

.knockout-round {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.knockout-round[data-round-status="enabled"] { border-color: var(--logg-green-border); }

.round-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-mid);
}
.round-header .kicker { margin-bottom: 2px; }
.round-header h3 { margin: 0; font-size: 1rem; }

/* Match cards */
.kmatch {
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  transition: background var(--transition);
}
.kmatch:last-child { border-bottom: none; }

.match-locked { opacity: .58; }
.match-locked * { cursor: not-allowed !important; }

.match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .76rem;
  color: var(--text-dim);
  margin-bottom: 10px;
  gap: 8px;
}
.match-meta-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.kmatch-line {
  display: grid;
  grid-template-columns: 1fr auto 46px auto 1fr;
  align-items: center;
  gap: 10px;
}
.kmatch-line > span { color: var(--text-dim); font-size: .85rem; text-align: center; }

/* Teams */
.team {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
}
.team--away { justify-content: flex-end; flex-direction: row-reverse; }

.flag {
  width: 30px;
  height: 22px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.flag-wrap { position: relative; display: inline-flex; }
.flag-fallback {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 22px;
  background: var(--surface-high);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-size: .6rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Score inputs */
.match-score {
  width: 46px !important;
  min-width: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 8px 4px !important;
  border-radius: var(--radius-xs) !important;
  margin: 0 !important;
}

/* Winner picker (tie breaker) */
.winner-picker { display: none; margin-top: 12px; }
.winner-picker.is-visible { display: block; }
.winner-picker label { font-size: .8rem; margin-bottom: 4px; color: var(--warn); }
.winner-picker select { margin-bottom: 0; border-color: rgba(245,158,11,.35); }
.winner-picker select:focus { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(245,158,11,.15); }

/* Mejor jugador del partido (MOTM) */
.motm-picker { margin-top: 14px; padding: 10px 12px; background: rgba(124,179,45,.06); border: 1px solid rgba(124,179,45,.18); border-radius: 8px; }
.motm-picker--locked { opacity: .65; pointer-events: none; }
.motm-label { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--logg-green); margin-bottom: 6px; }
.motm-picker .best-player-select { width: 100%; margin: 0; }
.admin-best-player-select { font-size: .75rem; }

/* Knockout states */
.k-team-win { color: var(--logg-green) !important; }
.winner-ready { border-left: 2px solid rgba(124,179,45,.35); }
.invalid-tie .match-score { border-color: rgba(239,68,68,.5) !important; }

#knockout-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.28);
  color: #fca5a5;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 12px;
}

/* Sticky save button */
.sticky-actions {
  position: sticky;
  bottom: 0;
  padding: 16px 0 20px;
  background: linear-gradient(to top, #030303 60%, transparent);
  text-align: center;
  z-index: 10;
}

/* Progress bar (legacy groups) */
#progress-bar-wrap {
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}
#progress-bar {
  height: 100%;
  background: var(--logg-green);
  border-radius: 99px;
  transition: width .4s ease;
  width: 0%;
}
#progress-text { font-size: .83rem; color: var(--text-muted); margin-bottom: 6px; }

/* =========================================================
   PÁGINA: RANKING
   ========================================================= */
.ranking-hero { border-color: var(--logg-green-border); }
.ranking-hero h2 { font-size: 1.5rem; }

.ranking-card { padding: 0; overflow: hidden; }

.ranking-table { width: 100%; }
.ranking-table th { padding: 12px 16px; }
.ranking-table td { padding: 11px 16px; }

.ranking-position {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 800;
  background: var(--surface-mid);
  color: var(--text-dim);
}

/* Top 3 destacados */
.ranking-top-1 { background: rgba(124,179,45,.07) !important; }
.ranking-top-1 td { color: var(--text) !important; font-weight: 700; }
.ranking-top-1 .ranking-position {
  background: var(--logg-green);
  color: #000;
  box-shadow: 0 0 14px var(--logg-green-glow);
}
.ranking-top-2 td { color: var(--text); }
.ranking-top-2 .ranking-position { background: #b8b8b8; color: #000; }
.ranking-top-3 .ranking-position { background: #c47f32; color: #000; }

/* =========================================================
   PÁGINA: ADMIN LOGIN
   ========================================================= */
.admin-login-wrap {
  display: flex;
  min-height: calc(100vh - 80px);
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.admin-login-card {
  width: 100%;
  max-width: 400px;
  margin: 0 !important;
  border-color: var(--logg-green-border);
  padding: 36px;
}
.admin-login-card h2 { margin-bottom: 6px; }
.admin-login-card .section-lead { margin-bottom: 22px; }

/* =========================================================
   ADMIN: DASHBOARD
   ========================================================= */
.admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border-color: var(--line);
}
.admin-panel-hero { border-color: var(--logg-green-border); }
.admin-panel-hero p.section-lead { margin-bottom: 20px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.stat-card {
  background: var(--surface-mid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}
.stat-card:hover { border-color: var(--logg-green-border); transform: translateY(-2px); }
.stat-card span {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.stat-card strong {
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--logg-green);
  line-height: 1;
}

/* =========================================================
   ADMIN: BRACKET / CRUCES
   ========================================================= */
.round32-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.admin-match-card {
  background: var(--surface-mid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color var(--transition);
}
.admin-match-card:hover { border-color: var(--logg-green-border); }
.admin-match-card .kicker { margin-bottom: 10px; }
.admin-match-grid { display: grid; gap: 10px; }
.admin-match-grid label { font-size: .8rem; }
.admin-match-grid select,
.admin-match-grid input { margin-bottom: 0; }

.team-palette { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-mid);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  padding: 5px 11px;
  font-size: .78rem;
  font-weight: 600;
  cursor: grab;
  color: var(--text-muted);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  user-select: none;
}
.team-chip:hover { background: rgba(124,179,45,.12); border-color: var(--logg-green-border); color: var(--text); }
.team-chip.is-dragging { opacity: .45; cursor: grabbing; }
.team-chip .flag { width: 20px; height: 15px; }

.bracket-actions { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

.round-status-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.round-status-form select,
.round-status-form input[type="datetime-local"] {
  width: auto;
  flex: 1;
  min-width: 110px;
  margin-bottom: 0;
  font-size: .82rem;
  padding: 8px 10px;
}
.round-status-form .btn-secondary { padding: 8px 14px; font-size: .82rem; }

/* =========================================================
   ADMIN: TABLAS Y FORMULARIOS INLINE
   ========================================================= */
.admin-real-inline,
.knockout-result-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-real-inline input[type="number"],
.knockout-result-form input[type="number"] {
  width: 62px;
  flex: 0 0 62px;
  text-align: center;
  margin-bottom: 0;
  padding: 8px 6px;
}
.admin-real-inline select,
.knockout-result-form select {
  flex: 1;
  min-width: 110px;
  margin-bottom: 0;
}
.admin-real-inline .btn-primary,
.knockout-result-form .btn-primary { padding: 8px 14px; font-size: .82rem; white-space: nowrap; }

.inline-edit-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-edit-form input {
  flex: 1;
  min-width: 80px;
  margin-bottom: 0;
  font-size: .82rem;
  padding: 8px 10px;
}
.inline-edit-form .btn-secondary { padding: 8px 14px; font-size: .82rem; }

/* =========================================================
   VERIFY PDF
   ========================================================= */
.verify-card { max-width: 560px; margin: 40px auto; border-color: var(--logg-green-border); }
.verify-card h2 { margin-bottom: 6px; }
.inline-form.verify-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin: 18px 0;
  flex-wrap: wrap;
}
.inline-form.verify-form label { margin-bottom: 5px; }
.inline-form.verify-form input { margin-bottom: 0; flex: 1; min-width: 180px; }
.inline-form.verify-form .btn-primary { flex-shrink: 0; padding: 10px 22px; }

.verification-result {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid;
}
.verification-result.ok {
  background: rgba(124,179,45,.07);
  border-color: var(--logg-green-border);
}
.verification-result h3 { color: var(--logg-green); margin-bottom: 14px; }
.verification-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin: 0;
}
.verification-grid > div { padding: 0; }
dt { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin-bottom: 2px; }
dd { margin: 0; font-weight: 600; color: var(--text); font-size: .9rem; }

/* =========================================================
   ANIMACIONES
   ========================================================= */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 820px) {
  .auth-layout.single-prode-auth { grid-template-columns: 1fr; }

  .participant-card {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .participant-card > a { grid-column: 1 / -1; }

  /* Ranking: ocultar Ganadores en tablet, mantener Puntaje visible */
  .ranking-table th:nth-child(4),
  .ranking-table td:nth-child(4) { display: none; }

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

@media (max-width: 600px) {
  /* kmatch-line: nueva estructura con .kmatch-scores wrapper */
  .kmatch-line { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; }
  .match-score { width: 40px !important; font-size: .92rem; }
  .team { font-size: .8rem; gap: 6px; }
  .flag, .flag-fallback { width: 24px; height: 18px; }

  .participant-card { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .round32-grid { grid-template-columns: 1fr; }
  .bracket-actions { flex-direction: column; }

  /* Ranking mobile: solo Pos / Nombre / Puntaje */
  .ranking-table th:nth-child(3),
  .ranking-table td:nth-child(3) { display: none; }

  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }
  .container { padding: 16px 14px 80px; }

  .admin-login-card { padding: 24px; }
}

/* =========================================================
   PREDICCIONES DEL DÍA — AUTOSAVE
   ========================================================= */
.autosave-bar {
  position: sticky;
  top: 62px;
  z-index: 150;
  padding: 8px 20px;
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid var(--line);
  transition: background var(--transition), color var(--transition);
}
.autosave-bar--saving { background: var(--surface-mid); color: var(--text-muted); }
.autosave-bar--ok     { background: rgba(124,179,45,.12); color: var(--logg-green); }
.autosave-bar--error  { background: rgba(239,68,68,.1); color: #f87171; }
.autosave-bar--idle   { background: var(--surface-mid); color: var(--text-dim); }

.day-match { position: relative; }
.match-hour { font-weight: 700; font-size: .88rem; color: var(--text); }
.match-phase-tag {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-left: 6px;
  letter-spacing: .04em;
}
.match-locked-msg {
  font-size: .75rem;
  color: var(--text-dim);
  margin: 8px 0 0;
  padding: 6px 10px;
  background: var(--surface-mid);
  border-radius: var(--radius-xs);
  text-align: center;
}
.match-save-indicator {
  font-size: .72rem;
  min-height: 16px;
  margin-top: 6px;
  text-align: right;
  transition: color var(--transition);
}
.si-saving { color: var(--text-dim); }
.si-ok     { color: var(--logg-green); }
.si-error  { color: #f87171; }
.si-warn   { color: var(--warn); }
.toast-error {
  background: rgba(239,68,68,.15) !important;
  border-color: rgba(239,68,68,.3) !important;
  color: #fca5a5 !important;
}

/* =========================================================
   MÉTRICAS ADMIN
   ========================================================= */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.metric-card {
  background: var(--surface-mid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  text-align: center;
  transition: border-color var(--transition);
}
.metric-card:hover { border-color: var(--logg-green-border); }
.metric-card .m-label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.metric-card .m-value {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--logg-green);
  line-height: 1;
}
.metric-card.m-online { border-color: var(--logg-green-border); background: rgba(124,179,45,.07); }
.metric-card.m-online .m-value { font-size: 2.4rem; }

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.chart-card h3 { font-size: .9rem; margin-bottom: 14px; color: var(--text-muted); }
.chart-card canvas { max-height: 200px; }

.last-active-table { font-size: .82rem; }
.last-active-table td:last-child { color: var(--text-dim); font-size: .75rem; }
.metric-refresh-btn {
  font-size: .75rem;
  padding: 4px 12px;
  float: right;
  margin-top: -4px;
}

@media (max-width: 700px) {
  .charts-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   AUTH PAGES
   ========================================================= */
.auth-page-wrap {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 80px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  margin: 0;
  animation: fade-up .3s ease both;
}
.auth-modal-box { max-width: 460px; padding: 28px 28px 32px; }

/* Auth tabs */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 4px;
  gap: 0;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 8px;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
}
.auth-tab.is-active, .auth-tab[aria-selected="true"] {
  color: var(--logg-green);
  border-bottom-color: var(--logg-green);
}
.auth-tab:hover:not(.is-active) { color: var(--text-muted); }
.auth-panel { padding-top: 4px; }
.auth-tab-switch {
  background: none; border: none;
  color: var(--logg-green); font-weight: 600; font-size: .82rem;
  cursor: pointer; padding: 0;
  font-family: inherit;
}
.auth-tab-switch:hover { opacity: .8; }
.auth-brand { display: block; text-decoration: none; }

/* Notice de validación de email en el registro */
.register-email-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(124,179,45,.08);
  border: 1px solid rgba(124,179,45,.25);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  margin-top: 14px;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.register-email-notice svg { color: var(--logg-green); }

/* Header indicator when user is logged in */
.topbar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .85rem;
}
.topbar-user-name {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.topbar-user-name strong { color: var(--text); }

@media (max-width: 600px) {
  .auth-card { padding: 26px 20px; }
  .topbar-user-name { display: none; }
}

/* =========================================================
   TOPBAR — LANDING NAV
   ========================================================= */
.topbar-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.topbar-nav-link {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.topbar-nav-link:hover { color: var(--logg-green); opacity: 1; }
.btn-sm { padding: 8px 18px !important; font-size: .82rem !important; }
.btn-lg { padding: 14px 32px !important; font-size: 1rem !important; }
.btn-xl { padding: 18px 48px !important; font-size: 1.1rem !important; font-weight: 800 !important; }

/* =========================================================
   MODAL
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal-box {
  position: relative;
  background: var(--surface-mid);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 36px 32px;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(20px) scale(.97);
  transition: transform .3s ease;
}
.modal-overlay.is-open .modal-box { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 16px; right: 18px;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 1.4rem; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--surface-high); }
.modal-title { font-size: 1.5rem; font-weight: 900; margin: 4px 0 6px; }
.modal-sub { color: var(--text-muted); font-size: .9rem; margin-bottom: 22px; }
.modal-sep {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 18px; color: var(--text-dim); font-size: .8rem;
}
.modal-sep::before, .modal-sep::after {
  content: ''; flex: 1; height: 1px; background: var(--line-strong);
}

/* =========================================================
   LANDING — HERO
   ========================================================= */
.is-landing body, .is-landing .app-shell { background: var(--bg); }

.hero-section {
  position: relative;
  min-height: 100vh;
  margin-top: -62px; /* pull behind sticky header */
  padding-top: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #061003 0%, #030303 60%);
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-video {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  /* Cover all viewports regardless of aspect ratio */
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(3,3,3,.25) 0%,
    rgba(3,3,3,.60) 55%,
    rgba(3,3,3,.96) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
  padding: 0 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.hero-logo {
  height: 140px;
  width: auto;
  max-width: 420px;
  margin-bottom: 28px;
  object-fit: contain;
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 18px;
  color: #fff;
}
.hero-title-accent { color: var(--logg-green); display: block; }
.hero-sub {
  font-size: clamp(.95rem, 2.2vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 580px;
  line-height: 1.6;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.d-none-mobile { display: inline; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  animation: scroll-bounce 2s ease infinite;
  transition: color var(--transition);
}
.scroll-indicator:hover { color: var(--logg-green); opacity: 1; }
.scroll-dot { animation: scroll-drop 2s ease infinite; }
@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}
@keyframes scroll-drop {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50%       { opacity: .3; transform: translateY(4px); }
}

/* =========================================================
   LANDING — SECCIONES
   ========================================================= */
.landing-section {
  padding: 96px 24px;
  background: var(--bg);
}
.landing-section--alt { background: #0a0a0a; }
.landing-inner { max-width: 1100px; margin: 0 auto; }

.section-head { margin-bottom: 52px; }
.section-label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--logg-green);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: 14px;
  color: var(--text);
}
.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
}

/* ===== STEPS ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px 24px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.step-card:hover {
  border-color: var(--logg-green-border);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.step-icon {
  width: 46px; height: 46px;
  background: rgba(124,179,45,.1);
  border: 1px solid var(--logg-green-border);
  border-radius: 14px;
  display: grid; place-items: center;
  color: var(--logg-green);
  margin-bottom: 20px;
}
.step-num {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--logg-green);
  margin-bottom: 10px;
}
.step-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; }
.step-text { font-size: .88rem; color: var(--text-muted); line-height: 1.55; }

/* ===== PRIZES ===== */
.prizes-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
  margin-bottom: 48px;
}
/* ── Prizes carousel ─────────────────────────────────────────────── */
.prizes-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 16px;
}
.prizes-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  flex: 1;
  padding: 8px 4px 16px;
}
.prizes-carousel::-webkit-scrollbar { display: none; }

.prizes-arrow {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface-mid);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition);
  z-index: 2;
}
.prizes-arrow:hover { background: var(--logg-green-border); border-color: var(--logg-green); color: var(--logg-green); }
.prizes-arrow--prev { margin-right: 8px; }
.prizes-arrow--next { margin-left: 8px; }

.prizes-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 32px;
}
.prizes-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--surface-high);
  border: 1px solid var(--line-strong);
  transition: background var(--transition), border-color var(--transition);
  cursor: pointer;
}
.prizes-dot.active {
  background: var(--logg-green);
  border-color: var(--logg-green);
}

.prize-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  scroll-snap-align: start;
  flex: 0 0 calc(33.333% - 14px);  /* 3 visibles en desktop */
  min-width: 240px;
}
.prize-card:hover { border-color: var(--logg-green-border); transform: translateY(-5px); }

@media (max-width: 900px) {
  .prize-card { flex: 0 0 calc(50% - 10px); }   /* 2 visibles en tablet */
}
@media (max-width: 580px) {
  .prize-card { flex: 0 0 calc(85vw); }           /* 1 visible en mobile */
  .prizes-arrow { width: 32px; height: 32px; font-size: 1.1rem; }
}
.prize-img {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #0d1a07, #111);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line);
}
.prize-medal {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.4rem; font-weight: 900;
  border: 2px solid;
}

/* Prize con imagen real */
.prize-img--photo {
  background: #0a0a0a;
  padding: 0;
}
.prize-img--photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 16px;
  box-sizing: border-box;
}
.prize-medal--gold   { background: rgba(255,200,0,.12); border-color: rgba(255,200,0,.5); color: #ffd700; }
.prize-medal--silver { background: rgba(192,192,192,.1); border-color: rgba(192,192,192,.4); color: #c0c0c0; }
.prize-medal--bronze { background: rgba(205,127,50,.1); border-color: rgba(205,127,50,.4); color: #cd7f32; }
.prize-body { padding: 20px; }
.prize-pos { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .1em; color: var(--logg-green); margin-bottom: 6px; text-transform: uppercase; }
.prize-name { font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }
.prize-desc { font-size: .85rem; color: var(--text-muted); }

/* ── Marcas en el hero ───────────────────────────────────────────────── */
.hero-brands {
  width: 100%;
  max-width: 860px;
  margin: 22px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hero-brands-label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin: 0;
  text-align: center;
}
.hero-ticker-outer {
  /* Sin cápsula, sin máscara — fila limpia */
  background: none;
  border: none;
  border-radius: 0;
  padding: 0 32px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  overflow: visible;
}
/* Logos estáticos en el hero: una sola fila, sin animación */
.hero-ticker-outer .sponsors-ticker-track {
  animation: none;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 28px;
  width: auto;
}
.hero-ticker-outer .ticker-logo {
  height: 28px;
  max-width: 110px;
}
.hero-ticker-outer .ticker-logo[alt="Fantech"]  { height: 40px; }
.hero-ticker-outer .ticker-logo[alt="Gigabyte"] { height: 72px; filter: invert(1) grayscale(1) brightness(1.4); }

/* Link wrapper de cada sponsor */
.sponsor-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform .25s ease, opacity .25s ease;
}
.sponsor-link:hover { transform: scale(1.1); opacity: 1; }

/* ── Instagram en el hero ────────────────────────────────────────────── */
.hero-ig {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hero-ig-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}

/* ── Banner cuenta pendiente de verificación ─────────────────────────── */
.pending-verification-banner {
  position: relative; z-index: 10;
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.35);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0 auto 8px;
  max-width: 900px; width: calc(100% - 32px);
  color: var(--text); font-size: .88rem; line-height: 1.5;
}
.pending-verification-banner svg { color: #f59e0b; margin-top: 2px; flex-shrink: 0; }
.pending-resend-btn {
  margin-left: auto; white-space: nowrap; flex-shrink: 0; align-self: center;
  font-size: .8rem !important; padding: 7px 14px !important;
}
@media (max-width: 640px) {
  .pending-verification-banner { flex-direction: column; gap: 10px; }
  .pending-resend-btn { margin-left: 0; width: 100%; text-align: center; }
}

/* ── Instagram CTA (versión sección premios — ya no se usa) ──────────── */
.ig-cta-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 16px;
}
.ig-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid rgba(225,48,108,.35);
  border-radius: 99px;
  color: rgba(225,48,108,.8);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .02em;
  background: rgba(225,48,108,.06);
  transition: background .25s ease, border-color .25s ease,
              color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.ig-btn:hover {
  background: rgba(225,48,108,.15);
  border-color: rgba(225,48,108,.7);
  color: #e1306c;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px rgba(225,48,108,.2);
  opacity: 1;
}
.ig-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.ig-verified {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-left: -2px;
}

/* ── Sponsors ticker (carrusel infinito) ──────────────────────────────── */
.sponsors-ticker-wrap {
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.sponsors-ticker-label {
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 18px;
}
.sponsors-ticker-outer {
  overflow: hidden;
  /* Fade lateral para que el deslizamiento se vea limpio */
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}
.sponsors-ticker-track {
  display: flex;
  align-items: center;
  gap: 52px;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
}
/* Pausar al hover para accesibilidad */
.sponsors-ticker-outer:hover .sponsors-ticker-track {
  animation-play-state: paused;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-logo {
  height: 34px;
  width: auto;
  max-width: 140px;
  display: block;
  flex-shrink: 0;
  opacity: .7;
  mix-blend-mode: screen;   /* elimina fondos claros sobre fondo oscuro */
  filter: grayscale(1) brightness(1.4);
  transition: opacity .3s ease, filter .3s ease;
  object-fit: contain;
}
.sponsors-ticker-outer:hover .ticker-logo {
  opacity: 1;
  filter: grayscale(0) brightness(1);
}
/* Logo con texto oscuro sobre fondo claro: invertir para que sea blanco sobre oscuro */
.ticker-logo[alt="Gigabyte"] {
  height: 110px;
  filter: invert(1) grayscale(1) brightness(1.4);
}
.ticker-logo[alt="Fantech"] {
  height: 72px;
}

/* Sponsor logo estático (se usa fuera del ticker si hace falta) */
.sponsor-logo {
  height: 32px;
  width: auto;
  display: block;
  opacity: .65;
  transition: opacity var(--transition), filter var(--transition), transform var(--transition);
}
.sponsor-logo:hover {
  opacity: 1;
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(124,179,45,.4));
  transform: scale(1.05);
}

/* ===== HOME RANKING ===== */
.home-ranking-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.home-ranking-table { width: 100%; border-collapse: collapse; }
.home-ranking-table th {
  font-size: .72rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--logg-green);
  padding: 12px 18px; border-bottom: 1px solid var(--line-strong);
  background: var(--surface-mid); text-align: left;
}
.home-ranking-table td {
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  color: var(--text-muted); font-size: .9rem;
  transition: background var(--transition);
}
.home-ranking-table tr:last-child td { border-bottom: none; }
.home-ranking-table tr:hover td { background: rgba(255,255,255,.03); }

.r-top-1 td { color: var(--text); font-weight: 700; }
.r-top-1:hover td { background: rgba(124,179,45,.06) !important; }
.r-top-2 td { color: var(--text); }
.r-top-3 td { color: var(--text); }

.r-pos {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: .78rem; font-weight: 800;
  background: var(--surface-mid); color: var(--text-dim);
}
.r-pos--1 { background: var(--logg-green); color: #000; box-shadow: 0 0 12px var(--logg-green-glow); }
.r-pos--2 { background: #b8b8b8; color: #000; }
.r-pos--3 { background: #c47f32; color: #000; }
.r-pts { text-align: right; font-weight: 800; color: var(--logg-green) !important; }
.r-name { font-weight: 600; color: var(--text) !important; }

.ranking-empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: .9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ranking-cta { padding: 20px; text-align: center; border-top: 1px solid var(--line); }

/* ===== SCORING ===== */
.scoring-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
}
.scoring-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}
.scoring-card:hover { border-color: var(--logg-green-border); transform: translateY(-4px); }
.scoring-icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid; place-items: center;
  margin: 0 auto 16px;
  border: 1px solid;
}
.scoring-icon--green  { background: rgba(124,179,45,.12); border-color: var(--logg-green-border); color: var(--logg-green); }
.scoring-icon--dim    { background: rgba(255,255,255,.05); border-color: var(--line-strong); color: var(--text-muted); }
.scoring-icon--danger { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.25); color: #f87171; }
.scoring-pts { font-size: 3rem; font-weight: 900; line-height: 1; color: var(--logg-green); margin-bottom: 8px; }
.scoring-pts--dim  { color: var(--text-muted); }
.scoring-pts--zero { color: var(--text-dim); }
.scoring-main-label { font-size: .95rem; font-weight: 800; margin-bottom: 8px; }
.scoring-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }

/* ===== CTA ===== */
.cta-section {
  position: relative;
  overflow: hidden;
  padding: 110px 24px;
  background: #050f03;
  border-top: 1px solid rgba(124,179,45,.2);
  border-bottom: 1px solid rgba(124,179,45,.2);
  text-align: center;
}
.cta-glow {
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(circle, rgba(124,179,45,.14) 0%, transparent 65%);
  pointer-events: none;
}
.cta-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.cta-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto; margin-right: auto;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #020202;
  border-top: 1px solid var(--line);
  padding: 40px 24px 32px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-logo { height: 44px; width: auto; max-width: 160px; object-fit: contain; opacity: .7; }
.footer-nav { display: flex; gap: 20px; margin-left: auto; }
.footer-nav a { font-size: .85rem; color: var(--text-dim); text-decoration: none; transition: color var(--transition); }
.footer-nav a:hover { color: var(--logg-green); }
.footer-copy { width: 100%; font-size: .72rem; color: var(--text-dim); margin: 12px 0 0; }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* =========================================================
   LANDING — RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .prizes-grid { grid-template-columns: 1fr 1fr; }
  .scoring-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
  .prizes-grid .prize-card:last-child { display: none; } /* hide 3rd on tablet */
}

@media (max-width: 640px) {
  .steps-grid { grid-template-columns: 1fr; }
  .prizes-grid { grid-template-columns: 1fr; }
  .prizes-grid .prize-card:last-child { display: block; }
  .hero-title { font-size: 2rem; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary { width: 100%; justify-content: center; }
  .topbar-nav-link { display: none; }
  .landing-section { padding: 64px 18px; }
  .hide-mobile { display: none; }
  .section-title { font-size: 1.7rem; }
  .d-none-mobile { display: none; }
  .footer-nav { margin-left: 0; }
  .scoring-grid { max-width: 100%; }
}

/* =========================================================
   RESPONSIVE AUDIT — FIXES GLOBALES
   Auditado 2026-06-27. No rompe funcionalidades existentes.
   ========================================================= */

/* ── 1. iOS ZOOM PREVENTION — inputs mínimo 16px ────────── */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="date"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  input[type="datetime-local"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ── 2. TABLAS — overflow horizontal global ──────────────── */
.table-wrap,
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table,
.table-responsive table { min-width: 480px; }

/* Tablas de admin que no tienen wrapper */
@media (max-width: 768px) {
  .card > table,
  section.card table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

/* ── 3. LOGO BRAND — demasiado ancho en 320px ───────────── */
@media (max-width: 360px) {
  .brand-logo { height: 36px; max-width: 140px; }
  .topbar { padding: 0 12px; }
  .brand { height: 54px; }
}

/* ── 4. HERO BRANDS — logos sin mascara lateral ─────────── */
.hero-ticker-outer {
  mask-image: none !important;
  -webkit-mask-image: none !important;
  overflow: visible !important;
}

/* ── 5. AUTH PAGES — espaciado en pantallas muy pequeñas ── */
@media (max-width: 360px) {
  .auth-page-wrap { padding: 20px 12px 60px; }
  .auth-card { padding: 22px 16px; }
  .modal-box { padding: 20px 16px 24px; }
  .auth-modal-box { max-width: calc(100vw - 24px); padding: 20px 16px; }
}

/* ── 6. FIXTURE — cards de partido en mobile ─────────────── */
@media (max-width: 480px) {
  .participant-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    min-width: 0;
  }

  .participant-card > div {
    min-width: 0;
  }

  .participant-card > a {
    width: 100%;
    text-align: center;
  }

  .participant-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
  }

  .participant-actions a {
    flex: 1;
    text-align: center;
    min-width: 0;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-inline: 14px;
  }

  .card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .fixture-info-card {
    padding: 14px 16px 12px;
    border-radius: 12px;
  }

  .fixture-info-text {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .kmatch {
    padding: 12px 14px;
  }

  .match-head {
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
  }

  .match-meta-right {
    flex-wrap: wrap;
    gap: 4px;
  }

  .kmatch-line {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center !important;
    gap: 8px;
    width: 100%;
  }

  .kmatch-team-a,
  .kmatch-team-b {
    width: auto !important;
    min-width: 0;
    display: flex;
    align-items: center !important;
  }

  .kmatch-team-a {
    justify-content: flex-end;
    text-align: left;
  }

  .kmatch-team-b {
    justify-content: flex-end;
    text-align: right;
  }

  .kmatch-team-a .team,
  .kmatch-team-b .team,
  .kmatch-team-b.team--away .team {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
  }

  .kmatch-team-a .team {
    flex-direction: row !important;
    justify-content: flex-end;
  }

  .kmatch-team-b .team,
  .kmatch-team-b.team--away .team {
    flex-direction: row-reverse !important;
    justify-content: flex-start;
  }

  .kmatch-scores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .match-score {
    width: 44px !important;
    height: 38px !important;
    min-width: 44px !important;
    font-size: 1rem !important;
    padding: 8px 4px !important;
    text-align: center;
  }

  .kmatch-sep {
    font-size: 1rem;
    color: var(--text-muted);
  }

  .team {
    font-size: .84rem;
    line-height: 1.15;
  }

  .team span {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.15;
  }

  .flag,
  .flag-fallback {
    width: 22px;
    height: 16px;
    flex: 0 0 auto;
  }

  .winner-picker label {
    font-size: .82rem;
  }

  .winner-picker select {
    width: 100%;
  }

  .knockout-round {
    border-radius: 12px;
  }

  .round-header {
    padding: 12px 14px;
  }

  .round-header h3 {
    font-size: .95rem;
  }

  .topbar-user {
    gap: 6px;
  }

  .topbar-user-name {
    display: none;
  }

  .topbar-user .btn-secondary {
    padding: 5px 10px !important;
    font-size: .72rem !important;
    white-space: nowrap;
  }

  .brand-logo {
    height: 38px;
    max-width: 130px;
  }

  .card p,
  .card span,
  .section-lead {
    overflow-wrap: anywhere;
  }
}

/* ── 7. RANKING PÚBLICO — tabla mobile ───────────────────── */
@media (max-width: 640px) {
  .ranking-card { padding: 0; overflow-x: auto; }
  .ranking-table th, .ranking-table td { padding: 8px 10px; font-size: .8rem; }
  .ranking-position { width: 24px; height: 24px; font-size: .72rem; }
  .r-pos { width: 24px; height: 24px; font-size: .72rem; }
}

/* ── 8. ADMIN DASHBOARD — métricas y charts ─────────────── */
@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { padding: 14px 10px; }
  .metric-card .m-value { font-size: 1.6rem; }
  .stat-card strong { font-size: 1.6rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .admin-quick-actions { gap: 6px; }
  .admin-quick-actions .btn-secondary { padding: 7px 12px !important; font-size: .78rem !important; }
}
@media (max-width: 360px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── 9. ADMIN BRACKET — cruces en mobile ─────────────────── */
@media (max-width: 640px) {
  .round32-grid { grid-template-columns: 1fr; }
  .bracket-actions { flex-direction: column; gap: 8px; }
  .bracket-actions .btn-secondary,
  .bracket-actions .btn-primary { width: 100%; }
  .team-palette { gap: 6px; }
  .team-chip { padding: 4px 8px; font-size: .72rem; }
  .round-status-form {
    flex-direction: column;
    align-items: stretch;
  }
  .round-status-form select,
  .round-status-form input[type="datetime-local"] {
    width: 100%;
    min-width: 0;
  }
}

/* ── 10. ADMIN RESULTADOS — inline forms mobile ──────────── */
@media (max-width: 640px) {
  .admin-real-inline,
  .knockout-result-form {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-real-inline input[type="number"],
  .knockout-result-form input[type="number"] {
    width: 100%;
    flex: unset;
  }
  .admin-real-inline select,
  .knockout-result-form select {
    width: 100%;
  }
  .admin-real-inline .btn-primary,
  .knockout-result-form .btn-primary {
    width: 100%;
  }
  .inline-edit-form { flex-direction: column; align-items: stretch; }
  .inline-edit-form input { width: 100%; }
}

/* ── 11. VERIFY PDF — mobile ─────────────────────────────── */
@media (max-width: 640px) {
  .verify-card { margin: 16px auto; }
  .inline-form.verify-form { flex-direction: column; }
  .inline-form.verify-form input { width: 100%; min-width: 0; }
  .inline-form.verify-form .btn-primary { width: 100%; }
  .verification-grid { grid-template-columns: 1fr; }
}

/* ── 12. HERO BRANDS — sponsor logos responsive ─────────── */
@media (max-width: 768px) {
  .hero-brands { max-width: 100%; padding: 0 8px; }
  .hero-ticker-outer .sponsors-ticker-track { gap: 16px; }
  .hero-ticker-outer .ticker-logo { height: 20px; max-width: 70px; }
  .hero-ticker-outer .ticker-logo[alt="Fantech"]  { height: 30px; }
  .hero-ticker-outer .ticker-logo[alt="Gigabyte"] { height: 56px; }
}
@media (max-width: 480px) {
  .hero-ticker-outer .sponsors-ticker-track {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 20px;
  }
  .hero-ticker-outer .ticker-logo { height: 18px; max-width: 60px; }
  .hero-ticker-outer .ticker-logo[alt="Fantech"]  { height: 26px; }
  .hero-ticker-outer .ticker-logo[alt="Gigabyte"] { height: 46px; }
}

/* ── 13. INSTAGRAM BTN — mobile ──────────────────────────── */
@media (max-width: 480px) {
  .ig-btn { padding: 10px 18px; font-size: .82rem; }
  .ig-icon { width: 22px; height: 22px; }
  .hero-ig-label { font-size: .62rem; }
}

/* ── 14. MODAL — mobile extremo ──────────────────────────── */
@media (max-width: 400px) {
  .modal-overlay { padding: 12px; }
  .auth-modal-box { border-radius: 16px; }
  .auth-tabs .auth-tab { font-size: .8rem; padding: 8px 4px; }
}

/* ── 15. FOOTER — mobile ─────────────────────────────────── */
@media (max-width: 640px) {
  .site-footer { padding: 28px 16px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-nav { flex-wrap: wrap; gap: 12px; margin-left: 0; }
  .footer-copy { margin-top: 4px; }
}

/* ── 16. CONTAINERS — no overflow horizontal ─────────────── */
html, body { overflow-x: hidden; }
.app-shell { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* ── 17. 768px — tablet portrait ─────────────────────────── */
@media (max-width: 768px) {
  .auth-layout.single-prode-auth { grid-template-columns: 1fr; }
  .participant-card { grid-template-columns: 1fr 1fr; gap: 12px; }
  .participant-card > a { grid-column: 1 / -1; width: 100%; }
  .admin-match-card { padding: 12px; }
  .round32-grid { grid-template-columns: 1fr 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card canvas { max-height: 180px; }
  /* Admin quick actions wrap */
  .admin-quick-actions { flex-wrap: wrap; }
}

/* ── 18. TOPBAR mobile — solo logo + btn participar ─────── */
@media (max-width: 500px) {
  .topbar-nav { gap: 8px; }
  .topbar-user-name { display: none; }
  .topbar-user { gap: 8px; }
  .topbar-user .btn-secondary { padding: 6px 10px !important; font-size: .75rem !important; }
}

/* =========================================================
   FIXTURE — KMATCH LINE (desktop: horizontal / mobile: vertical)
   ========================================================= */

/* Desktop: equipo | scores | equipo */
.kmatch-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.kmatch-scores {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.kmatch-sep { color: var(--text-dim); font-size: .9rem; }
.kmatch-team-a .team { justify-content: flex-end; }
.kmatch-team-b .team { justify-content: flex-end; flex-direction: row-reverse; }

/* ── FIXTURE — INFO CARD ───────────────────────────────── */
.fixture-info-card {
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
.fixture-info-text {
  font-size: .9rem;
  color: var(--text-muted);
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* ── FIXTURE SPONSORS BAR ────────────────────────────────── */
.fixture-sponsors-bar {
  margin-top: 32px;
  padding: 20px 0 8px;
  border-top: 1px solid var(--line);
}
.fixture-sponsors-label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 12px;
}
.fixture-ticker-outer {
  /* Ticker con movimiento para la vista de fixture */
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ── 19. BASES Y CONDICIONES — nested lists mobile ───────── */
@media (max-width: 480px) {
  .card > ul { padding-left: 14px; }
  .card > ul ul { padding-left: 12px; }
}
