:root {
  --ink: #101114;
  --coal: #17191d;
  --coal-2: #22252b;
  --stone: #6f7379;
  --stone-light: #a9adb3;
  --stone-dark: #3c4046;
  --grass: #4f9b3d;
  --grass-light: #7fd058;
  --grass-dark: #2f642c;
  --dirt: #7a5232;
  --dirt-dark: #4b301f;
  --wood: #b47742;
  --gold: #ffd65a;
  --redstone: #ee4a4f;
  --diamond: #6ee7f5;
  --lapis: #4f7bea;
  --discord: #5865f2;
  --discord-dark: #3740a3;
  --online: #5ee36b;
  --offline: #ff5c62;
  --text: #f8fbff;
  --text-muted: #b9c0c8;
  --paper: #e7e1ce;
  --paper-ink: #231b14;
  --shadow-text: 2px 2px 0 rgba(0, 0, 0, 0.55);
  --font-pixel: "Press Start 2P", monospace;
  --font-jp: "DotGothic16", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-jp);
  line-height: 1.8;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, #13151a 0%, #1d2026 48%, #151719 100%);
  background-size: 32px 32px, 32px 32px, auto;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

code,
.ip {
  font-family: var(--font-pixel);
  font-size: 0.72em;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 12px 24px;
  background: rgba(16, 17, 20, 0.92);
  border-bottom: 4px solid #000;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.12rem;
  text-decoration: none;
  text-shadow: var(--shadow-text);
  white-space: nowrap;
}

.brand-block {
  width: 34px;
  height: 34px;
  display: inline-block;
  flex: 0 0 auto;
  image-rendering: pixelated;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 10%, transparent 10% 100%),
    linear-gradient(var(--grass-light) 0 22%, var(--grass) 22% 44%, var(--dirt) 44% 100%);
  border: 3px solid #000;
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.18),
    inset -3px -3px 0 rgba(0, 0, 0, 0.35);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.16s ease, transform 0.16s ease;
}

.nav__links a:hover {
  color: var(--gold);
  transform: translateY(-1px);
}

.nav__discord {
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 6px 14px;
  color: #fff !important;
  background: var(--discord);
  border: 3px solid #000;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.28),
    inset -2px -2px 0 var(--discord-dark),
    0 4px 0 rgba(0, 0, 0, 0.35);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: end;
  gap: 32px;
  min-height: 690px;
  padding: 104px 6vw 64px;
  overflow: hidden;
  border-bottom: 6px solid #000;
  background:
    linear-gradient(90deg, rgba(9, 10, 13, 0.82) 0%, rgba(9, 10, 13, 0.42) 48%, rgba(9, 10, 13, 0.7) 100%),
    linear-gradient(180deg, rgba(9, 10, 13, 0.08) 0%, rgba(9, 10, 13, 0.52) 100%),
    url("01.png") center 42% / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  image-rendering: pixelated;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0 4px, transparent 4px 16px),
    linear-gradient(180deg, var(--grass-light) 0 10px, var(--grass) 10px 18px, var(--dirt) 18px 100%);
  background-size: 16px 42px, auto;
  border-top: 4px solid #000;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero__eyebrow,
.section__kicker {
  margin: 0 0 12px;
  color: var(--diamond);
  font-family: var(--font-pixel);
  font-size: 0.66rem;
  line-height: 1.8;
  text-shadow: var(--shadow-text);
}

.hero__title {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 3.7rem;
  line-height: 1.28;
  text-shadow:
    4px 4px 0 #000,
    8px 8px 0 rgba(0, 0, 0, 0.28);
}

.hero__subtitle {
  max-width: 650px;
  margin: 18px 0 0;
  color: #fff;
  font-size: 1.28rem;
  text-shadow: var(--shadow-text);
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.address {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 56px;
  max-width: 100%;
  padding: 10px 14px;
  color: #fff;
  font: inherit;
  cursor: pointer;
  background: #5d626a;
  border: 4px solid #000;
  box-shadow:
    inset 3px 3px 0 var(--stone-light),
    inset -3px -3px 0 var(--stone-dark),
    0 5px 0 rgba(0, 0, 0, 0.42);
  text-shadow: var(--shadow-text);
}

.address:hover {
  filter: brightness(1.08);
}

.address:active {
  transform: translateY(3px);
  box-shadow:
    inset -3px -3px 0 var(--stone-light),
    inset 3px 3px 0 var(--stone-dark),
    0 2px 0 rgba(0, 0, 0, 0.42);
}

.address__label,
.address__copy {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 4px 7px;
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  line-height: 1.4;
  background: var(--ink);
}

.address__copy {
  color: var(--gold);
}

.address__value {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  line-height: 1.7;
}

.hero__hud {
  position: relative;
  z-index: 1;
  align-self: end;
  width: 100%;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 12px, transparent 12px 24px),
    rgba(18, 20, 24, 0.88);
  background-size: 24px 24px, auto;
  border: 4px solid #000;
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.14),
    inset -3px -3px 0 rgba(0, 0, 0, 0.45),
    0 10px 0 rgba(0, 0, 0, 0.38);
}

.hud__topline,
.hud__meta,
.server-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
  min-height: 34px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.42);
  border: 3px solid #000;
  color: var(--text);
  white-space: nowrap;
}

.dot {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 2px solid #000;
}

.dot--online {
  background: var(--online);
  box-shadow: 0 0 12px rgba(94, 227, 107, 0.75);
}

.dot--offline {
  background: var(--offline);
}

.dot--loading {
  background: var(--gold);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

.hud__source,
.hud__meta {
  min-width: 0;
  color: var(--text-muted);
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  line-height: 1.7;
  text-align: right;
}

.hud__source {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud__count {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 22px 0 14px;
  font-family: var(--font-pixel);
}

.hud__num {
  color: var(--online);
  font-size: 2.6rem;
  line-height: 1;
  text-shadow: 3px 3px 0 #000;
}

.hud__slash,
.hud__max {
  color: var(--text-muted);
}

.hud__unit {
  color: var(--gold);
  font-size: 0.58rem;
}

.xpbar {
  width: 100%;
  height: 18px;
  overflow: hidden;
  background: #1a1b1f;
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.55);
}

.xpbar__fill {
  width: 0%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0 4px, transparent 4px 8px),
    linear-gradient(180deg, #a7ff48 0%, #5cc91d 100%);
  background-size: 8px 100%, auto;
  transition: width 0.45s ease;
}

.hud__meta {
  margin-top: 12px;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section--status {
  padding-top: 62px;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section__title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 1.2rem;
  line-height: 1.8;
  text-shadow: var(--shadow-text);
}

.section__badge {
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 6px 12px;
  color: var(--paper-ink);
  background: var(--paper);
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.45), inset -2px -2px 0 rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
}

.empty-card,
.server-card,
.map-card,
.step,
.discord-cta {
  min-width: 0;
  border: 4px solid #000;
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.22),
    inset -3px -3px 0 rgba(0, 0, 0, 0.34),
    0 6px 0 rgba(0, 0, 0, 0.32);
}

.empty-card {
  grid-column: 1 / -1;
  min-height: 148px;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--text-muted);
  text-align: center;
  background: var(--coal-2);
}

.server-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  color: var(--paper-ink);
  text-shadow: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 1px, transparent 1px 12px),
    var(--paper);
  background-size: 12px 12px, auto;
}

.server-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.server-card__head > div {
  min-width: 0;
}

.server-card__icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: cover;
  image-rendering: pixelated;
  background:
    linear-gradient(135deg, var(--stone-dark) 0 25%, var(--stone) 25% 50%, var(--stone-dark) 50% 75%, var(--stone) 75%);
  background-size: 18px 18px;
  border: 3px solid #000;
}

.server-card__name {
  color: var(--paper-ink);
  font-size: 1.18rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.server-card__ver,
.server-card__motd {
  color: #5e5143;
  font-family: var(--font-pixel);
  font-size: 0.52rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.server-card__motd {
  min-height: 42px;
  margin: 0;
  font-family: var(--font-jp);
  font-size: 0.95rem;
  color: #3a3128;
}

.server-card__players {
  color: var(--paper-ink);
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  line-height: 1.7;
  white-space: nowrap;
}

.server-card__players b {
  color: var(--grass-dark);
}

.badge-state {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 9px;
  border: 3px solid #000;
  font-size: 0.9rem;
  line-height: 1.2;
}

.badge-state--on {
  color: #08320e;
  background: var(--online);
}

.badge-state--off {
  color: #fff;
  background: var(--offline);
  text-shadow: var(--shadow-text);
}

.mini-bar {
  height: 14px;
  margin-top: auto;
  overflow: hidden;
  background: #1e1e21;
  border: 3px solid #000;
}

.mini-bar__fill {
  width: 0%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0 4px, transparent 4px 8px),
    var(--grass-light);
  background-size: 8px 100%, auto;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.map-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  overflow: hidden;
  color: var(--paper-ink);
  text-decoration: none;
  background: var(--paper);
  text-shadow: none;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.map-card:hover {
  transform: translateY(-5px);
  filter: brightness(1.04);
}

.map-card__scene {
  position: relative;
  min-height: 190px;
  aspect-ratio: 16 / 9;
  background-position: center;
  background-size: cover;
  border-bottom: 4px solid #000;
  overflow: hidden;
}

.map-card__scene::before,
.map-card__scene::after {
  content: "";
  position: absolute;
  display: block;
}

.map-card__scene::before {
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.26) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 16px);
  background-size: auto, 16px 16px;
}

.map-card__scene::after {
  display: none;
}

.map-card__scene--main {
  background-image: url("02.png");
}

.map-card__scene--alt {
  background-image: url("03.png");
}

.map-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 5px 9px;
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  background: rgba(0, 0, 0, 0.62);
  border: 3px solid #000;
}

.map-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px;
}

.map-card__body h3,
.step__body h3,
.discord-cta h2 {
  margin: 0;
  color: var(--paper-ink);
  font-size: 1.2rem;
  line-height: 1.5;
}

.map-card__body p,
.step__body p,
.discord-cta p,
.note,
.muted {
  color: #4d443a;
}

.map-card__body p {
  margin: 0 0 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: var(--font-pixel);
  font-size: 0.52rem;
  line-height: 1.8;
}

.mc-btn {
  display: inline-grid;
  place-items: center;
  min-height: 46px;
  padding: 8px 17px;
  color: #fff;
  font: inherit;
  line-height: 1.25;
  text-decoration: none;
  text-shadow: var(--shadow-text);
  cursor: pointer;
  background: var(--stone);
  border: 3px solid #000;
  box-shadow:
    inset 2px 2px 0 var(--stone-light),
    inset -2px -2px 0 var(--stone-dark),
    0 4px 0 rgba(0, 0, 0, 0.34);
  transition: filter 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.mc-btn:hover {
  filter: brightness(1.1);
}

.mc-btn:active {
  transform: translateY(2px);
  box-shadow:
    inset -2px -2px 0 var(--stone-light),
    inset 2px 2px 0 var(--stone-dark),
    0 2px 0 rgba(0, 0, 0, 0.34);
}

.mc-btn--green {
  background: var(--grass);
  box-shadow:
    inset 2px 2px 0 var(--grass-light),
    inset -2px -2px 0 var(--grass-dark),
    0 4px 0 rgba(0, 0, 0, 0.34);
}

.mc-btn--discord {
  background: var(--discord);
  box-shadow:
    inset 2px 2px 0 #8a93f7,
    inset -2px -2px 0 var(--discord-dark),
    0 4px 0 rgba(0, 0, 0, 0.34);
}

.mc-btn--lg {
  min-height: 54px;
  padding: 11px 24px;
  font-size: 1.06rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  min-height: 0;
  padding: 18px;
  color: var(--paper-ink);
  text-shadow: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 12px),
    var(--paper);
  background-size: 12px 12px, auto;
}

.step__num {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  color: #102a13;
  font-family: var(--font-pixel);
  font-size: 0.92rem;
  line-height: 1;
  background: var(--grass-light);
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.28), inset -2px -2px 0 var(--grass-dark);
}

.step__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  height: 100%;
}

.step__body p {
  margin: 0;
  overflow-wrap: anywhere;
}

.step__body code,
.note code {
  max-width: 100%;
  padding: 2px 6px;
  color: var(--paper-ink);
  background: rgba(0, 0, 0, 0.1);
  overflow-wrap: anywhere;
}

.note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 0;
  padding: 16px 18px;
  color: var(--paper-ink);
  background:
    linear-gradient(90deg, rgba(255, 214, 90, 0.22) 0 12px, transparent 12px 24px),
    var(--paper);
  background-size: 24px 100%, auto;
  border: 4px solid #000;
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.36),
    inset -3px -3px 0 rgba(0, 0, 0, 0.22),
    0 5px 0 rgba(0, 0, 0, 0.28);
  text-shadow: none;
}

.note strong {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: #1f160b;
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  line-height: 1.6;
  background: var(--gold);
  border: 3px solid #000;
}

.note span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.step .mc-btn {
  max-width: 100%;
  text-align: center;
}

.section--discord {
  max-width: 100%;
  padding-top: 42px;
}

.discord-cta {
  max-width: 920px;
  margin: 0 auto;
  padding: 36px 28px;
  color: var(--paper-ink);
  text-align: center;
  text-shadow: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0 12px, transparent 12px 24px),
    var(--paper);
  background-size: 24px 24px, auto;
}

.discord-cta .section__kicker {
  color: var(--lapis);
  text-shadow: none;
}

.discord-cta p {
  margin: 10px 0 22px;
}

.footer {
  padding: 38px 20px;
  color: var(--text-muted);
  text-align: center;
  background: #0f1012;
  border-top: 4px solid #000;
}

.footer p {
  margin: 0;
}

.footer .muted {
  display: block;
  margin-top: 6px;
  color: #8f97a3;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  color: #fff;
  text-align: center;
  background: var(--ink);
  border: 3px solid #000;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(18px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 760px;
    padding-top: 92px;
  }

  .hero__hud {
    max-width: 520px;
  }

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

@media (max-width: 720px) {
  .nav {
    min-height: 64px;
    padding: 10px 14px;
  }

  .nav__brand {
    font-size: 1rem;
  }

  .nav__links {
    gap: 10px;
  }

  .nav__links a:not(.nav__discord) {
    display: none;
  }

  .hero {
    min-height: 700px;
    padding: 80px 18px 58px;
    background-position: center top;
  }

  .hero__hud {
    padding: 16px;
  }

  .hud__topline,
  .hud__meta,
  .server-card__row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .hud__source {
    max-width: 100%;
  }

  .hero__title {
    font-size: 2.35rem;
  }

  .hero__subtitle {
    font-size: 1.08rem;
  }

  .address {
    width: 100%;
  }

  .hero__actions .mc-btn {
    width: 100%;
  }

  .section {
    padding: 56px 18px;
  }

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

  .server-grid,
  .map-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    min-height: 0;
  }

  .step .mc-btn {
    width: 100%;
  }

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

@media (max-width: 420px) {
  .hero__title {
    font-size: 1.82rem;
  }

  .hero__eyebrow,
  .section__kicker,
  .hud__source,
  .hud__meta,
  .map-card__body p {
    font-size: 0.48rem;
  }

  .section__title {
    font-size: 0.95rem;
  }

  .hud__num {
    font-size: 2.05rem;
  }

  .hud__topline {
    flex-direction: column;
  }

  .hud__source {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .address__value {
    font-size: 0.6rem;
  }

  .server-card {
    padding: 14px;
  }

  .server-card__icon {
    width: 46px;
    height: 46px;
  }

  .server-card__name {
    font-size: 1.05rem;
  }

  .server-card__ver {
    font-size: 0.45rem;
  }

  .server-card__motd {
    min-height: 0;
    font-size: 0.86rem;
  }

  .server-card__row {
    flex-direction: column;
  }

  .server-card__players {
    margin-left: 0;
    font-size: 0.66rem;
  }
}
