:root {
  color-scheme: dark;
  --bg: #070a0b;
  --ink: #f3efe2;
  --muted: #adb5ab;
  --line: rgba(236, 230, 203, 0.16);
  --line-strong: rgba(236, 230, 203, 0.28);
  --panel: rgba(16, 21, 19, 0.78);
  --shadow: rgba(0, 0, 0, 0.48);
  --gold: #d0b766;
  --gold-2: #f1d989;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #070a0b; color: var(--ink); }
a { color: inherit; text-decoration: none; }
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 74px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(18px, 4vw, 54px);
  background: rgba(7, 10, 11, 0.9);
  border-bottom: 1px solid rgba(236, 230, 203, 0.08);
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: .09em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--gold-2); }
.nav-links { justify-self: center; display: flex; align-items: center; gap: 22px; color: #d8d3bf; font-size: 14px; }
.nav-links a { opacity: .82; }
.nav-links a:hover, .nav-links a.active { color: var(--gold-2); opacity: 1; }
.btn { height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(236,230,203,.34); padding: 0 16px; font-weight: 900; }
.btn.primary { background: linear-gradient(135deg, var(--gold), #a9924c); color: #12110c; }
.hero {
  min-height: 280px;
  display: grid;
  align-items: end;
  padding: 92px clamp(18px, 5vw, 72px) 42px;
  background:
    linear-gradient(90deg, rgba(7,10,11,.92), rgba(7,10,11,.66)),
    url("./assets/hero.jpg") center / cover no-repeat;
}
.hero-inner, .main-inner { max-width: 1180px; width: 100%; margin: 0 auto; }
.ranking-page-inner { max-width: 1420px; }
.kicker { color: var(--gold-2); font-weight: 900; letter-spacing: .18em; }
h1 { margin: 14px 0 0; font-size: clamp(42px, 7vw, 82px); line-height: .95; }
.lead { margin-top: 16px; color: #e5dec8; line-height: 1.8; max-width: 820px; font-size: 18px; }
main { padding: 54px clamp(18px, 5vw, 72px) 80px; }
.content-card { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(18,24,22,.9), rgba(10,14,13,.96)); padding: 26px; margin-bottom: 16px; }
.content-card h2 { margin: 0 0 14px; color: var(--gold-2); font-size: 28px; }
.content-body { color: #e5dec8; line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; }
.pill { height: 30px; display: inline-flex; align-items: center; border: 1px solid var(--line); padding: 0 10px; color: #efe9d2; font-weight: 800; font-size: 13px; background: rgba(7,10,11,.54); }
.ranking-board {
  margin-bottom: 24px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(13,18,17,.9), rgba(5,7,7,.94));
  overflow: hidden;
}
.ranking-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding: 22px;
}
.ranking-head h2 { margin: 0; font-size: clamp(26px, 3vw, 40px); }
.ranking-head p { margin: 6px 0 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
.ranking-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.rank-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: rgba(4,6,6,.35);
}
.rank-tab {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  height: 42px;
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
}
.rank-tab:last-child { border-right: 0; }
.rank-tab.active { background: var(--gold); color: #11100d; }
.rank-server {
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(4,6,6,.35);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 900;
  outline: none;
}
.ranking-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 16px 22px 22px;
}
.ranking-panel {
  border: 1px solid var(--line);
  background: rgba(236,230,203,.035);
  padding: 16px;
  overflow: hidden;
  align-self: start;
}
.ranking-panel h3 { margin: 0; font-size: 20px; }
.ranking-list { display: grid; gap: 10px; margin-top: 12px; }
.rank-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border: 1px solid rgba(236,230,203,.12);
  background:
    linear-gradient(90deg, rgba(208,183,102,.11), transparent 32%),
    rgba(236,230,203,.045);
  min-height: 112px;
  padding: 12px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.squad-rank-row { min-height: 0; }
.rank-row:hover {
  transform: translateY(-2px);
  border-color: rgba(208,183,102,.34);
  background:
    linear-gradient(90deg, rgba(208,183,102,.16), transparent 36%),
    rgba(236,230,203,.06);
}
.rank-num {
  grid-column: 1;
  grid-row: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(208,183,102,.12);
  color: var(--gold-2);
  font-weight: 900;
  border: 1px solid rgba(208,183,102,.3);
}
.rank-identity { grid-column: 2; grid-row: 1; min-width: 0; }
.rank-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 17px; font-weight: 900; }
.rank-title span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-desc { margin: 4px 0 0; color: var(--muted); line-height: 1.5; font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.member-label { color: var(--gold-2); font-weight: 900; margin-right: 4px; }
.member-divider { color: rgba(236,230,203,.38); margin: 0 8px; }
.leader-name { color: #fff0cd; font-weight: 900; }
.rank-line {
  grid-column: 2 / 4;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}
.squad-rank-row .rank-line { grid-template-columns: .9fr .9fr 1.35fr .95fr; }
.rank-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.rank-chip {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border-left: 2px solid rgba(208,183,102,.55);
  background: linear-gradient(90deg, rgba(208,183,102,.08), rgba(4,6,6,.08));
  padding: 6px 8px;
}
.rank-chip span { color: var(--gold-2); font-size: 12px; font-weight: 900; }
.rank-chip strong { color: #fff0cd; font-size: 13px; line-height: 1.3; word-break: keep-all; }
.rank-chip.feature strong { font-size: 14px; }
.rank-score {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  text-align: right;
  color: #fff0cd;
  font-weight: 950;
  font-size: 24px;
  line-height: 1;
  min-width: 72px;
}
.rank-score span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 800; }
.ranking-empty { color: var(--muted); line-height: 1.7; border: 1px dashed var(--line); padding: 18px; margin-top: 16px; }
.footer { padding: 34px clamp(18px, 5vw, 72px); border-top: 1px solid var(--line); color: var(--muted); }
.footer .main-inner { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
@media (max-width: 900px) {
  .nav {
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 106px;
    gap: 10px 12px;
    padding: 10px 18px;
  }
  .brand { font-size: 14px; }
  .brand-mark { width: 30px; height: 30px; }
  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a {
    flex: 0 0 auto;
    border: 1px solid rgba(236,230,203,.18);
    background: rgba(236,230,203,.06);
    padding: 8px 10px;
    font-size: 13px;
  }
  .nav .btn { height: 36px; padding: 0 12px; font-size: 13px; }
  .hero { padding-top: 92px; }
  .content-card { padding: 20px; }
  .ranking-grid { grid-template-columns: 1fr; }
  .ranking-panel { padding: 18px; }
  .rank-row { grid-template-columns: 36px minmax(0, 1fr); align-items: start; }
  .rank-num { grid-column: 1; grid-row: 1 / span 3; }
  .rank-identity { grid-column: 2; grid-row: 1; }
  .rank-line { grid-column: 2; grid-row: 2; grid-template-columns: 1fr; }
  .squad-rank-row .rank-line { grid-template-columns: 1fr; }
  .rank-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-chip { grid-template-columns: 1fr; gap: 4px; }
  .rank-chip strong { white-space: normal; }
  .rank-score { grid-column: 2; grid-row: 3; text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .rank-score span { display: inline; margin-top: 0; }
  .ranking-head { display: grid; padding: 14px; }
  .ranking-actions { justify-content: stretch; }
  .rank-tabs, .rank-server { width: 100%; }
  .ranking-grid { padding: 14px; }
  .rank-row { grid-template-columns: 32px minmax(0, 1fr); padding: 10px; }
  .rank-num { width: 30px; height: 30px; }
  .rank-group { grid-template-columns: 1fr; }
}
