:root {
  --bg: #050f0b;
  --text: #ebf8ee;
  --muted: #9eb7a5;
  --stroke: rgba(175, 255, 195, 0.16);
  --accent: #148d09;
  --accent-2: #22cb13;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(80rem 40rem at 10% -20%, rgba(20, 141, 9, 0.22), transparent 60%),
    radial-gradient(70rem 30rem at 100% -10%, rgba(22, 245, 95, 0.16), transparent 60%),
    linear-gradient(180deg, #020805 0%, var(--bg) 45%, #06130d 100%);
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stroke);
  background: rgba(4, 13, 9, 0.84);
}

.topbar__inner {
  width: min(1200px, 94%);
  margin: 0 auto;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  color: white;
  text-decoration: none;
}

.brand__badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #031604;
}

.brand__text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 1.2rem;
}

.topbar__meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.discord-btn {
  text-decoration: none;
  color: #c8f9c8;
  border: 1px solid rgba(34, 203, 19, 0.45);
  background: rgba(20, 141, 9, 0.2);
  border-radius: 10px;
  padding: 0.42rem 0.7rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.discord-btn:hover {
  background: rgba(20, 141, 9, 0.32);
}

.container {
  width: min(1280px, 94%);
  margin: 0 auto;
  padding: 2.4rem 0 2.8rem;
}

.container--narrow {
  width: min(1080px, 94%);
}

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

h1,
h2,
h3 {
  font-family: 'Space Grotesk', sans-serif;
  margin: 0;
}

.hero {
  text-align: center;
  margin: 1.1rem 0 2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--accent-2);
  font-size: 0.8rem;
  margin: 0;
}

.hero h1 {
  margin-top: 0.45rem;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
}

.hero__subtitle {
  margin: 0.75rem auto 0;
  max-width: 760px;
  color: var(--muted);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

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

.kpi-card {
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(12, 32, 23, 0.9), rgba(8, 20, 15, 0.88));
  border-radius: 14px;
  padding: 1rem;
}

.kpi-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.kpi-card h3 {
  margin-top: 0.3rem;
  font-size: 1.45rem;
}

.kpi-card--accent {
  box-shadow: inset 0 0 0 1px rgba(34, 203, 19, 0.35);
}

.scope-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.2rem 0;
}

.scope-card {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 1rem;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(165deg, rgba(9, 25, 18, 0.95), rgba(5, 14, 10, 0.95));
  transition: 180ms ease;
}

.scope-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 203, 19, 0.45);
}

.scope-card.active {
  border-color: rgba(34, 203, 19, 0.8);
  box-shadow: inset 0 -3px 0 rgba(34, 203, 19, 0.8);
}

.scope-card h3 {
  font-size: 1.1rem;
}

.scope-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.controls {
  margin: 1rem 0;
}

.filters {
  display: grid;
  grid-template-columns: 2.2fr 1fr 0.7fr auto;
  gap: 0.8rem;
  align-items: end;
}

.field {
  display: grid;
  gap: 0.34rem;
}

.field label {
  font-size: 0.83rem;
  color: var(--muted);
}

input,
select,
.btn {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(8, 20, 15, 0.84);
  color: var(--text);
  height: 42px;
  padding: 0 0.85rem;
  font: inherit;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(34, 203, 19, 0.8);
}

.btn {
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(180deg, #1aad12, #0f7d08);
  color: #062109;
}

.panel {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(9, 23, 17, 0.9), rgba(6, 16, 12, 0.94));
  padding: 0.9rem;
}

.panel h3 {
  margin-bottom: 0.8rem;
}

.panel--online {
  margin: 0.9rem 0 1.2rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.panel-head p {
  margin: 0;
}

.online-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.online-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--stroke);
  background: rgba(6, 16, 12, 0.8);
  border-radius: 999px;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
}

.table-wrap {
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(7, 18, 13, 0.98), rgba(4, 10, 8, 0.98));
}

.table-wrap--compact {
  margin-top: 0.4rem;
}

.leaderboard {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.leaderboard--compact {
  min-width: 760px;
}

.leaderboard th,
.leaderboard td {
  border-bottom: 1px solid rgba(168, 235, 189, 0.08);
  padding: 0.85rem 0.75rem;
  text-align: left;
  font-size: 0.95rem;
}

.leaderboard th {
  color: #b6ceb9;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.rank {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

.player-link {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  gap: 0.56rem;
  align-items: center;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(20, 141, 9, 0.2);
  border: 1px solid rgba(34, 203, 19, 0.35);
  flex: 0 0 auto;
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.avatar--lg {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.player-hero {
  margin: 0.5rem 0 1.2rem;
}

.player-hero--card {
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(9, 23, 17, 0.9), rgba(6, 16, 12, 0.94));
  padding: 1rem;
}

.player-headline {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-title {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.player-subtitle {
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.status-pill {
  margin-left: auto;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.6px;
  font-weight: 700;
}

.status-pill--on {
  background: rgba(31, 207, 35, 0.2);
  color: #94ff98;
}

.status-pill--off {
  background: rgba(190, 190, 190, 0.18);
  color: #d2ddd6;
}

.back-link {
  color: #9de0a0;
  text-decoration: none;
  font-weight: 600;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.mini-table {
  display: grid;
  gap: 0.5rem;
}

.mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.6rem 0.65rem;
  border-radius: 10px;
  background: rgba(2, 8, 6, 0.6);
}

.mini-row--head {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.65px;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  background: rgba(34, 203, 19, 0.2);
  color: #bdf6bc;
  padding: 0.25rem 0.58rem;
  font-weight: 700;
  font-size: 0.82rem;
}

.status-block {
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid var(--stroke);
  text-align: center;
  margin-top: 0.9rem;
}

.status-block--on {
  background: rgba(31, 207, 35, 0.14);
  color: #94ff98;
}

.status-block--off {
  background: rgba(163, 174, 167, 0.12);
  color: #d5e0d9;
}

.empty {
  text-align: center !important;
  color: var(--muted);
  padding: 1.2rem !important;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  margin: 1rem 0;
}

.page-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  text-decoration: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  color: var(--text);
  background: rgba(10, 20, 16, 0.85);
}

.page-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.page-info {
  margin: 0 0.5rem;
  color: var(--muted);
}

@media (max-width: 1060px) {
  .kpis,
  .scope-cards,
  .kpis--player {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 700px) {
  .topbar__meta {
    display: none;
  }

  .kpis,
  .scope-cards,
  .kpis--player {
    grid-template-columns: 1fr;
  }

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

  .player-headline {
    flex-wrap: wrap;
  }

  .status-pill {
    margin-left: 0;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .pagination {
    justify-content: center;
    flex-wrap: wrap;
  }
}
