:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080911;
  color: #edf1ff;
  scroll-behavior: smooth;
  --bg: #080911;
  --panel: rgba(15, 18, 31, .86);
  --panel-solid: #10131f;
  --line: rgba(132, 151, 202, .25);
  --line-bright: rgba(143, 194, 255, .45);
  --muted: #aeb9d6;
  --blue: #8dc7ff;
  --violet: #b58cff;
  --gold: #f5d36a;
  --green: #7fed9b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(90, 118, 255, .18), transparent 32rem),
    radial-gradient(circle at 90% 18%, rgba(177, 90, 255, .13), transparent 30rem),
    var(--bg);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(1180px, calc(100% - 28px));
  margin: 12px auto 0;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(132, 151, 202, .25);
  border-radius: 8px;
  background: rgba(8, 9, 17, .78);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .28);
}

.brand {
  font-weight: 900;
  letter-spacing: 0;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 6px;
}

.navlinks a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--muted);
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.navlinks a:hover {
  color: #fff;
  background: rgba(141, 199, 255, .08);
}

.navlinks .nav-button,
.primary-action {
  color: #07111d;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  font-weight: 800;
}

.navlinks .nav-button:hover,
.primary-action:hover {
  color: #07111d;
  filter: brightness(1.08);
}

.hero {
  margin-top: -60px;
  min-height: 480px;
  display: flex;
  align-items: end;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(132, 151, 202, .15);
}

.hero-home {
  background-image: linear-gradient(90deg, rgba(8, 9, 17, .92), rgba(8, 9, 17, .48), rgba(8, 9, 17, .24)), url("/assets/hero_banner.png");
}

.wiki-hero {
  min-height: 390px;
  background-image: linear-gradient(90deg, rgba(8, 9, 17, .9), rgba(8, 9, 17, .42)), url("/assets/player_profile_header.png");
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 126px 0 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: end;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  color: var(--blue);
  font-weight: 800;
  margin: 0 0 8px;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  font-size: clamp(46px, 8vw, 88px);
  line-height: .95;
  margin: 0 0 18px;
}

h2 {
  margin: 0 0 18px;
  font-size: 25px;
}

p {
  line-height: 1.62;
}

.hero-text {
  color: #d5def8;
  max-width: 660px;
  font-size: 17px;
  margin: 0 0 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-action,
.secondary-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 8px;
  transition: transform .16s ease, filter .16s ease, background .16s ease;
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.secondary-action {
  border: 1px solid var(--line-bright);
  background: rgba(15, 18, 31, .62);
  color: #e9efff;
  font-weight: 800;
}

.status-panel,
.metric-card,
.panel-section,
.wiki-card,
.wiki-toc {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, .24);
}

.status-panel {
  padding: 18px;
}

.panel-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
}

.status {
  margin-top: 8px;
  color: #fff;
  font-weight: 800;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 72px;
}

section {
  margin: 0 0 28px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 18px;
}

.metric-card span {
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 23px;
}

.metric-card p {
  color: var(--muted);
  margin: 8px 0 0;
}

.panel-section {
  padding: 20px;
}

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

select {
  background: #111827;
  color: #edf1ff;
  border: 1px solid #334061;
  border-radius: 7px;
  padding: 10px 12px;
}

button {
  background: #111827;
  color: #edf1ff;
  border: 1px solid #334061;
  border-radius: 7px;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, opacity .16s ease;
}

button:hover:not(:disabled) {
  background: rgba(141, 199, 255, .1);
  border-color: var(--line-bright);
}

button:disabled {
  cursor: default;
  opacity: .45;
}

.leaderboard {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid rgba(111, 124, 172, .22);
  background: rgba(9, 12, 22, .62);
  border-radius: 8px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.rank-row:hover {
  transform: translateY(-1px);
  border-color: var(--line-bright);
  background: rgba(16, 21, 38, .9);
}

.rank-row:nth-child(-n+3) {
  background-image: linear-gradient(90deg, rgba(13, 16, 31, .82), rgba(13, 16, 31, .68)), url("/assets/leaderboard_card_bg.png");
  background-size: cover;
}

.rank {
  color: var(--blue);
  font-weight: 900;
}

.value {
  color: var(--gold);
  font-weight: 900;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.season-card {
  overflow: hidden;
  background: rgba(9, 12, 22, .62);
  border: 1px solid rgba(111, 124, 172, .22);
  border-radius: 8px;
}

.season-card img {
  width: 100%;
  height: 178px;
  object-fit: cover;
  display: block;
}

.season-data {
  padding: 16px;
  color: var(--muted);
}

.recent {
  display: grid;
  gap: 10px;
}

.recent-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px;
  background: rgba(9, 12, 22, .62);
  border: 1px solid rgba(111, 124, 172, .22);
  border-radius: 8px;
}

.recent-row img {
  width: 36px;
  height: 36px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
}

.about {
  color: var(--muted);
  max-width: 780px;
  margin: 0;
}

.wiki-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.wiki-toc {
  position: sticky;
  top: 86px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.wiki-toc a {
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--muted);
}

.wiki-toc a:hover {
  color: #fff;
  background: rgba(141, 199, 255, .08);
}

.wiki-content {
  display: grid;
  gap: 18px;
}

.wiki-card {
  padding: 22px;
}

.info-grid,
.skill-list,
.command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.info-grid div,
.skill-list span,
.command-grid code {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: rgba(9, 12, 22, .62);
  border: 1px solid rgba(111, 124, 172, .2);
  border-radius: 8px;
}

.info-grid span,
.skill-list span {
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(9, 12, 22, .58);
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid rgba(111, 124, 172, .16);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  color: #dbe3f8;
}

code {
  color: #e8d087;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

.note {
  color: var(--muted);
  padding: 12px 14px;
  background: rgba(141, 199, 255, .07);
  border: 1px solid rgba(141, 199, 255, .18);
  border-radius: 8px;
}

@media (max-width: 860px) {
  .topbar {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .navlinks {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    margin-top: -112px;
    min-height: 430px;
  }

  .hero-inner,
  .overview-grid,
  .split,
  .wiki-layout,
  .info-grid,
  .skill-list,
  .command-grid {
    grid-template-columns: 1fr;
  }

  .status-panel {
    max-width: 100%;
  }

  .section-head {
    align-items: stretch;
    display: grid;
  }

  .rank-row {
    grid-template-columns: 42px 1fr;
  }

  .value {
    grid-column: 2;
  }

  .wiki-toc {
    position: static;
    grid-template-columns: repeat(3, 1fr);
  }
}
