/* =========================================================
   The Block Server - Landing Page (dark-only)
   ========================================================= */

:root {
  --bg0: #070a12;
  --bg1: #0b1020;
  --card: rgba(255, 255, 255, 0.06);
  --card2: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.7);
  --muted2: rgba(255, 255, 255, 0.55);
  --shadow: 0 16px 60px rgba(0, 0, 0, 0.45);
  --r: 18px;

  --accent: #7ee787;
  --accent2: #a7f3d0;

  --max: 1100px;
}

* {
  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;
}

a {
  color: inherit;
  text-decoration: none;
}
code {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--bg1);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  z-index: 9999;
}
.skip:focus {
  left: 12px;
}

/* =========================================================
   Topbar / Footer scroll-aware visibility
   - At top: hide footer
   - At bottom: hide topbar
   - No scroll: show both
   ========================================================= */

.topbar,
.footer {
  transition:
    transform 180ms ease,
    opacity 180ms ease;
  will-change: transform, opacity;
}

.topbar.is-hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

.footer.is-hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand__icon {
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  animation: float 5.5s ease-in-out infinite;
}
.brand__text {
  font-weight: 800;
  letter-spacing: 0.2px;
}
.topbar__actions {
  display: flex;
  gap: 10px;
}

/* =========================================================
   Status Pill (Hero)
   - Clickable link to status.theblockserver.com
   - Optional subtext populated by JS
   ========================================================= */

.statusPill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 800;
  width: fit-content;
  margin: 0 auto;
  cursor: pointer;

  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.statusPill:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.18);
}

.statusPill:active {
  transform: translateY(0) scale(0.99);
}

.statusPill:focus-visible {
  outline: 3px solid rgba(126, 231, 135, 0.35);
  outline-offset: 3px;
}

.statusDot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(126, 231, 135, 0.14);
  animation: pulse 2.4s ease-in-out infinite;
  flex: 0 0 auto;
}

/* Status colors driven by JS */
.statusPill.is-good .statusDot {
  background: rgba(110, 231, 183, 0.95);
  box-shadow: 0 0 0 6px rgba(110, 231, 183, 0.14);
}

.statusPill.is-warn .statusDot {
  background: rgba(251, 191, 36, 0.95);
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.14);
}

.statusPill.is-bad .statusDot {
  background: rgba(248, 113, 113, 0.95);
  box-shadow: 0 0 0 6px rgba(248, 113, 113, 0.14);
}

.statusPill.is-unknown .statusDot {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.1);
}

.statusText {
  display: grid;
  gap: 2px;
  line-height: 1.15;
}

.statusTitle {
  font-weight: 900;
  letter-spacing: 0.2px;
}

.statusMeta {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
}

.statusArrow {
  opacity: 0.7;
  font-weight: 900;
  margin-left: 4px;
}

/* tighten on small screens */
@media (max-width: 520px) {
  .statusPill {
    padding: 9px 12px;
    gap: 9px;
  }

  .statusMeta {
    font-size: 0.9rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}
.btn:active {
  transform: translateY(0) scale(0.99);
}
.btn--ghost {
  background: transparent;
}
.btn--primary {
  background: linear-gradient(
    135deg,
    rgba(126, 231, 135, 0.22),
    rgba(167, 243, 208, 0.16)
  );
  border-color: rgba(126, 231, 135, 0.35);
}
.btn__icon {
  opacity: 0.9;
}

/* Background ornaments */
.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.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;
}

/* Mouse-reactive "web" is drawn onto a canvas that sits here */
.bg__web {
  position: absolute;
  inset: 0;
  opacity: 0.38; /* more noticeable, still subtle */
  mix-blend-mode: screen;
  filter: blur(0.1px);
  mask-image: radial-gradient(
    circle at 50% 25%,
    #000 0%,
    #000 50%,
    transparent 92%
  );
}

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

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

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

/* Hero */
.hero {
  padding: 54px 0 34px;
}

.hero__inner {
  display: grid;
  gap: 18px;
  align-items: start;
  justify-items: center;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 700;
  width: fit-content;
  margin: 0 auto;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}
.dot--live {
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(126, 231, 135, 0.14);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.hero__titleIcon {
  width: 200px;
  height: 200px;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  animation: float 6.3s ease-in-out infinite;
}

.hero__logo {
  width: min(520px, 100%);
  height: auto;
  display: block;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.45));
  animation: pop 700ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 auto;
  text-align: center;
}

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

.ipline {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 16px;
  margin-top: 10px;
  width: 100%;
}

@media (min-width: 700px) {
  .ipline {
    grid-template-columns: 1fr 1fr;
  }
}

.ipcard {
  width: 100%;
  max-width: 620px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  box-shadow: var(--shadow);
}

@media (min-width: 900px) {
  .ipcard {
    max-width: 680px;
  }
}

.ipcard__k {
  font-weight: 900;
  letter-spacing: 0.2px;
}
.ipcard__v {
  margin-top: 6px;
  font-weight: 800;
}
.ipcard__s {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--muted2);
}

.toast {
  min-height: 22px;
  color: var(--accent2);
  font-weight: 800;
}

.divider {
  width: 100%;
  max-width: 860px;
  height: 1px;
  margin: 18px auto 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.14),
    transparent
  );
}

.divider--section {
  margin: 22px auto 16px;
}

.section {
  padding: 44px 0 56px;
}

.h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
  margin: 0 0 10px;
  text-align: center;
}

.p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 72ch;
  margin: 0 auto 16px;
  text-align: center;
}

.rules {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
}

.ruleLink {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card2);
  font-weight: 800;
  color: var(--text);
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.ruleLink:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

/* =========================================================
   Server Settings
   ========================================================= */

.settings {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

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

/* Layout: key left, value right */
.settingRow {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

/* Game rule name */
.settingKey {
  font-weight: 900;
  letter-spacing: 0.2px;
  font-size: 1.05rem;
}

/* Value pill */
.settingVal {
  justify-self: end;
}

.settingVal code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Optional description under the setting */
.settingHint {
  margin-top: 6px;
  color: var(--muted2);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ---------------------------------------------------------
   Mobile adjustments
   --------------------------------------------------------- */

@media (max-width: 520px) {
  .settingRow {
    grid-template-columns: 1fr auto; /* keep side-by-side */
    gap: 12px;
  }

  .settingKey {
    font-size: 1rem;
  }

  .settingVal {
    justify-self: end;
  }

  .settingVal code {
    min-width: 72px;
    padding: 7px 12px;
  }
}

/* Footer (match top bar) */
.footer {
  position: sticky;
  bottom: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 26, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__inner {
  padding: 10px 0;
  display: flex;
  justify-content: center;
}

.footer__left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.footer__left img {
  border-radius: 8px;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Animations */
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 6px rgba(126, 231, 135, 0.12);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(126, 231, 135, 0.18);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
