:root {
  color-scheme: dark;
  --bg: #050806;
  --bg-soft: #0a130d;
  --card: rgba(15, 24, 18, 0.72);
  --card-strong: rgba(19, 31, 23, 0.9);
  --line: rgba(154, 255, 180, 0.14);
  --line-strong: rgba(154, 255, 180, 0.28);
  --text: #eef8f0;
  --muted: #93a89a;
  --faint: #64746a;
  --green: #56f089;
  --green-strong: #27d96f;
  --amber: #f5bf53;
  --red: #ff6a62;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 6%, rgba(65, 255, 135, 0.16), transparent 28rem),
    radial-gradient(circle at 90% 16%, rgba(22, 119, 66, 0.26), transparent 30rem),
    linear-gradient(135deg, #030504 0%, #08110b 42%, #020403 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 40px 0 26px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: end;
  min-height: 360px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(16, 27, 20, 0.88), rgba(5, 9, 7, 0.64)),
    radial-gradient(circle at 78% 16%, rgba(75, 255, 132, 0.18), transparent 24rem);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.section-label {
  display: inline-flex;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 820px;
  margin-top: 16px;
  font-size: 7.4rem;
  line-height: 0.86;
  letter-spacing: 0;
}

h2 {
  font-size: 1.8rem;
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
  letter-spacing: 0;
}

.hero-copy p,
.section-heading p,
.quick-join p,
.rules-panel p,
.server-description {
  color: var(--muted);
}

.hero-copy > p {
  max-width: 680px;
  margin-top: 22px;
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions,
.badge-row,
.server-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.server-actions {
  justify-content: flex-end;
}

.hero-actions {
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover,
.copy-box:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(78, 255, 137, 0.09);
}

.button:focus-visible,
.copy-box:focus-visible {
  outline: 3px solid rgba(86, 240, 137, 0.34);
  outline-offset: 3px;
}

.button:active,
.copy-box:active {
  transform: translateY(0) scale(0.98);
}

.button-primary {
  border-color: rgba(86, 240, 137, 0.62);
  background: linear-gradient(135deg, var(--green), var(--green-strong));
  color: #031007;
  box-shadow: 0 0 32px rgba(86, 240, 137, 0.28);
}

.compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.operational-card,
.panel,
.status-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(19, 31, 23, 0.78), rgba(9, 15, 11, 0.62));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(16px);
}

.operational-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 118px;
  padding: 22px;
  border-radius: var(--radius);
}

.operational-card strong,
.operational-card span:last-child {
  display: block;
}

.operational-card strong {
  font-size: 1.3rem;
}

.operational-card span:last-child {
  margin-top: 4px;
  color: var(--muted);
}

.status-orb,
.mini-dot {
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(86, 240, 137, 0.12), 0 0 28px rgba(86, 240, 137, 0.7);
}

.status-orb {
  width: 14px;
  height: 14px;
}

.mini-dot {
  width: 8px;
  height: 8px;
}

.mini-dot.amber {
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(245, 191, 83, 0.1), 0 0 22px rgba(245, 191, 83, 0.55);
}

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

.status-card {
  min-height: 160px;
  padding: 18px;
  border-radius: 20px;
}

.status-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.icon-box {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(86, 240, 137, 0.08);
  color: var(--green);
}

.status-title,
.server-meta,
.footer,
.copy-hint,
.card-detail {
  color: var(--muted);
}

.status-title {
  display: block;
  margin-top: 18px;
  font-size: 0.82rem;
  font-weight: 800;
}

.status-value {
  display: block;
  margin-top: 8px;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0;
}

.card-detail {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.progress {
  height: 7px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #b7ffc8);
  box-shadow: 0 0 20px rgba(86, 240, 137, 0.38);
  transition: width 260ms ease;
}

.sparkline {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 34px;
  margin-top: 16px;
}

.sparkline span {
  width: 100%;
  min-width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #b7ffc8, var(--green-strong));
  opacity: 0.9;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
  margin-top: 18px;
}

.main-column,
.side-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.panel {
  padding: 22px;
  border-radius: var(--radius);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2,
.quick-join h2,
.rules-panel h2 {
  margin-top: 8px;
}

.section-heading p,
.quick-join p,
.rules-panel p {
  margin-top: 8px;
  line-height: 1.55;
}

.server-table {
  display: grid;
  gap: 10px;
}

.server-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 0.62fr 0.62fr 0.78fr 0.52fr 0.68fr minmax(160px, 1fr) 0.42fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(154, 255, 180, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

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

.server-icon {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(86, 240, 137, 0.24), rgba(86, 240, 137, 0.04)),
    #101a13;
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.server-description {
  margin-top: 3px;
  font-size: 0.87rem;
}

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

.server-meta {
  display: block;
  margin-bottom: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.server-value {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  font-weight: 800;
}

.player-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-badge,
.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(86, 240, 137, 0.28);
  border-radius: 999px;
  background: rgba(86, 240, 137, 0.11);
  color: #b8ffc9;
  font-size: 0.78rem;
  font-weight: 900;
}

.status-badge.maintenance {
  border-color: rgba(245, 191, 83, 0.28);
  background: rgba(245, 191, 83, 0.12);
  color: #ffd993;
}

.copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(86, 240, 137, 0.08);
  color: var(--text);
  font-weight: 900;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.copy-hint {
  font-size: 0.8rem;
}

.quick-join .badge-row {
  margin-top: 14px;
}

.steps {
  font-weight: 700;
}

.qr-block {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 132px;
  height: 132px;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.qr-block span {
  border-radius: 5px;
  background: rgba(86, 240, 137, 0.2);
}

.qr-block span:nth-child(1),
.qr-block span:nth-child(4),
.qr-block span:nth-child(6),
.qr-block span:nth-child(7),
.qr-block span:nth-child(10),
.qr-block span:nth-child(13),
.qr-block span:nth-child(16) {
  background: var(--green);
}

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

.maintenance-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(154, 255, 180, 0.09);
}

.maintenance-item:first-child {
  border-top: 0;
}

.maintenance-item p {
  margin-top: 4px;
  color: var(--muted);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 4px 0;
  font-size: 0.88rem;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  transform: translateY(18px);
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(12, 22, 15, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1100px) {
  .hero,
  .content-layout {
    grid-template-columns: 1fr;
  }

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

  h1 {
    font-size: 5.4rem;
  }

  .server-row {
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(110px, 0.5fr));
  }

  .server-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 24px, 1240px);
    padding-top: 18px;
  }

  .hero,
  .panel {
    padding: 20px;
    border-radius: 22px;
  }

  h1 {
    font-size: 3.9rem;
  }

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

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

  .server-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .server-actions .button {
    width: 100%;
  }

  .footer {
    display: grid;
  }
}
