:root {
  color-scheme: dark;
  --bg: #080a0d;
  --panel: #10151b;
  --panel-2: #151b22;
  --ink: #f2efe6;
  --muted: #a9b0b9;
  --line: rgba(255, 255, 255, 0.11);
  --gold: #d4af62;
  --amber: #a77a32;
  --emerald: #2fd39b;
  --red: #ef605d;
  --shadow: rgba(0, 0, 0, 0.46);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 0%, rgba(47, 211, 155, 0.09), transparent 28rem),
    linear-gradient(180deg, #0b0e12 0%, #07080a 100%);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 13, 0.88);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(212, 175, 98, 0.42);
  border-radius: 8px;
  color: var(--gold);
  background: linear-gradient(135deg, rgba(212, 175, 98, 0.12), rgba(47, 211, 155, 0.09));
  font-size: 22px;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  padding: 10px 11px;
  border-radius: 7px;
  transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

.auth-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 98, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.btn.primary {
  color: #0b0e12;
  border-color: rgba(212, 175, 98, 0.85);
  background: linear-gradient(180deg, #edcf88, #c89644);
  font-weight: 750;
}

.btn.ghost {
  color: var(--muted);
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 68px;
}

.hero {
  width: 100%;
  min-height: calc(100svh - 96px);
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 7, 9, 0.94) 0%, rgba(6, 7, 9, 0.68) 36%, rgba(6, 7, 9, 0.26) 72%),
    linear-gradient(0deg, #080a0d 0%, rgba(8, 10, 13, 0.18) 48%),
    url("hero-arena.png") center / cover no-repeat;
  transform: scale(1.01);
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 92px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(260px, 340px);
  gap: 42px;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--emerald);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 18px rgba(47, 211, 155, 0.75);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 680px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
  margin-bottom: 16px;
}

h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.lead {
  color: #d9dde1;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
  max-width: 670px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 22px 58px var(--shadow);
}

.stat {
  min-height: 112px;
  padding: 18px;
  background: rgba(16, 21, 27, 0.82);
}

.stat strong {
  display: block;
  font-size: 29px;
  color: var(--gold);
  margin-bottom: 4px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 60px 0;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-head p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 21, 27, 0.88);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  padding: 22px;
}

.card p,
.muted {
  color: var(--muted);
  line-height: 1.6;
}

.metric {
  font-size: 34px;
  font-weight: 830;
  color: var(--gold);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 21, 27, 0.72);
}

.time {
  color: var(--gold);
  font-weight: 780;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(47, 211, 155, 0.32);
  border-radius: 999px;
  color: #bff5df;
  background: rgba(47, 211, 155, 0.09);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table th,
.table td {
  padding: 15px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.table th {
  color: var(--gold);
  background: rgba(212, 175, 98, 0.08);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table tr:last-child td {
  border-bottom: 0;
}

.player {
  display: flex;
  gap: 14px;
  align-items: center;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #08100d;
  background: linear-gradient(135deg, var(--gold), var(--emerald));
  font-weight: 850;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.notice {
  border-left: 3px solid var(--gold);
  padding: 16px 18px;
  background: rgba(212, 175, 98, 0.08);
  color: #efe0bc;
  line-height: 1.6;
}

.stream-box {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(47, 211, 155, 0.15), transparent),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 12px, rgba(255, 255, 255, 0.01) 12px 24px),
    #0f141a;
}

.stream-box span {
  color: var(--muted);
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  background: #07080a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
}

.modal.open {
  display: flex;
}

.modal-panel {
  width: min(420px, 100%);
  border: 1px solid rgba(212, 175, 98, 0.28);
  border-radius: var(--radius);
  background: #10151b;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.62);
  padding: 26px;
}

.modal-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.quiet-game {
  margin-top: 34px;
  width: min(255px, 100%);
  opacity: 0.72;
  transition: opacity 180ms ease;
}

.quiet-game:hover {
  opacity: 1;
}

.quiet-game h3 {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 10px;
}

.knight-board {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  overflow: hidden;
  background: #0d1116;
}

.cell {
  position: relative;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--ink);
  background: #1a2027;
  font: inherit;
  cursor: pointer;
}

.cell:nth-child(odd) {
  background: #0f141a;
}

.cell.knight::before {
  content: "♞";
  color: var(--gold);
  font-size: clamp(20px, 7vw, 32px);
  line-height: 1;
}

.cell.target::after {
  content: "";
  width: 34%;
  height: 34%;
  border: 1px solid rgba(47, 211, 155, 0.62);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(47, 211, 155, 0.35);
}

.cell.success {
  background: rgba(47, 211, 155, 0.26);
}

.game-note {
  min-height: 20px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .nav-wrap {
    grid-template-columns: 1fr;
    padding: 14px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .auth-actions {
    justify-content: flex-start;
  }

  .hero-inner,
  .split,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    grid-template-columns: 1fr 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 620px) {
  .page,
  .hero-inner,
  .footer-inner,
  .nav-wrap {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 54px;
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }

  .section-head,
  .footer-inner {
    display: grid;
  }

  .auth-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
