/* =============================================
   MrBets — Futuristic Neon Style
   Rosa #FF2D78 · Celeste #00F0FF
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800;900&display=swap');

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

:root {
  --pink:        #FF2D78;
  --pink-dim:    rgba(255, 45, 120, 0.28);
  --pink-glow:   rgba(255, 45, 120, 0.7);
  --cyan:        #00F0FF;
  --cyan-dim:    rgba(0, 240, 255, 0.2);
  --cyan-glow:   rgba(0, 240, 255, 0.65);
  --bg:          #06080f;
  --bg-card:     rgba(8, 12, 24, 0.9);
  --bg-row:      rgba(255, 255, 255, 0.03);
  --text:        #f0f4ff;
  --text-muted:  rgba(180, 200, 240, 0.5);
  --border-pink: rgba(255, 45, 120, 0.6);
  --border-cyan: rgba(0, 240, 255, 0.55);
  --border-dim:  rgba(255, 255, 255, 0.09);
  --gold:        #FFD700;
  --silver:      #C0C0C0;
  --bronze:      #CD7F32;
  --font:        'Outfit', sans-serif;
  --radius:      12px;
}

html { scroll-behavior: smooth; }


/* ── FONDO con grilla ciberpunk ── */
body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(255,45,120,0.2) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(0,240,255,0.16) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(130,0,255,0.07) 0%, transparent 60%),
    linear-gradient(rgba(0,240,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.08) 1px, transparent 1px);
  background-size: auto, auto, auto, 48px 48px, 48px 48px;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: rgba(4, 6, 14, 0.95);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0,240,255,0.18);
  box-shadow: 0 1px 32px rgba(0,0,0,0.5);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 32px;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 24px;
}

/* Izquierda: brand */
.header-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mrbets-name {
  font-family: 'Lilita One', cursive;
  display: flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
}

.mb-mr {
  font-size: 1.1rem;
  color: #00F0FF;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px rgba(0,240,255,0.8);
}

.mb-bets {
  font-size: 1.9rem;
  color: #FF2D78;
  letter-spacing: 0.01em;
  text-shadow: 0 0 12px rgba(255,45,120,0.8);
}

/* Centro: logo */
.header-logo-img {
  height: 64px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  animation: logo-slide-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  filter: drop-shadow(0 0 4px rgba(255,45,120,0.2));
  transition: filter 0.2s, transform 0.2s;
}

@keyframes logo-slide-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.header-logo-img:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 0 8px rgba(255,45,120,0.35));
}

/* Derecha */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

/* Stake partner */
.stake-partner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.partner-label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.stake-logo-img {
  width: 100px;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  overflow: hidden;
}

/* Separador vertical */
.header-sep {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* Botón + código */
.jugar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.registro-code {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(180,200,240,0.5);
  white-space: nowrap;
  margin-bottom: 2px;
}

.registro-code strong {
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: 0 0 6px rgba(0,240,255,0.5);
}

/* JUGAR button */
.jugar-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 30px;
  background: linear-gradient(135deg, var(--pink) 0%, #c4006a 100%);
  color: #fff;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 32px var(--pink-glow), 0 0 60px rgba(255,45,120,0.25), 0 4px 16px rgba(0,0,0,0.4);
  transition: transform 0.15s, box-shadow 0.2s;
  animation: btn-pulse 2.5s ease-in-out infinite;
}

.jugar-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px var(--pink-glow), 0 6px 20px rgba(0,0,0,0.4);
}

.jugar-shine {
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shine 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shine {
  0%   { left: -100%; }
  55%  { left: 160%; }
  100% { left: 160%; }
}

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 28px var(--pink-glow), 0 0 55px rgba(255,45,120,0.2), 0 4px 16px rgba(0,0,0,0.4); }
  50%       { box-shadow: 0 0 48px rgba(255,45,120,0.85), 0 0 80px rgba(255,45,120,0.3), 0 4px 16px rgba(0,0,0,0.4); }
}

/* =============================================
   SEPARADOR ANIMADO
   ============================================= */
.cyber-divider {
  position: relative;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,240,255,0.15) 30%,
    rgba(255,45,120,0.15) 70%,
    transparent 100%);
  overflow: hidden;
  flex-shrink: 0;
}

.cyber-divider::after {
  content: '';
  position: absolute;
  top: 0;
  left: -35%;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #00F0FF, #FF2D78, transparent);
  animation: divider-scan 2.8s ease-in-out infinite;
}

@keyframes divider-scan {
  0%   { left: -35%; opacity: 1; }
  70%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* =============================================
   EFECTO DE ENTRADA LEADERBOARD
   ============================================= */
@keyframes lb-slide-in {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* =============================================
   LAYOUT
   ============================================= */
.site-main {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 16px 56px;
}

.single-col {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.col-left { display: flex; flex-direction: column; gap: 16px; }

/* =============================================
   SUBTITLE BAR — PRIZE POOL
   ============================================= */
.subtitle-bar {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg,
    rgba(255,215,0,0.09) 0%,
    rgba(255,140,0,0.06) 40%,
    rgba(8,12,24,0.92) 100%);
  border: 1px solid rgba(255,215,0,0.22);
  border-left: 3px solid #FFD700;
  border-radius: var(--radius);
  padding: 14px 24px;
  backdrop-filter: blur(16px);
  box-shadow:
    0 0 32px rgba(255,215,0,0.07),
    0 0 0 1px rgba(255,215,0,0.04),
    0 4px 20px rgba(0,0,0,0.45);
}

.subtitle-bar::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.1), transparent);
  animation: prize-shimmer 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes prize-shimmer {
  0%   { left: -60%; }
  100% { left: 130%; }
}

#sheet-subtitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.prize-pool-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,215,0,0.75);
}

.prize-pool-amount {
  font-size: 1.35rem;
  font-weight: 900;
  color: #FFD700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 0 12px rgba(255,215,0,0.85),
    0 0 30px rgba(255,215,0,0.3),
    0 0 2px rgba(255,215,0,0.9);
}

/* =============================================
   LEADERBOARD CARD
   ============================================= */
.leaderboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-pink);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(255,45,120,0.08),
    0 0 40px rgba(255,45,120,0.08),
    0 8px 32px rgba(0,0,0,0.5);
}

/* Tournament title row */
.tournament-title-row {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-dim);
  background: linear-gradient(90deg, rgba(255,45,120,0.1) 0%, transparent 80%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tournament-title-row::before {
  content: '◆';
  font-size: 0.65rem;
  color: var(--pink);
  filter: drop-shadow(0 0 4px var(--pink));
}

#tournament-title {
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: linear-gradient(90deg, var(--pink), #ff80ab);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px var(--pink-glow));
}

/* Leaderboard header */
.leaderboard-header-row {
  display: grid;
  grid-template-columns: 44px 1fr 120px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(0,0,0,0.3);
}

.lh-cell {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lh-cell.num-col { text-align: right; }

/* Leaderboard body */
.leaderboard-body { display: flex; flex-direction: column; }

.lb-row {
  display: grid;
  grid-template-columns: 44px 1fr 120px;
  padding: 11px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  align-items: center;
  transition: background 0.15s;
  position: relative;
}

.lb-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}

.lb-row:hover { background: rgba(255,255,255,0.035); }
.lb-row:hover::before { opacity: 1; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.lb-row:last-child { border-bottom: none; }

/* Top 3 highlights */
.lb-row.top-1 {
  background: linear-gradient(90deg, rgba(255,45,120,0.2) 0%, rgba(255,45,120,0.05) 55%, transparent 100%);
  box-shadow: inset 0 0 28px rgba(255,45,120,0.09);
  padding-top: 18px;
}
.lb-row.top-1::before { opacity: 1; background: var(--pink); box-shadow: 0 0 14px var(--pink), 0 0 4px var(--pink); width: 3px; }
.lb-row.top-1 .lb-name { color: #fff; text-shadow: 0 0 12px rgba(255,45,120,0.6); }

.lb-row.top-2 {
  background: linear-gradient(90deg, rgba(0,240,255,0.14) 0%, rgba(0,240,255,0.03) 55%, transparent 100%);
  box-shadow: inset 0 0 22px rgba(0,240,255,0.06);
}
.lb-row.top-2::before { opacity: 1; background: var(--cyan); box-shadow: 0 0 12px var(--cyan), 0 0 3px var(--cyan); width: 3px; }
.lb-row.top-2 .lb-name { text-shadow: 0 0 10px rgba(0,240,255,0.45); }

.lb-row.top-3 {
  background: linear-gradient(90deg, rgba(160,100,255,0.14) 0%, rgba(160,100,255,0.03) 55%, transparent 100%);
  box-shadow: inset 0 0 22px rgba(160,100,255,0.06);
}
.lb-row.top-3::before { opacity: 1; background: #a064ff; box-shadow: 0 0 12px #a064ff, 0 0 3px #a064ff; width: 3px; }
.lb-row.top-3 .lb-name { text-shadow: 0 0 10px rgba(160,100,255,0.45); }

/* 4to y 5to — plata fluorescente tenue */
.lb-row.mid-prize {
  background: linear-gradient(90deg, rgba(180,220,255,0.07) 0%, transparent 65%);
  box-shadow: inset 0 0 14px rgba(160,210,255,0.03);
}
.lb-row.mid-prize::before { opacity: 1; background: #b0d8ff; box-shadow: 0 0 7px rgba(180,220,255,0.7); width: 2px; }
.lb-row.mid-prize .lb-name { color: #d4ecff; text-shadow: 0 0 8px rgba(180,220,255,0.35); }
.lb-row.mid-prize .lb-prize { color: #c8e8ff; text-shadow: 0 0 8px rgba(180,220,255,0.55); }

/* Rank badges */
.rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
}

.rank-badge.gold-b {
  background: linear-gradient(135deg, #FFD700, #ff8c00);
  border-color: #FFD700;
  color: #000;
  box-shadow: 0 0 12px rgba(255,215,0,0.5);
  position: relative;
  overflow: visible;
}

.rank-badge.gold-b::before {
  content: '♛';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  color: #FFD700;
  filter: drop-shadow(0 0 5px rgba(255,215,0,0.9));
  animation: crown-float 2.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes crown-float {
  0%, 100% { transform: translateX(-50%) translateY(0px);   }
  50%       { transform: translateX(-50%) translateY(-2.5px); }
}

.rank-badge.silver-b {
  background: linear-gradient(135deg, var(--cyan), #007acc);
  border-color: var(--cyan);
  color: #000;
  box-shadow: 0 0 10px var(--cyan-glow);
}

/* Puesto 4 y 5 — plata fluorescente */
.rank-badge.silver-fl {
  background: linear-gradient(135deg, rgba(180,220,255,0.18), rgba(120,180,220,0.1));
  border: 1px solid rgba(180,220,255,0.55);
  color: #c8e8ff;
  box-shadow: 0 0 8px rgba(160,210,255,0.45), 0 0 2px rgba(180,220,255,0.6);
  text-shadow: 0 0 6px rgba(180,220,255,0.8);
}

/* Participante sin premio — bronce fluorescente tenue */
.rank-badge.participant-b {
  background: rgba(205, 140, 50, 0.12);
  border: 1px solid rgba(205, 140, 50, 0.4);
  color: #e09a3a;
  box-shadow: 0 0 6px rgba(205, 140, 50, 0.25);
}

.lb-row.no-prize {
  opacity: 0.75;
}

.lb-row.no-prize:hover {
  opacity: 1;
  background: rgba(205, 140, 50, 0.04);
}

.rank-badge.bronze-b {
  background: linear-gradient(135deg, var(--pink), #8b0040);
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 0 10px var(--pink-glow);
}

/* Name + wagered */
.lb-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.lb-wagered-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-left: 20px;
  font-weight: 400;
}

/* Prize */
.lb-prize {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cyan);
  text-align: right;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px var(--cyan-glow);
}

.lb-row.top-1 .lb-prize {
  color: var(--pink);
  text-shadow: 0 0 10px var(--pink-glow);
}

/* num col (fallback) */
.lb-num {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Loading */
.lb-loading {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 48px 20px;
  letter-spacing: 0.04em;
}

/* =============================================
   SHEET STATUS
   ============================================= */
.sheet-status {
  margin-top: 12px;
  text-align: center;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.82rem;
}

.sheet-status.error {
  background: rgba(255,45,120,0.08);
  border: 1px solid rgba(255,45,120,0.25);
  color: var(--pink);
}

.sheet-status.hidden { display: none; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: rgba(4,6,14,0.95);
  border-top: 1px solid var(--border-dim);
  padding: 22px 16px;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-inner strong {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-glow);
}

.footer-disclaimer {
  font-size: 0.66rem;
  opacity: 0.5;
  margin-top: 4px;
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-pink); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--pink); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
  .site-header { padding: 0 16px; }
  .header-inner { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 10px; }
  .header-right { flex-wrap: wrap; gap: 10px; }
  .header-logo-img { height: 50px; max-width: 180px; }
  .header-sep { display: none; }
  .mb-mr { font-size: 0.9rem; }
  .mb-bets { font-size: 1.5rem; }

  .leaderboard-header-row,
  .lb-row { grid-template-columns: 36px 1fr 90px; padding: 9px 14px; }
}

@media (max-width: 420px) {
  .leaderboard-header-row,
  .lb-row { grid-template-columns: 30px 1fr 80px; padding: 8px 10px; }
  .jugar-btn { padding: 9px 20px; font-size: 0.82rem; }
}
