@font-face { font-family: Inter; src: url(fonts/Inter-Regular.ttf); font-weight: 400; }
@font-face { font-family: Inter; src: url(fonts/Inter-Medium.ttf); font-weight: 500; }
@font-face { font-family: Inter; src: url(fonts/Inter-SemiBold.ttf); font-weight: 600; }
@font-face { font-family: Inter; src: url(fonts/Inter-Bold.ttf); font-weight: 700; }
@font-face { font-family: Inter; src: url(fonts/Inter-ExtraBold.ttf); font-weight: 800; }

:root {
  --bg: #0b0d14;
  --surface: #121521;
  --surface-2: #181c2b;
  --surface-3: #20253a;
  --border: #242a3d;
  --text: #e8eaf2;
  --muted: #8b90a7;
  --primary: #7c5cff;
  --primary-2: #a48bff;
  --green: #2fd18c;
  --amber: #ffb547;
  --red: #ff5d6c;
  --blue: #4ea8ff;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; font-size: 15px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; }
.container { width: min(1200px, 100% - 32px); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pos { color: var(--green); font-weight: 700; }
.hidden { display: none !important; }

/* ---------- Barra superior ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 13, 20, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: .5px; }
.mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #8a6dff, #5b3ee0); }
.mark svg { width: 18px; height: 18px; fill: #fff; }
.nav-links { display: flex; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance-chip { padding: 8px 14px; border-radius: 10px; background: rgba(47, 209, 140, .12); color: var(--green); font-weight: 700; }
.btn.burger { display: none; }
.sm-only { display: none; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-weight: 700; cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn-primary { border-color: transparent; color: #fff; background: linear-gradient(180deg, #8a6dff, #6c4cf2);
  box-shadow: 0 6px 20px rgba(124, 92, 255, .35); }
.btn-primary:hover { background: linear-gradient(180deg, #9a80ff, #7a5cff); }
.btn-ghost { background: transparent; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Portada ---------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px;
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(124, 92, 255, .45), transparent 60%),
    radial-gradient(700px 420px at 0% 100%, rgba(0, 180, 216, .22), transparent 60%),
    linear-gradient(180deg, #110e26, var(--bg)); }
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 30px;
  background: rgba(124, 92, 255, .16); color: #c8bbff; font-weight: 700; font-size: 13px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.02; margin: 18px 0; font-weight: 800; letter-spacing: -1.5px; }
.hero h1 span { background: linear-gradient(90deg, #a48bff, #4ea8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: #b9bdd4; max-width: 560px; line-height: 1.55; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 28px; font-weight: 800; }
.hero-card { background: rgba(18, 21, 33, .8); border: 1px solid #2f2863; border-radius: 20px; padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.hero-card h4 { margin: 0 0 14px; display: flex; justify-content: space-between; align-items: center; }

.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.section-head p { margin: 6px 0 0; color: var(--muted); }

.tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; gap: 4px; }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 9px; font-weight: 700; cursor: pointer; }
.tabs button.on { background: var(--surface-3); color: var(--text); }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.t-card { overflow: hidden; cursor: pointer; transition: .18s; display: flex; flex-direction: column; }
.t-card:hover { transform: translateY(-3px); border-color: #3b3470; box-shadow: 0 16px 40px rgba(124, 92, 255, .18); }
.t-banner { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.t-banner .gname { font-size: 11px; font-weight: 800; letter-spacing: .6px; color: #d6d8e6; text-transform: uppercase;
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.t-title { font-weight: 700; font-size: 17px; min-height: 44px; }
.t-prize small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.t-prize b { font-size: 26px; font-weight: 800; color: var(--green); }
.badge { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  font-weight: 800; font-size: 14px; flex: none; }
.badge.lg { width: 48px; height: 48px; font-size: 18px; border-radius: 12px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill-green { background: rgba(47, 209, 140, .14); color: var(--green); }
.pill-amber { background: rgba(255, 181, 71, .14); color: var(--amber); }
.pill-red { background: rgba(255, 93, 108, .14); color: var(--red); }
.pill-gray { background: rgba(139, 144, 167, .16); color: #b4b8cc; }
.pill-violet { background: rgba(124, 92, 255, .18); color: #b3a1ff; }
.pill-outline { border: 1px solid var(--border); color: #c3c7d9; }
.pill-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #6c4cf2, #a48bff); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding: 24px; }
.step .num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: rgba(124, 92, 255, .16); color: #b3a1ff; margin-bottom: 14px; }
.step h3 { margin: 0 0 8px; }
.step p { margin: 0; color: var(--muted); line-height: 1.5; }

/* ---------- Tablas ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted);
  padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 700; }
.table td { padding: 13px 14px; border-bottom: 1px solid #1b2030; }
.table tr:last-child td { border-bottom: 0; }
.table tr.me td { background: rgba(124, 92, 255, .10); }
.table-wrap { overflow-x: auto; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-size: 11px; font-weight: 800; flex: none; }
.medal { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; font-weight: 800;
  font-size: 12px; color: #0b0d14; background: var(--surface-3); }
.medal.m1 { background: linear-gradient(#ffd76a, #e9a91c); }
.medal.m2 { background: linear-gradient(#e6e9f2, #9fa6bb); }
.medal.m3 { background: linear-gradient(#f0a76a, #b8672d); }
.medal.m0 { color: var(--muted); }

/* ---------- Detalle de torneo ---------- */
.detail-head { padding: 40px 0 28px; border-bottom: 1px solid var(--border); }
.detail-head .row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.detail-head h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.detail { display: grid; grid-template-columns: 1fr 360px; gap: 24px; padding: 28px 0 60px; align-items: start; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.tile { padding: 14px 16px; }
.tile small { color: var(--muted); font-size: 12px; font-weight: 600; }
.tile b { display: block; font-size: 19px; margin-top: 4px; }
.side { padding: 22px; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.prize-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.prize-row b { margin-left: auto; color: var(--green); }
.countdown { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.matches { padding: 6px 14px 14px 54px; display: grid; gap: 6px; }
.match { display: flex; gap: 14px; align-items: center; font-size: 13px; color: #c3c7d9; }
.match .w { color: var(--green); font-weight: 700; } .match .l { color: var(--red); font-weight: 700; }
.match .sc { margin-left: auto; font-weight: 700; color: var(--text); }
.expander { cursor: pointer; }
.note { background: rgba(78, 168, 255, .08); color: #b8c9e6; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.warn { background: rgba(255, 181, 71, .10); color: #f3d29b; padding: 10px 14px; border-radius: 10px; font-size: 13px; }

/* ---------- Formularios ---------- */
.auth { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 16px;
  background: radial-gradient(700px 400px at 50% 0%, rgba(124, 92, 255, .25), transparent 60%); }
.auth .card { width: min(440px, 100%); padding: 32px; }
.auth h1 { margin: 0 0 6px; font-size: 26px; }
label.f { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
input, select { width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; outline: none; }
input:focus, select:focus { border-color: var(--primary); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; color: #c3c7d9; font-size: 14px; }
.check input { width: auto; margin-top: 3px; }

/* ---------- Cuenta ---------- */
.page-head { padding: 40px 0 8px; }
.page-head h1 { margin: 0; font-size: 32px; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 22px 0; }
.stat { padding: 20px; }
.stat small { color: var(--muted); font-weight: 600; }
.stat b { display: block; font-size: 28px; margin-top: 8px; }
.acc { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid #1b2030; }
.acc:last-child { border-bottom: 0; }

/* ---------- FAQ y pie ---------- */
details.faq { border-bottom: 1px solid var(--border); padding: 18px 4px; }
details.faq summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; }
details.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; }
details.faq[open] summary::after { content: "−"; }
details.faq p { color: var(--muted); line-height: 1.6; margin: 12px 0 0; }
footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; color: var(--muted); font-size: 14px; }
footer .container { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* ---------- Avisos ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 50; }
.toast { background: #1b1f30; border: 1px solid #1f5c43; padding: 14px 18px; border-radius: 12px; max-width: 380px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5); animation: in .2s ease-out; }
.toast.err { border-color: #6a2a35; }
@keyframes in { from { transform: translateY(12px); opacity: 0; } }

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  .hero .container, .detail { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
  .steps, .stats { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .side { position: static; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 16px; }
  .nav-links.open { display: flex; }
  .btn.burger { display: inline-flex; }
  .hide-sm { display: none; }
  .sm-only { display: block; }
  .nav-right { gap: 6px; }
  .nav-right .btn { padding: 8px 12px; }
  .table th, .table td { padding: 10px 8px; }
}

/* Publicidad */
.ad-slot { margin: 0 0 22px; }
.ad { display: flex; align-items: center; gap: 16px; padding: 14px 18px; color: var(--text); text-decoration: none; }
.ad:hover { border-color: rgba(139, 92, 246, .5); }
.ad img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.ad div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ad-tag { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* ---------- Juegos, ejemplo de partida, pie de página (estilo Gamercraft) ---------- */
.games-strip-wrap { padding-top: 0; }
.games-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.game-chip { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); opacity: .6; }
.game-chip.live { opacity: 1; border-color: #2f2863; background: linear-gradient(135deg, rgba(124, 92, 255, .16), var(--surface)); }
.game-chip.live:hover { border-color: var(--primary); }
.game-chip b { display: block; margin-bottom: 4px; white-space: nowrap; }
.tracking { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--green); font-weight: 600; }
.tracking .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(47, 209, 140, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(47, 209, 140, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 209, 140, 0); } }
.match-sample { margin-top: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.ms-head { display: flex; align-items: center; gap: 10px; }
.ms-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.ms-stats small { display: block; color: var(--muted); font-size: 11px; }
.ms-stats b { font-size: 16px; }
.t-cta { margin-top: auto; pointer-events: none; }
.foot-cols { display: grid !important; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.foot-cols h5 { margin: 0 0 10px; color: var(--text); font-size: 14px; }
.foot-cols a { display: block; margin-bottom: 8px; }
.foot-cols a:hover { color: var(--text); }
.foot-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.legal h3 { margin: 26px 0 8px; }
.legal p, .legal li { color: #c5c9d9; line-height: 1.65; }
@media (max-width: 900px) { .foot-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-cols { grid-template-columns: 1fr; } }
