/* ─── Polla Mundialista 2026 — Sistema de diseño (sin build, CSS plano) ────── */

* { box-sizing: border-box; border-color: rgba(255,255,255,0.07); }

html {
  background: #061018;
  color: #e5e2e1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(255,255,255,0.08), transparent 24%),
    linear-gradient(180deg, rgba(2,15,42,0.78) 0%, rgba(6,16,24,0.88) 40%, rgba(8,8,8,0.98) 100%),
    url('../images/fondo1.jpg');
  background-size: cover;
  background-position: center bottom;
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.72), rgba(0,0,0,0.32) 22%, rgba(0,0,0,0.32) 78%, rgba(0,0,0,0.72)),
    radial-gradient(circle at 50% 0%, rgba(242,202,80,0.06), transparent 32%),
    rgba(0,0,0,0.42);
}

::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #131313; }
::-webkit-scrollbar-thumb { background: #353534; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #D4AF37; }

:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; }

[x-cloak] { display: none !important; }

.font-display { font-family: 'Montserrat', 'Inter', system-ui, sans-serif; }

/* ─── Componentes ─────────────────────────────────────────────────────────── */

.glass {
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-high {
  background: rgba(2, 15, 42, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.glass-card {
  background: rgba(28,27,27,0.42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  box-shadow: 0 18px 44px rgba(0,0,0,0.24);
}

.card {
  background: #201f1f;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.5rem;
}

.card-interactive {
  background: #201f1f;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.5rem;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out, transform 180ms ease-out;
  cursor: pointer;
}
.card-interactive:hover {
  border-color: rgba(212,175,55,0.3);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
  color: #0A0A0A;
  font-weight: 700;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 4px 15px rgba(212,175,55,0.3);
  transition: box-shadow 160ms ease-out, transform 140ms ease-out;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.btn-gold:hover::after { transform: translateX(100%); }
.btn-gold:hover { box-shadow: 0 6px 24px rgba(212,175,55,0.5); }
.btn-gold:active { transform: scale(0.97); }
.btn-gold:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

.btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(212,175,55,0.4);
  color: #D4AF37;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  transition: background 150ms ease-out, border-color 150ms ease-out;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-ghost:hover { background: rgba(212,175,55,0.08); border-color: rgba(212,175,55,0.7); }
.btn-ghost:active { transform: scale(0.97); }

.input-field {
  width: 100%;
  background: #2a2a2a;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.75rem 1rem;
  color: #e5e2e1;
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-bottom-color 150ms ease-out, box-shadow 150ms ease-out;
  outline: none;
}
.input-field::placeholder { color: rgba(192,192,192,0.35); }
.input-field:focus {
  border-bottom-color: #D4AF37;
  box-shadow: 0 4px 10px -4px rgba(212,175,55,0.35);
}
select.input-field option { background: #1c1b1b; }

.input-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C0C0C0;
  margin-bottom: 4px;
  margin-left: 4px;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #50C878;
  background: rgba(80,200,120,0.12);
  border: 1px solid rgba(80,200,120,0.3);
  padding: 3px 10px;
  border-radius: 9999px;
}
.badge-upcoming {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #aac7ff;
  background: rgba(10,132,255,0.1);
  border: 1px solid rgba(10,132,255,0.25);
  padding: 3px 10px;
  border-radius: 9999px;
}
.badge-finished {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: rgba(192,192,192,0.6);
  background: rgba(255,255,255,0.05);
  padding: 3px 10px;
  border-radius: 9999px;
}
.badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #D4AF37;
  background: rgba(212,175,55,0.12);
  border: 1px solid rgba(212,175,55,0.3);
  padding: 3px 10px;
  border-radius: 9999px;
}
.badge-green {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #66dd8b;
  background: rgba(102,221,139,0.1);
  border: 1px solid rgba(102,221,139,0.25);
  padding: 3px 10px;
  border-radius: 9999px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #50C878;
  border-radius: 50%;
  flex-shrink: 0;
  animation: liveDot 1.4s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(80,200,120,0.5);
}

.skeleton, .shimmer {
  background: linear-gradient(90deg, #201f1f 25%, #2a2a2a 50%, #201f1f 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 0.5rem;
}

.progress-bar {
  height: 6px;
  border-radius: 9999px;
  overflow: hidden;
  background: #353534;
  display: flex;
}
.progress-fill-green {
  height: 100%;
  background: #50C878;
  box-shadow: 0 0 8px rgba(80,200,120,0.5);
  border-radius: 9999px;
  transition: width 600ms ease-out;
}

.gold-glow { box-shadow: 0 0 20px rgba(212,175,55,0.15); }
.gold-glow-lg { box-shadow: 0 0 40px rgba(212,175,55,0.25); }

.shine-hover {
  position: relative;
  overflow: hidden;
}
.shine-hover::after {
  content: '';
  position: absolute;
  top: -50%; left: -75%;
  width: 50%; height: 200%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.12), transparent);
  transform: skewX(-20deg);
  transition: left 0.45s ease;
}
.shine-hover:hover::after { left: 125%; }

.stadium-bg {
  background-image:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.16), transparent 28%),
    linear-gradient(180deg, rgba(2,15,42,0.46) 0%, rgba(10,10,10,0.72) 45%, rgba(10,10,10,0.94) 100%),
    url('../images/fondo1.jpg');
  background-size: cover;
  background-position: center bottom;
  background-attachment: fixed;
}

.system-bg { background: transparent; }

.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1rem 6rem;
}
@media (min-width: 1024px) {
  .page-container { padding: 2rem 1.5rem 2rem; }
}

.text-gradient-gold {
  background: linear-gradient(135deg, #f2ca50 0%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-green {
  background: linear-gradient(135deg, #83fba5 0%, #50C878 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bg-glass { background: rgba(10,10,10,0.4); }

/* ─── Toasts ──────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 76px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}
.toast {
  background: rgba(28,27,27,0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 12px 16px;
  color: #e5e2e1;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 18px 44px rgba(0,0,0,0.45);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toastIn 220ms ease-out;
}
.toast.toast-success { border-color: rgba(80,200,120,0.35); }
.toast.toast-error   { border-color: rgba(244,48,86,0.4); }
.toast.toast-info    { border-color: rgba(10,132,255,0.35); }
.toast.removing { opacity: 0; transform: translateX(20px); transition: all 220ms ease-in; }

/* ─── Animaciones ─────────────────────────────────────────────────────────── */
@keyframes liveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes grow-bar { from { width: 0; } }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeInUp 320ms ease-out; }
.animate-grow-bar { animation: grow-bar 1.1s ease-out forwards; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.spinner {
  width: 1.25rem; height: 1.25rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  display: inline-block;
  animation: spinSlow 0.7s linear infinite;
}
