:root {
  --bg: #0c0a08;
  --bg-2: #14100c;
  --panel: #1a1510;
  --panel-2: #221b14;
  --line: #2f261c;
  --text: #f1e9df;
  --muted: #a8998a;
  --ember: #ff7a1a;
  --ember-2: #ffb347;
  --teal: #37d6c8;
  --ok: #4ade80;
  --bad: #f87171;
  --radius: 14px;
  --display: "Oswald", "Bahnschrift", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ember-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .92em; background: #0006; padding: .1em .4em; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(12, 10, 8, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 20px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--panel); text-decoration: none; }
.nav .btn { padding: 9px 16px; font-size: 14px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px; border: 1px solid transparent;
  font: 700 15px/1 var(--body); letter-spacing: .02em; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(180deg, #ff8a2e, #e8620a); color: #1a0d02; box-shadow: 0 8px 24px -10px #ff7a1a; }
.btn-primary:hover { background: linear-gradient(180deg, #ff9a45, #f06d12); }
.btn-ghost { background: #ffffff0d; color: var(--text); border-color: #ffffff22; }
.btn-ghost:hover { background: #ffffff18; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #6974f5; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("/assets/hero.jpg") center 35% / cover no-repeat;
  opacity: .55;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 120%, transparent 20%, var(--bg) 75%),
    linear-gradient(180deg, rgba(12,10,8,.35) 0%, rgba(12,10,8,.65) 60%, var(--bg) 100%);
}
.hero .wrap { padding: 88px 0 72px; display: grid; grid-template-columns: 1.25fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--ember-2); font: 700 13px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; margin: 0 0 18px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--ember); }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; margin: 0; }
.hero h1 { font-size: clamp(42px, 7vw, 84px); font-weight: 700; }
.hero h1 span { color: var(--ember); }
.lead { color: #d9cbbb; font-size: 18px; max-width: 560px; margin: 18px 0 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; padding: 0; list-style: none; }
.tags li { border: 1px solid #ffffff22; background: #0007; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #e9dccd; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.ip { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* ---------- Status card ---------- */
.status-card {
  background: linear-gradient(180deg, rgba(34,27,20,.92), rgba(20,16,12,.92));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 30px 60px -30px #000;
}
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.status-head h2 { font-size: 20px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: #ffffff10; color: var(--muted); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.on { color: var(--ok); background: #4ade8018; }
.pill.on .dot { background: var(--ok); box-shadow: 0 0 0 0 #4ade80; animation: pulse 2s infinite; }
.pill.off { color: var(--bad); background: #f8717118; }
.pill.off .dot { background: var(--bad); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #4ade8088; } 70% { box-shadow: 0 0 0 8px #4ade8000; } 100% { box-shadow: 0 0 0 0 #4ade8000; } }
.players { display: flex; align-items: baseline; gap: 8px; font-family: var(--display); }
.players b { font-size: 56px; line-height: 1; }
.players span { color: var(--muted); font-size: 22px; }
.bar { height: 8px; background: #ffffff10; border-radius: 99px; overflow: hidden; margin: 12px 0 20px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ember), var(--ember-2)); border-radius: 99px; transition: width .8s ease; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.kv div { background: #0005; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kv dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.kv dd { margin: 2px 0 0; font-weight: 700; }
.updated { color: var(--muted); font-size: 12px; margin: 14px 0 0; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head p { color: var(--muted); margin: 8px 0 0; max-width: 620px; }
.alt { background: var(--bg-2); border-block: 1px solid var(--line); }

/* ---------- Countdown ---------- */
.countdown { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; background: radial-gradient(ellipse at 0% 0%, #ff7a1a22, transparent 60%), var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.countdown h2 { font-size: clamp(26px, 3.4vw, 38px); }
.countdown p { color: var(--muted); margin: 10px 0 0; }
.clock { display: flex; gap: 10px; }
.clock div { min-width: 92px; text-align: center; background: #0007; border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px 10px; }
.clock b { display: block; font: 700 46px/1 var(--display); font-variant-numeric: tabular-nums; }
.clock span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }

/* ---------- Feature grid ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .ico { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: #ff7a1a1a; color: var(--ember); margin-bottom: 14px; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 20px; margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; font-size: 15px; }

/* ---------- Leaderboards ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tab { background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 9px 14px; border-radius: 9px; font-weight: 700; font-size: 14px; cursor: pointer; }
.tab[aria-selected="true"] { color: #1a0d02; background: var(--ember); border-color: var(--ember); }
.board { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.board table { width: 100%; border-collapse: collapse; }
.board th, .board td { padding: 13px 18px; text-align: left; }
.board th { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: #0004; border-bottom: 1px solid var(--line); }
.board td { border-bottom: 1px solid #ffffff08; }
.board tr:last-child td { border-bottom: 0; }
.board td.num, .board th.num { text-align: right; font-variant-numeric: tabular-nums; }
.board td.pos { width: 64px; font: 700 18px/1 var(--display); color: var(--muted); }
.board tr:nth-child(1) td.pos { color: #ffd166; }
.board tr:nth-child(2) td.pos { color: #d7dde5; }
.board tr:nth-child(3) td.pos { color: #e0a36b; }
.board td.name { font-weight: 700; word-break: break-word; }
.board .empty { padding: 32px; text-align: center; color: var(--muted); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.podium .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.podium .card h3 { font-size: 16px; color: var(--muted); margin-bottom: 14px; }
.podium ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.podium li { display: flex; justify-content: space-between; gap: 10px; }
.podium li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium li b { font-variant-numeric: tabular-nums; color: var(--ember-2); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat b { display: block; font: 700 36px/1 var(--display); }
.stat span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font: inherit; }
.note { color: var(--muted); font-size: 14px; }
.banner-sample { background: #ffb3471a; border: 1px dashed #ffb34766; color: #ffd8a8; padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }

/* ---------- Prose (normas / privacidad) ---------- */
.page-head { padding: 64px 0 24px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 20% 0%, #ff7a1a1c, transparent 55%); }
.page-head h1 { font-size: clamp(38px, 6vw, 64px); }
.page-head p { color: var(--muted); max-width: 680px; margin: 12px 0 0; }
.prose { max-width: 820px; }
.prose h2 { font-size: 28px; margin: 40px 0 12px; }
.prose h3 { font-size: 20px; margin: 26px 0 8px; color: var(--ember-2); }
.prose p, .prose li { color: #ddd0c2; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.rule { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--ember); border-radius: 10px; padding: 16px 20px; margin: 12px 0; }
.rule h3 { margin: 0 0 6px; }
.rule p { margin: 0; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.lang-switch button { background: none; border: 0; color: var(--muted); padding: 8px 14px; font-weight: 700; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
[data-lang-block][hidden] { display: none; }
.draft { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffd8a8; background: #ffb3471a; border: 1px dashed #ffb34766; border-radius: 6px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }

/* ---------- Links + footer ---------- */
.links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.link-card { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); transition: border-color .15s ease, transform .15s ease; }
.link-card:hover { text-decoration: none; border-color: #ff7a1a66; transform: translateY(-2px); }
.link-card .ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: #ffffff0d; flex: none; }
.link-card .ico svg { width: 24px; height: 24px; }
.link-card b { display: block; }
.link-card span { color: var(--muted); font-size: 14px; }
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
.disclaimer { width: 100%; font-size: 12px; color: #7d7064; margin: 8px 0 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; opacity: 0; transition: all .25s ease; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; padding: 56px 0 48px; }
  .grid-4, .stats-row { grid-template-columns: 1fr 1fr; }
  .links, .podium { grid-template-columns: 1fr; }
  .countdown { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav-links.open { display: flex; }
  .nav .btn { display: none; }
  .clock div { min-width: 0; flex: 1; }
  .clock b { font-size: 34px; }
  .board th, .board td { padding: 11px 10px; }
  .board .hide-sm { display: none; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .stat b { font-size: 28px; }
  .cta .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
