:root {
  color-scheme: dark;
  --bg: #071016;
  --night: #101a2a;
  --panel: #17211c;
  --panel-strong: #223125;
  --grass: #54b948;
  --grass-bright: #9df56f;
  --leaf: #227a44;
  --stone: #919a97;
  --dirt: #805239;
  --diamond: #58e0d7;
  --redstone: #ff4a55;
  --gold: #ffd766;
  --text: #f6f8ef;
  --muted: #b7c8b7;
  --border: rgba(255, 255, 255, 0.18);
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(7, 16, 22, 0.3), rgba(7, 16, 22, 0.98) 62%),
    linear-gradient(135deg, #172d45 0%, #102034 42%, #0a1617 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 2px, transparent 2px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 75%);
}

.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.cloud,
.star {
  position: absolute;
  image-rendering: pixelated;
}

.cloud {
  width: 128px;
  height: 40px;
  background:
    linear-gradient(#f2f5e8, #d7dfca);
  box-shadow:
    32px -16px 0 #f2f5e8,
    64px 0 0 #f2f5e8,
    96px -8px 0 #e4eadb;
  opacity: 0.18;
  animation: drift 34s linear infinite;
}

.cloud-a { top: 12%; left: -180px; }
.cloud-b { top: 24%; left: -280px; animation-duration: 46s; animation-delay: -15s; transform: scale(0.75); }
.cloud-c { top: 8%; left: -220px; animation-duration: 58s; animation-delay: -28s; transform: scale(0.55); }

.star {
  width: 8px;
  height: 8px;
  background: var(--gold);
  box-shadow:
    0 0 0 4px rgba(255, 215, 102, 0.08),
    26vw 8vh 0 rgba(255, 255, 255, 0.7),
    48vw 16vh 0 rgba(88, 224, 215, 0.8),
    70vw 6vh 0 rgba(255, 255, 255, 0.65);
  animation: twinkle 2.4s ease-in-out infinite;
}

.star-a { top: 10%; left: 16%; }
.star-b { top: 18%; left: 72%; animation-delay: -0.7s; }
.star-c { top: 32%; left: 44%; animation-delay: -1.3s; }

.shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 42px;
}

.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.78fr);
  gap: 24px;
  align-items: stretch;
  padding: 42px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(84, 185, 72, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(88, 224, 215, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(16, 26, 42, 0.92), rgba(12, 20, 20, 0.96));
  box-shadow:
    0 32px 90px var(--shadow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 92px;
  background:
    repeating-linear-gradient(90deg, #5aa33d 0 42px, #4f9637 42px 84px),
    linear-gradient(#5aa33d, #5aa33d);
  box-shadow:
    0 -8px 0 #3f7f30,
    0 -16px 0 rgba(157, 245, 111, 0.22),
    inset 0 18px 0 rgba(255, 255, 255, 0.08);
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--grass-bright);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-family: "Press Start 2P", Inter, sans-serif;
  font-size: 4.6rem;
  line-height: 1.14;
  text-transform: uppercase;
  text-shadow:
    5px 5px 0 #1a281e,
    10px 10px 0 rgba(0, 0, 0, 0.22),
    0 0 34px rgba(157, 245, 111, 0.28);
}

h2 {
  font-size: 2.7rem;
}

.intro {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.server-strip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  min-height: 48px;
  padding: 0 18px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: rgba(4, 8, 10, 0.52);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.28);
}

.server-strip span {
  color: #08130c;
  background: var(--grass-bright);
  padding: 7px 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.server-strip strong {
  font-size: 1rem;
}

.voxel-scene {
  position: relative;
  z-index: 1;
  min-height: 430px;
  align-self: center;
}

.sun {
  position: absolute;
  top: 20px;
  right: 64px;
  width: 88px;
  height: 88px;
  background: #ffe873;
  box-shadow:
    0 0 0 10px rgba(255, 232, 115, 0.16),
    0 0 52px rgba(255, 232, 115, 0.36);
  animation: hover 6s ease-in-out infinite;
}

.floating-block {
  position: absolute;
  width: 118px;
  height: 118px;
  transform: rotateX(58deg) rotateZ(45deg);
  transform-style: preserve-3d;
  box-shadow: 20px 20px 34px rgba(0, 0, 0, 0.24);
  animation: blockFloat 5.8s ease-in-out infinite;
}

.floating-block::before,
.floating-block::after {
  content: "";
  position: absolute;
  background: inherit;
}

.floating-block::before {
  width: 100%;
  height: 34px;
  left: 0;
  bottom: -34px;
  filter: brightness(0.62);
  transform-origin: top;
  transform: skewX(45deg);
}

.floating-block::after {
  width: 34px;
  height: 100%;
  right: -34px;
  top: 0;
  filter: brightness(0.78);
  transform-origin: left;
  transform: skewY(45deg);
}

.block-grass {
  left: 40px;
  top: 132px;
  background:
    linear-gradient(#70c74d 0 28%, #7b5637 28% 100%),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(0, 0, 0, 0.12) 18px 20px);
}

.block-diamond {
  right: 72px;
  top: 176px;
  width: 92px;
  height: 92px;
  background:
    linear-gradient(135deg, #53605f 0 38%, #58e0d7 38% 50%, #384443 50% 100%);
  animation-delay: -1.8s;
}

.block-redstone {
  left: 210px;
  bottom: 126px;
  width: 72px;
  height: 72px;
  background:
    linear-gradient(135deg, #4a4d4d 0 34%, #ff4a55 34% 45%, #686b69 45% 100%);
  animation-delay: -3.1s;
}

.terrain {
  position: absolute;
  left: 6%;
  right: 2%;
  bottom: 20px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 0;
  height: 180px;
}

.terrain span {
  display: block;
  min-height: 66px;
  background:
    linear-gradient(#68bd48 0 22px, #7a5435 22px 54px, #5f4638 54px 100%);
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 8px 0 rgba(255, 255, 255, 0.08);
}

.terrain span:nth-child(2n) { height: 110px; }
.terrain span:nth-child(3n) { height: 146px; }
.terrain span:nth-child(5n) { height: 90px; }

.status-panel {
  position: absolute;
  z-index: 3;
  right: 34px;
  bottom: 34px;
  width: min(390px, calc(100% - 68px));
  border: 2px solid rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(26, 39, 32, 0.92), rgba(12, 18, 15, 0.94));
  padding: 20px;
  box-shadow:
    8px 8px 0 rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.panel-label {
  margin: 0 0 12px;
  color: var(--diamond);
  font-family: "Press Start 2P", Inter, sans-serif;
  font-size: 0.66rem;
  line-height: 1.5;
  text-transform: uppercase;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  font-size: 1.1rem;
  font-weight: 900;
}

.status-dot {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.18);
  animation: pulse 1.4s ease-in-out infinite;
}

.status-dot.online {
  background: var(--grass-bright);
  box-shadow:
    0 0 0 5px rgba(137, 214, 91, 0.18),
    0 0 22px rgba(137, 214, 91, 0.44);
}

.status-dot.offline {
  background: var(--redstone);
  box-shadow: 0 0 0 4px rgba(225, 93, 79, 0.18);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 0;
}

.stats div {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(88, 224, 215, 0.08), transparent 48%),
    var(--panel-strong);
}

dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 6px 0 0;
  font-size: 1.32rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.capacity {
  position: relative;
  height: 12px;
  margin-top: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.capacity span {
  display: block;
  width: 0%;
  height: 100%;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.15) 0 8px, transparent 8px 16px),
    linear-gradient(90deg, var(--grass), var(--diamond));
  transition: width 360ms ease;
}

.checked {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.map-section {
  margin-top: 26px;
  border: 2px solid var(--border);
  background:
    linear-gradient(180deg, rgba(25, 38, 36, 0.96), rgba(12, 17, 15, 0.96));
  box-shadow: 0 28px 70px var(--shadow);
  overflow: hidden;
}

.map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--border);
}

.map-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  color: #13200f;
  background: var(--grass-bright);
  border: 2px solid rgba(255, 255, 255, 0.25);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.map-link:hover {
  background: #a6ef74;
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.32);
}

.map-shell {
  padding: 12px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 12px, transparent 12px 24px),
    #0c110e;
}

.map-frame {
  display: block;
  width: 100%;
  height: 760px;
  min-height: 520px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: #0f130d;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 138px;
  }

  h1 {
    font-size: 3.25rem;
  }

  .voxel-scene {
    min-height: 340px;
  }

  .status-panel {
    left: 28px;
    right: 28px;
    bottom: 28px;
    width: auto;
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px 24px 130px;
  }

  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 2.15rem;
  }

  .voxel-scene {
    min-height: 300px;
  }

  .status-panel {
    left: 22px;
    right: 22px;
    bottom: 22px;
  }

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

  .map-link {
    width: 100%;
    justify-content: center;
  }

  .map-frame {
    height: 68vh;
    min-height: 420px;
  }
}

@media (max-width: 520px) {
  .hero,
  .map-header,
  .status-panel {
    padding: 18px;
  }

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

  h1 {
    font-size: 2rem;
    line-height: 1.22;
  }

  .server-strip {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 14px;
  }

  .voxel-scene {
    min-height: 240px;
  }

  .floating-block {
    transform: rotateX(58deg) rotateZ(45deg) scale(0.72);
  }

  .status-panel {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@keyframes drift {
  from { translate: -12vw 0; }
  to { translate: 118vw 0; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes hover {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@keyframes blockFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}
