:root {
  --bg: #0b0d12;
  --bg-soft: #10141c;
  --card: #141a24;
  --card-2: #1a2230;
  --line: #263044;
  --line-soft: #1d2534;
  --text: #eef3f9;
  --muted: #96a3b8;
  --green: #66dc83;
  --green-strong: #3fc863;
  --red: #ff6070;
  --gold: #f3bd4f;
  --radius: 22px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 15% -10%, rgba(102, 220, 131, 0.12), transparent 34rem),
    radial-gradient(circle at 90% 8%, rgba(243, 189, 79, 0.08), transparent 30rem),
    linear-gradient(180deg, #0b0d12 0%, #0d1118 45%, #0a0c11 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  color: #9befae;
}

button {
  font: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #3c4a63 #0b0d12;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0b0d12;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #0b0d12;
  border-radius: 999px;
  background: linear-gradient(180deg, #465673, #2b3549);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5b6f91, #38455e);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--green);
  color: #08110a;
  font-weight: 700;
  transform: translateY(-140%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) auto;
  grid-template-areas:
    "eyebrow spud"
    "title spud"
    "cue spud";
  align-content: center;
  align-items: center;
  justify-content: center;
  column-gap: clamp(28px, 6vw, 90px);
  min-height: 100svh;
  padding: 80px 24px 48px;
  text-align: left;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: 40%;
  left: 50%;
  width: min(720px, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 220, 131, 0.16), rgba(102, 220, 131, 0.04) 42%, transparent 68%);
  transform: translate(-50%, -50%);
  filter: blur(20px);
  pointer-events: none;
}

.hero__eyebrow {
  grid-area: eyebrow;
  position: relative;
  justify-self: start;
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero__title {
  grid-area: title;
  position: relative;
  justify-self: start;
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.1rem, 5.6vw, 4.3rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hero__title span {
  color: var(--green);
  text-shadow: 0 0 42px rgba(102, 220, 131, 0.24);
}

.spud-scene {
  --size: 232px;
  --depth: 48px;
  grid-area: spud;
  position: relative;
  left: -150px;
  justify-self: center;
  width: var(--size);
  height: var(--size);
  margin: 0;
  perspective: 900px;
}

.spud-scene::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: 16%;
  bottom: 1%;
  left: 16%;
  height: 11%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  filter: blur(10px);
  pointer-events: none;
}

.spud-tilt {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  transform: rotateX(-8deg);
  transform-style: preserve-3d;
}

.spud {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: spud-spin 24s linear infinite;
  animation-play-state: running;
  will-change: transform;
}

.spud__face {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.spud__face--front {
  transform: translateZ(calc(var(--depth) / 2));
}

.spud__face--back {
  transform: rotateY(180deg) translateZ(calc(var(--depth) / 2));
}

.spud__side {
  position: absolute;
  inset: 0;
  background-image: var(--spud-side);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  transform: translateZ(calc(var(--depth) * var(--z)));
  pointer-events: none;
}

.scroll-cue {
  grid-area: cue;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  margin-top: 34px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.scroll-cue svg {
  animation: cue-bounce 2s ease-in-out infinite;
}

.scroll-cue:hover {
  color: var(--text);
  border-color: #3a4860;
  transform: translateY(2px);
}

.section {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 74px 0;
}

.section__head {
  margin-bottom: 24px;
}

.section__kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section__title {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 38%),
    linear-gradient(160deg, var(--card), #10151e);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.server-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.server-card {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 4vw, 34px);
}

.players-card {
  align-self: stretch;
  padding: clamp(20px, 4vw, 30px);
}

.server-card__head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.server-icon {
  flex: 0 0 auto;
  width: clamp(88px, 10vw, 116px);
  height: clamp(88px, 10vw, 116px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #0a0c11;
  image-rendering: pixelated;
  object-fit: cover;
}

.server-card__status {
  min-width: 0;
}

.online-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.status-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(150, 163, 184, 0.12);
}

.status-dot.is-online {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(102, 220, 131, 0.13), 0 0 18px rgba(102, 220, 131, 0.55);
}

.status-dot.is-offline {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 96, 112, 0.13), 0 0 18px rgba(255, 96, 112, 0.5);
}

.server-motd {
  margin: 4px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.server-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.server-meta__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.server-meta__row:last-child {
  border-bottom: 0;
}

.server-meta dt {
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.server-meta dd {
  margin: 0;
  min-width: 0;
  font-weight: 650;
}

.copy-ip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0e1219;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.copy-ip span {
  overflow-wrap: anywhere;
}

.copy-ip svg {
  flex: 0 0 auto;
  color: var(--green);
}

.copy-ip:hover {
  border-color: #3d4d68;
  background: #121824;
}

.copy-ip:active {
  transform: scale(0.985);
}

.players {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.players__head h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.pill {
  min-width: 34px;
  padding: 3px 10px;
  border: 1px solid rgba(102, 220, 131, 0.22);
  border-radius: 999px;
  background: rgba(102, 220, 131, 0.08);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.player-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.player-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #0f141d;
  color: #dbe4f0;
  font-size: 0.92rem;
}

.player-list__item::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.player-list__empty {
  padding: 10px 4px;
  color: var(--muted);
}

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

.faq-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--card), #10151e);
  overflow: hidden;
}

.faq-item summary {
  position: relative;
  padding: 18px 52px 18px 20px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 20px;
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-item p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
}

.section-jump {
  display: flex;
  justify-content: center;
  padding-top: 34px;
}

.section-jump a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 650;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.section-jump a:hover {
  color: var(--text);
  border-color: #3d4d68;
}

.section-jump svg {
  animation: cue-bounce 2s ease-in-out infinite;
}

.chart-card {
  padding: clamp(16px, 3vw, 26px);
}

.chart-legend {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.chart-legend__dot--online {
  background: var(--green);
}

.chart-legend__dot--offline {
  background: var(--red);
}

.chart-wrap {
  position: relative;
  height: 340px;
  min-height: 240px;
}

#online-chart {
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#online-chart.is-dragging {
  cursor: grabbing;
}

.chart-crosshair {
  position: absolute;
  z-index: 1;
  width: 0;
  border-left: 1px dashed rgba(219, 228, 240, 0.42);
  pointer-events: none;
}

.chart-crosshair.is-offline {
  border-left-color: rgba(255, 96, 112, 0.65);
}

.chart-point {
  position: absolute;
  z-index: 2;
  width: 10px;
  height: 10px;
  border: 2px solid #0a0d12;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(102, 220, 131, 0.2);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.chart-point.is-offline {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 96, 112, 0.2);
}

.chart-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  color: var(--muted);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 138px;
  padding: 9px 11px;
  border: 1px solid #34415a;
  border-radius: 10px;
  background: rgba(10, 13, 18, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.45;
  pointer-events: none;
  transform: translate(-50%, -110%);
}

.chart-tooltip strong {
  color: var(--green);
}

.chart-tooltip.is-offline strong {
  color: var(--red);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.stat {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #0e1219;
}

.stat__value {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.stat__label {
  color: var(--muted);
  font-size: 0.82rem;
}

.footer {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 44px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #0f141d;
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social svg {
  width: 20px;
  height: 20px;
}

.social:hover {
  color: var(--green);
  border-color: rgba(102, 220, 131, 0.4);
  transform: translateY(-2px);
}

.footer__host,
.footer__copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__host strong {
  color: var(--text);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border: 1px solid rgba(102, 220, 131, 0.36);
  border-radius: 999px;
  background: rgba(13, 20, 16, 0.96);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes spud-spin {
  from {
    transform: rotateY(-18deg);
  }
  to {
    transform: rotateY(342deg);
  }
}

@keyframes cue-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "eyebrow"
      "title"
      "spud"
      "cue";
    align-content: center;
    row-gap: 0;
    padding-top: 64px;
  }

  .spud-scene {
    left: 0;
    justify-self: center;
    margin: 32px 0 18px;
  }

  .scroll-cue {
    margin-top: 6px;
  }

  .server-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .section {
    width: min(1080px, calc(100% - 28px));
    padding: 56px 0;
  }

  .hero {
    padding-top: 64px;
  }

  .spud-scene {
    --size: 176px;
    --depth: 34px;
    margin: 32px 0 18px;
  }

  .server-card__head {
    align-items: flex-start;
  }

  .server-icon {
    width: 76px;
    height: 76px;
    border-radius: 16px;
  }

  .server-meta__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

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

  .chart-wrap {
    height: 270px;
  }

  .chart-legend {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .server-card__head {
    flex-direction: column;
  }

  .online-line {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-cue svg,
  .section-jump svg {
    animation: none;
  }
}
