:root {
  --bg: #0f1218;
  --panel: #1a2030;
  --text: #e8ecf4;
  --muted: #8b93a7;
  --accent: #c45c26;
  --accent-hover: #e07038;
  --border: #2a3348;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 20% 0%, #2a1c14 0%, var(--bg) 50%);
  color: var(--text);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 8vw;
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 1.55rem; }
.nav a,
.nav-btn {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.nav a:hover,
.nav-btn:hover { color: var(--text); }

.hero { max-width: 720px; margin: 0 auto; padding: 64px 24px 24px; }
.games { max-width: 980px; margin: 0 auto; padding: 48px 24px 24px; }
h1 { font-size: 2.6rem; margin: 0 0 12px; }
h2 { margin: 0 0 20px; }
.tag { color: var(--accent); font-size: 0.85rem; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 1.1rem; line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 22px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }

.reqs-label { color: var(--muted); margin: 24px 0 4px; font-weight: 600; }
.reqs { color: var(--muted); line-height: 1.7; margin: 0 0 16px; padding-left: 1.2em; }
.support { color: var(--text); margin: 0; }
.support a {
  color: #f4d0b8;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.support a:hover { color: #fff; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.card h3 { margin: 0 0 12px; }
.card a {
  color: #f4d0b8;
  text-underline-offset: 2px;
}
.card a:hover { color: #fff; }
.card-video {
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: 0 0 16px;
  background: #0a0d14;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.card-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.price { color: var(--accent); font-weight: 700; margin: 0 0 8px; }
.card > p:last-child { margin: 0; color: var(--muted); line-height: 1.45; }

footer {
  padding: 32px 8vw 48px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
footer a { color: var(--accent-hover); }

a.brand {
  color: inherit;
  text-decoration: none;
}
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--panel);
  border-color: var(--muted);
}

/* —— Tournaments —— */
.tourney-hero { max-width: 760px; }
.tourney-explain { padding-top: 8px; }
.explain-cards { margin-bottom: 12px; }
.tourney-note { margin: 8px 0 0; max-width: 52rem; line-height: 1.5; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 8px;
}
.section-head h2 { margin: 0; }
.section-head .small { margin: 0; }

.tourney-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.tourney-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tourney-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.tourney-card h3 { margin: 4px 0 2px; font-size: 1.15rem; }
.tourney-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.pool-hint {
  margin: 8px 0 0;
  color: #f4d0b8;
  font-size: 0.85rem;
  font-weight: 600;
}
.empty-state {
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(26, 32, 48, 0.4);
}
.empty-state a { color: var(--accent-hover); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-upcoming { background: #243048; color: #b8c4e0; }
.badge-live { background: #3a1e14; color: #f0a070; }
.badge-past { background: #1e2430; color: var(--muted); }

.tourney-detail { max-width: 1100px; }
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 20px;
  margin: 24px 0;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.meta-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.callout {
  margin: 0 0 28px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: rgba(196, 92, 38, 0.12);
  border-radius: 0 10px 10px 0;
  line-height: 1.5;
}

.bracket-wrap {
  overflow-x: auto;
  padding: 12px 4px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 18, 24, 0.6);
}
.bracket-board {
  display: flex;
  gap: 28px;
  align-items: stretch;
  min-width: min-content;
  padding: 16px 20px;
}
.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 16px;
  min-width: 200px;
}
.bracket-round-title {
  margin: 0 0 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
}
.bracket-match {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.bracket-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.bracket-slot:last-child { border-bottom: none; }
.bracket-slot.winner { background: rgba(196, 92, 38, 0.18); }
.slot-side {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  width: 1.1rem;
}
.slot-name { flex: 1; }

@media (max-width: 640px) {
  .nav { flex-wrap: wrap; gap: 10px; }
  .nav a { margin-left: 12px; }
  h1 { font-size: 2rem; }
}
