:root {
  --bg: #070b11;
  --bg2: #0d1825;
  --panel: rgba(13, 22, 33, .86);
  --panel2: rgba(17, 30, 44, .94);
  --line: rgba(174, 197, 221, .16);
  --line-strong: rgba(174, 197, 221, .26);
  --text: #f5f8fb;
  --muted: #9eb0c3;
  --soft: #cbd6e1;
  --orange: #ff5a2a;
  --orange2: #ff9a5b;
  --green: #4ed49a;
  --blue: #5ab8ff;
  --warn: #ffd166;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 90, 42, .08), transparent 260px),
    radial-gradient(900px 560px at 92% -10%, rgba(255, 90, 42, .18), transparent 68%),
    radial-gradient(760px 620px at 0 10%, rgba(90, 184, 255, .12), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-attachment: fixed;
}

a {
  color: inherit;
}

.shell {
  width: min(1240px, calc(100% - 36px));
  margin: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 17, .78);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--orange), #d82f18);
  box-shadow: 0 10px 28px rgba(255, 90, 42, .28);
}

.accent,
.gradient {
  color: var(--orange);
}

nav {
  display: flex;
  gap: 6px;
}

nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

nav a:hover,
nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 42px;
  padding: 64px 0 28px;
}

.eyebrow {
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(78, 212, 154, .1);
}

h1 {
  max-width: 780px;
  margin: 15px 0 14px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: .98;
  letter-spacing: 0;
}

h1 .gradient {
  background: linear-gradient(90deg, #ff744d, #ffc078);
  -webkit-background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.hero p strong {
  color: var(--soft);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 1px;
  overflow: hidden;
  min-width: 500px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.hero-stats div {
  padding: 15px 16px;
  background: rgba(11, 20, 31, .76);
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  font-size: 30px;
  line-height: 1.05;
}

.hero-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.overview {
  margin: 4px 0 14px;
}

.section-title {
  margin: 0 0 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.spotlight {
  min-height: 100%;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 170px auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 15, 23, .78);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
}

.activity {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 15, 23, .72);
}

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

.activity h2 {
  margin: 0;
  font-size: 22px;
}

.activity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: 12px;
}

.activity-grid.single {
  grid-template-columns: 1fr;
}

.chart-card,
.rank-card {
  min-width: 0;
  border: 1px solid rgba(174, 197, 221, .12);
  border-radius: 8px;
  background: rgba(5, 10, 16, .44);
}

.chart-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid rgba(174, 197, 221, .1);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.chart-title strong {
  color: var(--soft);
}

#activityChart {
  display: block;
  width: 100%;
  height: 260px;
  border-radius: 0 0 8px 8px;
}

.rank-list {
  display: grid;
}

.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(174, 197, 221, .08);
  color: inherit;
  text-decoration: none;
}

.rank-row:hover {
  background: rgba(255, 255, 255, .045);
}

.rank-row span {
  min-width: 0;
}

.rank-row strong,
.rank-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.rank-row b {
  flex: 0 0 auto;
  color: var(--orange2);
  font-size: 13px;
}

input,
select,
button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 29, 43, .9);
  color: var(--text);
  font: inherit;
}

.search {
  position: relative;
}

.search span {
  position: absolute;
  top: 9px;
  left: 14px;
  color: var(--muted);
  font-size: 20px;
}

.search input {
  width: 100%;
  padding: 0 14px 0 42px;
  outline: none;
}

.search input:focus,
select:focus {
  border-color: rgba(255, 90, 42, .7);
}

select {
  padding: 0 13px;
}

button {
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  background: #233649;
}

.meta {
  display: flex;
  justify-content: space-between;
  padding: 18px 3px 10px;
  color: var(--muted);
  font-size: 13px;
}

.server-list {
  display: grid;
  gap: 10px;
}

.empty {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 210px;
  padding: 44px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(10, 18, 28, .52);
}

.empty strong {
  color: #fff;
  font-size: 18px;
}

.footer {
  display: flex;
  justify-content: space-between;
  margin-top: 54px;
  padding: 24px 0 35px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--soft);
  text-decoration: none;
}

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

  .hero-stats {
    min-width: 0;
  }

  .activity-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 22px, 1240px);
  }

  .hero {
    gap: 22px;
    padding: 42px 0 24px;
  }

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

  .toolbar .search,
  .toolbar button {
    grid-column: 1 / -1;
  }

  .activity-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  nav a:first-child {
    display: none;
  }

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

  .meta {
    display: block;
  }

  .meta span {
    display: block;
  }
}
