:root {
  --bg0: #070a12;
  --bg1: #0b1020;

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --muted2: rgba(255, 255, 255, 0.48);

  --card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  --r: 18px;

  --good: rgba(110, 231, 183, 0.95);
  --warn: rgba(251, 191, 36, 0.95);
  --bad: rgba(248, 113, 113, 0.95);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x: hidden;
}

.page {
  min-height: 100vh;
  position: relative;
}

.wrap {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

/* Background */

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg__grid {
  position: absolute;
  inset: -40px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(
    circle at 50% 20%,
    #000 0%,
    #000 45%,
    transparent 88%
  );
  opacity: 0.26;
}

.bg__web {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  mix-blend-mode: screen;
  filter: blur(0.1px);
  mask-image: radial-gradient(
    circle at 50% 25%,
    #000 0%,
    #000 50%,
    transparent 92%
  );
}

.bg__web canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.bg__dust {
  position: absolute;
  inset: 0;
  opacity: 0.26;
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 10, 18, 0) 0%,
    rgba(7, 10, 18, 0.2) 55%,
    rgba(11, 16, 32, 0.35) 100%
  );
}

.topbar,
.hero {
  position: relative;
  z-index: 1;
}

/* Topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 28, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.2px;
}

.brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.07);
}

/* Status pill */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  user-select: none;
}

.pill__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.pill.good .pill__dot {
  background: var(--good);
}

.pill.warn .pill__dot {
  background: var(--warn);
}

.pill.bad .pill__dot {
  background: var(--bad);
}

/* Page */

.hero {
  padding: 28px 0 30px;
}

.hero__copy {
  margin-bottom: 14px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.3px;
}

.sub {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.5;
}

.meta-line {
  margin: 0;
  color: var(--muted2);
  font-size: 0.95rem;
}

.status-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px 0 18px;
}

.card {
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.03)
  );
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.card--wide {
  margin-bottom: 14px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  letter-spacing: 0.25px;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
}

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

.big {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.kvs {
  display: grid;
  gap: 8px;
}

.kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

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

.v {
  font-weight: 900;
  color: var(--text);
}

.muted {
  color: var(--muted2);
  line-height: 1.45;
}

/* Uptime bar */

.uptimebar-wrap {
  margin-top: 6px;
}

.uptimebar {
  display: grid;
  grid-template-columns: repeat(60, minmax(0, 1fr));
  gap: 2px;
  min-height: 14px;
}

.uptimebar__seg {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.uptimebar__seg.up {
  background: var(--good);
}

.uptimebar__seg.down {
  background: var(--bad);
}

/* Recent players */

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

.recent-item,
.recent-empty {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 12px 14px;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recent-player {
  font-weight: 800;
  color: var(--text);
}

.recent-time {
  color: var(--muted2);
  font-size: 0.95rem;
  text-align: right;
}

.recent-empty {
  color: var(--muted2);
}

.recent-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.recent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.recent-avatar__img,
.recent-avatar__fallback {
  width: 100%;
  height: 100%;
}

.recent-avatar__img {
  display: block;
  object-fit: cover;
  image-rendering: pixelated;
}

.recent-avatar__fallback {
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--text);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.06);
}

.recent-meta {
  min-width: 0;
  flex: 1;
}

.recent-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.recent-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.recent-badge.online {
  color: rgba(110, 231, 183, 0.98);
  background: rgba(110, 231, 183, 0.08);
}

.recent-badge.offline {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.05);
}

.recent-main--link {
  text-decoration: none;
  color: inherit;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.recent-main--link:hover {
  opacity: 0.92;
}

.recent-main--link:hover .recent-player {
  text-decoration: underline;
}

.recent-main--link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.28);
  outline-offset: 4px;
  border-radius: 12px;
}

/* Footer */

.foot {
  padding: 12px 0 28px;
  text-align: center;
}

/* Reveal */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
  }
}

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

  .topbar__inner {
    padding: 12px 0;
  }

  .pill {
    padding: 7px 11px;
  }

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

  .recent-player-row {
    align-items: flex-start;
  }
}
