@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Rajdhani:wght@500;600;700&family=Teko:wght@500;600;700&display=swap");

:root {
  --bg: #091311;
  --bg-2: #0d1a17;
  --panel: #0f211c;
  --panel-2: #132a23;
  --panel-3: rgba(13, 29, 24, 0.96);
  --text: #edf5f1;
  --muted: #9db2ad;
  --muted-2: #c8d6d2;
  --emerald: #0f6b50;
  --emerald-dark: #0a4e3c;
  --matte-blue: #4d6d8a;
  --matte-blue-dark: #334a60;
  --orange-red: #d95c3f;
  --line: rgba(255,255,255,.08);
  --line-strong: rgba(255,255,255,.14);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.22);
  --radius: 18px;
  --radius-sm: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(217, 92, 63, 0.10), transparent 24%),
    radial-gradient(circle at 12% 0%, rgba(77, 109, 138, 0.16), transparent 28%),
    linear-gradient(180deg, #07100e 0%, #0b1714 46%, #091311 100%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }

.container {
  width: min(calc(100% - 30px), var(--max));
  margin: 0 auto;
}

h1, h2, h3, .main-nav a, .btn, .tag, .eyebrow, .updated-pill, .metric-pill, .region-pill, .control-label {
  font-family: Rajdhani, Inter, sans-serif;
  letter-spacing: .035em;
}

.brand-copy h1,
.page-title,
.hero-card h2 {
  font-family: Teko, Rajdhani, sans-serif;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(7, 16, 14, 0.88);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}

.site-topline {
  height: 3px;
  background: linear-gradient(90deg, var(--emerald), var(--matte-blue), var(--orange-red));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark-wrap {
  position: relative;
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  display: grid;
  place-items: center;
}

.brand-mark-wrap::before {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 92, 63, 0.34), rgba(77, 109, 138, 0.18) 58%, rgba(15, 107, 80, 0) 78%);
  filter: blur(10px);
  pointer-events: none;
}

.brand-mark {
  position: relative;
  z-index: 1;
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,.38)) drop-shadow(0 0 16px rgba(217, 92, 63, .16));
}

.brand-copy h1 {
  margin: 0;
  font-size: 2.3rem;
  line-height: .86;
  color: #f7fbf9;
  text-shadow: 0 0 22px rgba(15, 107, 80, 0.18);
}

.brand-copy h1 span {
  color: #cfe0eb;
}

.brand-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  position: relative;
  padding: 2px 0;
  color: var(--muted-2);
  font-weight: 700;
  font-size: 1.02rem;
  text-transform: uppercase;
  transition: color .18s ease, opacity .18s ease;
  line-height: 1.15;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald), var(--orange-red));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
  opacity: .95;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}


.hero {
  padding: 34px 0 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: 16px;
}

.hero-card,
.panel,
.table-card,
.notice,
.category-card,
.patch-card {
  position: relative;
  background: linear-gradient(180deg, rgba(17, 37, 31, 0.98), rgba(9, 21, 18, 0.98));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card::before,
.panel::before,
.table-card::before,
.notice::before,
.category-card::before,
.patch-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(15,107,80,.95), rgba(77,109,138,.9), rgba(217,92,63,.95));
}

.hero-card {
  padding: 22px;
}

.eyebrow,
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #dce9e5;
  background: rgba(77, 109, 138, 0.16);
  border: 1px solid rgba(77,109,138,.24);
  font-size: .88rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-card h2 {
  margin: 12px 0 10px;
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  line-height: .92;
}

.hero-card p,
.section-head p,
.panel p,
.kicker,
.helper,
.footer-copy span,
.patch-meta,
.page-copy {
  color: var(--muted);
  line-height: 1.55;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: .18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange-red), #c24f35);
  color: #fff;
  box-shadow: 0 8px 22px rgba(217, 92, 63, 0.18);
}

.btn-secondary,
.btn-ghost {
  background: rgba(77, 109, 138, 0.12);
  color: #fff;
  border-color: rgba(77, 109, 138, 0.34);
}

.btn:hover,
.region-pill:hover,
.select:hover {
  transform: translateY(-1px);
}

.hero-side,
.list {
  display: grid;
  gap: 12px;
}

.panel {
  padding: 18px;
}

.panel h3,
.section-head h2,
.table-top h3,
.patch-list-head h3,
.footer-copy strong {
  margin: 0;
  color: #f5faf8;
}

.section {
  padding: 12px 0 26px;
}

.section-head {
  margin-bottom: 14px;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.category-card {
  padding: 16px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-card h3 {
  margin: 12px 0 8px;
  font-size: 1.08rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.linkline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: #fff;
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  letter-spacing: .03em;
}

.two-col {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 14px;
}

.table-card {
  overflow: hidden;
}

.table-top,
.patch-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 16px 0;
}

.table-wrap {
  overflow-x: auto;
  padding: 0 0 4px;
}

.data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 13px 16px;
  text-align: left;
  text-transform: uppercase;
  font-size: .84rem;
  color: #e3eeea;
  letter-spacing: .08em;
  background: linear-gradient(180deg, rgba(19, 42, 35, 0.98), rgba(12, 29, 24, 0.98));
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: .96rem;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,.02);
}

.data-table tbody tr:hover {
  background: rgba(77,109,138,.08);
}

.data-table td:first-child {
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  color: #f2f7f4;
}

.updated-pill,
.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.updated-pill {
  color: #deebf3;
  background: rgba(77,109,138,.18);
  border: 1px solid rgba(77,109,138,.30);
}

.metric-pill {
  color: #ffe5de;
  background: rgba(217,92,63,.14);
  border: 1px solid rgba(217,92,63,.24);
}

.notice {
  padding: 14px;
}

.leaderboard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.region-pills,
.leaderboard-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.region-pill {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted-2);
  background: rgba(255,255,255,.03);
  font-weight: 700;
  cursor: pointer;
  transition: .18s ease;
}

.region-pill.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 107, 80, 0.22), rgba(77, 109, 138, 0.16));
  border-color: rgba(217,92,63,.35);
}

.select,
.text-input,
.control-static {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(77,109,138,.34);
  background: rgba(255,255,255,.05);
  color: #fff;
}

.select.compact {
  min-width: 220px;
}

.list-item,
.patch-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}

.list-item strong,
.patch-card h3 {
  display: block;
  margin-bottom: 4px;
  color: #f6fbf9;
}

.patch-list-wrap {
  padding: 16px;
}

.patch-list {
  display: grid;
  gap: 12px;
}

.patch-card h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.patch-meta {
  margin-bottom: 8px;
  font-size: .92rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 76px;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.07);
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--matte-blue), var(--orange-red));
}

.loading,
.empty-state,
.error-state {
  padding: 18px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.16);
  color: var(--muted);
}

.page-hero {
  padding: 24px 0 10px;
}

.page-hero .hero-card {
  padding: 20px;
}

.page-title {
  margin: 10px 0 6px;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: .94;
}

.small {
  font-size: .88rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.18fr .82fr;
  gap: 14px;
}

.about-card p + p {
  margin-top: 12px;
}

.inline-link {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(217,92,63,.55);
  text-underline-offset: 3px;
}

.site-footer {
  padding: 24px 0 34px;
}

.footer-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 35, 29, 0.94), rgba(9, 20, 17, 0.94));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 720px;
}

.footer-copy strong {
  font-family: Teko, Rajdhani, sans-serif;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: .05em;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a,
.inline-link:hover,
.footer-links a:hover {
  color: #fff;
}

[hidden] { display: none !important; }
option { background: #0d1916; color: #fff; }

@media (max-width: 1080px) {
  .hero-grid,
  .two-col,
  .about-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .brand {
    justify-content: center;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
    gap: 12px 16px;
  }

  .main-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.1;
    font-size: 1rem;
  }
}


@media (max-width: 760px) {
  .grid-5 {
    grid-template-columns: 1fr;
  }

  .leaderboard-controls {
    align-items: stretch;
  }

  .region-pills,
  .leaderboard-tools {
    width: 100%;
  }

  .select.compact,
  .btn,
  .region-pill {
    width: 100%;
  }

  .table-wrap {
    overflow-x: hidden;
  }

  .data-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  .data-table thead th,
  .data-table td {
    padding: 10px 8px;
    font-size: .88rem;
  }

  .data-table th,
  .data-table td {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .brand-mark-wrap {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }

  .brand-mark {
    width: 72px;
    height: 72px;
  }

  .brand-copy h1 {
    font-size: 2.15rem;
  }

  .brand-copy p {
    font-size: .78rem;
    letter-spacing: .12em;
  }

  body[data-page="home"] #homeHeroesDataTable th:nth-child(4),
  body[data-page="home"] #homeHeroesDataTable td:nth-child(4),
  body[data-page="home"] #homeItemsDataTable th:nth-child(4),
  body[data-page="home"] #homeItemsDataTable td:nth-child(4) {
    display: none;
  }

  body[data-page="heroes"] .data-table th:nth-child(4),
  body[data-page="heroes"] .data-table td:nth-child(4),
  body[data-page="street-brawl"] .data-table th:nth-child(4),
  body[data-page="street-brawl"] .data-table td:nth-child(4) {
    display: none;
  }

  body[data-page="leaderboard"] .data-table th:nth-child(4),
  body[data-page="leaderboard"] .data-table td:nth-child(4) {
    display: none;
  }

  body[data-page="ranks"] .two-col {
    grid-template-columns: 1fr;
  }

  body[data-page="ranks"] .panel {
    display: none;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 20px), var(--max));
  }

  .main-nav {
    gap: 10px 14px;
  }

  .main-nav a {
    font-size: .95rem;
  }

  .brand-mark-wrap {
    width: 78px;
    height: 78px;
    flex-basis: 78px;
  }

  .brand-mark {
    width: 78px;
    height: 78px;
  }

  .brand-copy h1 {
    font-size: 2.35rem;
  }

  .table-top,
  .patch-list-head {
    padding: 14px 12px 0;
  }

  .data-table thead th,
  .data-table td {
    padding: 9px 6px;
    font-size: .82rem;
  }

  body[data-page="heroes"] .data-table th:nth-child(5),
  body[data-page="heroes"] .data-table td:nth-child(5),
  body[data-page="street-brawl"] .data-table th:nth-child(5),
  body[data-page="street-brawl"] .data-table td:nth-child(5) {
    padding-left: 4px;
    padding-right: 4px;
  }

  .metric-pill,
  .updated-pill {
    font-size: .74rem;
    padding: 6px 10px;
  }
}


.rank-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(77,109,138,.12);
  border: 1px solid rgba(77,109,138,.26);
  color: #e9f4f0;
  font-family: Rajdhani, Inter, sans-serif;
  font-weight: 700;
  letter-spacing: .03em;
}

.top-hero-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15,107,80,.16);
  border: 1px solid rgba(15,107,80,.26);
  color: #edf5f1;
  font-family: Rajdhani, Inter, sans-serif;
  font-weight: 700;
  font-size: .86rem;
  line-height: 1;
}

.muted-inline {
  color: var(--muted);
}

.ranks-layout {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 14px;
}

.bars-panel {
  padding: 18px;
}

.bar-label,
.bar-value {
  font-family: Rajdhani, Inter, sans-serif;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .ranks-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body[data-page="leaderboard"] .data-table th:nth-child(2),
  body[data-page="leaderboard"] .data-table td:nth-child(2) {
    display: none;
  }

  .top-hero-chip {
    font-size: .8rem;
    padding: 0 8px;
  }
}
