:root {
  --bg: #0a0c14;
  --bg-alt: #10131f;
  --card: #151827;
  --border: #232838;
  --purple: #7c3aed;
  --cyan: #00c2ff;
  --pink: #ff3860;
  --green: #22c55e;
  --text: #eef0f7;
  --text-dim: #9aa0b4;
  --radius: 16px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Rajdhani", "Segoe UI", "Trebuchet MS", sans-serif;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Orbitron", "Rajdhani", "Segoe UI", sans-serif;
  margin: 0;
  letter-spacing: 0.5px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Loader ---------- */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .4s ease, visibility .4s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-ring {
  width: 54px; height: 54px;
  border: 4px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(10, 12, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo .bolt { color: var(--purple); }
.logo-img {
  height: 34px;
  width: auto;
}

nav.main-nav ul { display: flex; gap: 30px; }
nav.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
  transition: color .2s ease;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--text); }
nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transition: width .25s ease;
}
nav.main-nav a:hover::after, nav.main-nav a.active::after { width: 100%; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 6px;
}
.burger span { width: 26px; height: 3px; background: var(--text); border-radius: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(90deg, var(--purple), var(--pink));
  color: white;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.35);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 110px 0 90px;
  text-align: center;
  /*background:
    radial-gradient(circle at 20% 20%, rgba(124,58,237,0.25), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(0,194,255,0.2), transparent 45%),
    var(--bg);
    */
  background: url('/assets/ewc/images/background-mario.jpg') no-repeat center center;
  background-size: cover;
  overflow: hidden;
}

.hero > .container {
  position: relative;
  z-index: 5;
}

/* starfield */
.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.85;
  animation: twinkle 3s ease-in-out infinite;
}
.star.s1 { width: 3px; height: 3px; top: 12%; left: 15%; animation-delay: 0s; }
.star.s2 { width: 2px; height: 2px; top: 22%; left: 32%; animation-delay: 0.4s; }
.star.s3 { width: 4px; height: 4px; top: 8%; left: 55%; animation-delay: 0.8s; }
.star.s4 { width: 2px; height: 2px; top: 30%; left: 72%; animation-delay: 1.2s; }
.star.s5 { width: 3px; height: 3px; top: 18%; left: 88%; animation-delay: 1.6s; }
.star.s6 { width: 2px; height: 2px; top: 45%; left: 8%; animation-delay: 0.2s; }
.star.s7 { width: 3px; height: 3px; top: 62%; left: 22%; animation-delay: 0.6s; }
.star.s8 { width: 2px; height: 2px; top: 55%; left: 90%; animation-delay: 1s; }
.star.s9 { width: 4px; height: 4px; top: 75%; left: 65%; animation-delay: 1.4s; }
.star.s10 { width: 2px; height: 2px; top: 85%; left: 40%; animation-delay: 1.8s; }
.star.s11 { width: 3px; height: 3px; top: 5%; left: 78%; animation-delay: 2s; }
.star.s12 { width: 2px; height: 2px; top: 68%; left: 5%; animation-delay: 0.9s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}

/* distant ringed planet, top-right, in the site's purple/cyan palette */
.hero-planet {
  position: absolute;
  top: -70px;
  right: -70px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b98bff, var(--purple) 55%, #3d1a8f 80%);
  box-shadow: 0 0 90px rgba(124, 58, 237, 0.5);
}
.hero-planet::after {
  content: "";
  position: absolute;
  inset: -30px;
  border: 14px solid rgba(0, 194, 255, 0.2);
  border-radius: 50%;
  transform: rotate(-20deg) scaleY(0.35);
}

/* small cyan moon, bottom-left */
.hero-moon {
  position: absolute;
  bottom: 8%;
  left: 6%;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #8fe9ff, var(--cyan) 60%, #026a91 90%);
  box-shadow: 0 0 40px rgba(0, 194, 255, 0.4);
}

/* diagonal light beam */
.hero-beam {
  position: absolute;
  top: -10%;
  left: 22%;
  width: 3px;
  height: 130%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: rotate(28deg);
  filter: blur(1px);
}

@media (max-width: 860px) {
  .hero-planet { width: 200px; height: 200px; }
  .hero-moon { width: 80px; height: 80px; }
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 30px;
  border: 1px solid #9aff91;
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.05;
  margin-bottom: 14px;
}

.hero p {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 34px;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
}
.stat-card .num {
  font-family: "Orbitron", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-card .label { color: var(--text-dim); font-size: 0.9rem; margin-top: 6px; }

/* ---------- Socials ---------- */
.social-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 50px;
}
.social-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color .2s ease;
}
.social-pill:hover { border-color: var(--cyan); }

/* ---------- Section shells ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 46px; }
.section-eyebrow {
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.section-title { font-size: 2.2rem; }
.section-sub { color: var(--text-dim); max-width: 560px; margin: 14px auto 0; }

.loading-row {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 40px 0; color: var(--text-dim); font-weight: 600;
}
.spinner {
  width: 24px; height: 24px; border: 3px solid var(--border);
  border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.countdown .box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  min-width: 100px;
  text-align: center;
}
.countdown .box .value {
  font-family: "Orbitron", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--cyan);
}
.countdown .box .unit {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* ---------- Region filter + teams ---------- */
.filter-row {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px;
}
.filter-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 9px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all .2s ease;
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active {
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  color: white;
  border-color: transparent;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}
.team-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform .2s ease, border-color .2s ease;
}
.team-card:hover { transform: translateY(-4px); border-color: var(--purple); }
.team-flag { font-size: 1.8rem; }
.team-card h3 { font-size: 1rem; margin-bottom: 3px; }
.team-card .country { color: var(--text-dim); font-size: 0.8rem; }

/* ---------- Schedule ---------- */
.match-list { display: flex; flex-direction: column; gap: 14px; }
.match-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.match-day {
  font-size: 0.75rem;
  color: var(--cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: 70px;
}
.match-teams {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 1.05rem;
  flex: 1;
  justify-content: center;
}
.match-teams .vs { color: var(--text-dim); font-weight: 400; font-size: 0.85rem; }
.match-meta { display: flex; align-items: center; gap: 18px; color: var(--text-dim); font-size: 0.85rem; }
.match-meta .btn-outline { padding: 8px 18px; font-size: 0.8rem; }

/* ---------- Tickets promo ---------- */
.ticket-banner {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(0,194,255,0.1));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 50px 40px;
  text-align: center;
}
.ticket-banner h2 { font-size: 1.8rem; margin-bottom: 12px; }
.ticket-banner p { color: var(--text-dim); margin-bottom: 26px; }
.ticket-progress {
  max-width: 420px;
  margin: 0 auto 30px;
}
.ticket-progress .bar {
  height: 10px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ticket-progress .fill {
  height: 100%;
  width: 82%;
  background: linear-gradient(90deg, var(--purple), var(--pink));
}
.ticket-progress .label {
  display: flex; justify-content: space-between;
  font-size: 0.8rem; color: var(--text-dim); margin-top: 8px;
}

/* ---------- News ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.news-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.news-date { color: var(--cyan); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; }
.news-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.news-card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; margin-bottom: 16px; }
.news-card .read-more { color: var(--pink); font-weight: 700; font-size: 0.85rem; }

/* ---------- Videos ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.video-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.video-thumb {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  position: relative;
}
.video-duration {
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.5);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}
.video-body { padding: 16px 18px; }
.video-body h3 { font-size: 0.95rem; margin-bottom: 8px; }
.video-body .watch-now { color: var(--cyan); font-weight: 700; font-size: 0.82rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-item .icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.contact-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-item p { color: var(--text-dim); font-size: 0.88rem; margin: 0; }

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-form input, .contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form button { align-self: flex-start; }
.form-msg { font-weight: 700; font-size: 0.88rem; min-height: 18px; }
.form-msg.success { color: var(--green); }
.form-msg.error { color: var(--pink); }

/* ---------- Checkout (datos-compra) ---------- */
.datos-compra {
  text-align: left;
  margin: 30px 0;
}

.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}
.step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  position: relative;
}
.step-dot small {
  position: absolute;
  top: 42px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}
.step-dot.active {
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  border-color: transparent;
  color: white;
}
.step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
}

.checkout-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.checkout-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.checkout-row .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.checkout-row .field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
}
.checkout-row .field input,
.checkout-row .field select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  min-height: 46px;
}
.checkout-row .field select {
  appearance: auto;
}
.checkout-row .field select:disabled {
  opacity: 0.5;
}

/* Mercado Pago injects an <iframe> inside these containers for
   cardNumber/expirationDate/securityCode. The iframe renders on a white
   background by default, so the box (and the text color passed to
   cardForm's `style` option) must match — a dark box here would make the
   typed digits unreadable. */
.mp-field {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 46px;
  padding: 0 12px;
  overflow: hidden;
}
.mp-field iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block;
}

#step1-form > button[type="submit"] {
  align-self: flex-start;
}

.checkout-summary {
  background: rgba(124, 58, 237, 0.12);
  border: 1px dashed var(--purple);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.9rem;
  margin: 0;
}

.checkout-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .checkout-actions { flex-direction: column-reverse; }
  .checkout-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- Login (user menu + modal) ---------- */
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.user-menu form {
  margin: 0;
}

.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.login-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.login-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  position: relative;
}
.login-modal h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.login-modal p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 22px;
}
.login-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.login-modal-close:hover {
  color: var(--text);
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: white;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  border-radius: 30px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}
.btn-google:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.login-modal-msg {
  color: var(--pink) !important;
  font-size: 0.85rem !important;
  margin: 14px 0 0 !important;
  min-height: 18px;
}

/* ---------- Footer ---------- */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}
.footer-col h4 { font-size: 0.95rem; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-dim); font-size: 0.88rem; transition: color .2s ease; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ---------- Back to top ---------- */
#back-to-top {
  position: fixed; bottom: 26px; right: 26px;
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  color: white; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .3s ease; z-index: 400;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}
#back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  nav.main-nav {
    position: fixed; top: 64px; left: 0; right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  nav.main-nav.open { max-height: 320px; }
  nav.main-nav ul { flex-direction: column; padding: 20px 24px; gap: 18px; }
  .burger { display: flex; }
  .match-teams { justify-content: flex-start; }
}
