/* ============================================================
   LANVEX SMP — Landing page styles
   Single-file design system. Theme tokens are driven by
   data/config.json (see config-loader.js).
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- Design tokens ---------- */
:root {
  /* Colors (overridden at runtime from config.json) */
  --blue: #3A6FFF;
  --blue-hover: #2b5fef;
  --accent: #B255D5;
  --accent-hover: #9E3FB8;
  --bg-dark: #0a0d18;
  --bg-card: #141826;
  --bg-nav: #0f121e;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.65);

  /* Named color tags (used by the markdown renderer) */
  --red: #ef4444;
  --green: #22c55e;
  --purple: #a855f7;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --orange: #f97316;
  --yellow: #eab308;
  --teal: #14b8a6;
  --lime: #84cc16;
  --gray: #9ca3af;
  --white: #ffffff;

  /* Typography */
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-heading: 'Montserrat', ui-sans-serif, system-ui, sans-serif;

  /* Radii */
  --radius-card: 1rem;
  --radius-pill: 999px;

  /* Borders & effects */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.09);
  --shadow-blue: 0 8px 40px rgba(58, 111, 255, 0.22);

  /* Motion */
  --anim-fast: 0.15s;
  --anim-base: 0.25s;
  --anim-slow: 0.4s;
  --anim-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --anim-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --anim-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --anim-ease-smooth: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  background: var(--bg-dark);
}

/* Fluid type on very wide screens */
@media (min-width: 2000px) { html { font-size: 118.75%; } }
@media (min-width: 2560px) { html { font-size: 137.5%; } }

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  background: transparent;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; color: inherit; background: none; border: none; touch-action: manipulation; }

::selection { background: rgba(58, 111, 255, 0.3); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #2a3040; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3a4256; }

/* ---------- Utility ---------- */
.glass-card {
  background: rgba(20, 24, 38, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
}

.ct-gradient {
  background: var(--ct-grad, linear-gradient(90deg, var(--accent), var(--blue)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---------- Background ---------- */
.bg-fixed {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 24, 0.72);
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s var(--anim-ease), box-shadow 0.3s var(--anim-ease), border-color 0.3s var(--anim-ease);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(15, 18, 30, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.nav-inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.25rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}
.nav-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 0.625rem;
}
.nav-logo-text {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
#navPrimary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}
#navLinksInner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-blob {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0;
  width: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  opacity: 0;
  transition: transform 0.3s var(--anim-ease), width 0.3s var(--anim-ease), opacity 0.3s var(--anim-ease);
  pointer-events: none;
}
.nav-link {
  position: relative;
  z-index: 1;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--radius-pill);
  transition: color 0.2s var(--anim-ease);
}
.nav-link:hover { color: var(--text); }

.nav-btn-support {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 18px rgba(178, 85, 213, 0.3);
  transition: transform 0.2s var(--anim-ease), box-shadow 0.2s var(--anim-ease), filter 0.2s var(--anim-ease);
}
.nav-btn-support:hover { transform: translateY(-1px); filter: brightness(1.08); }

.nav-mobile-btn { display: none; }

/* ---------- Mobile menu ---------- */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--anim-ease);
}
.mobile-menu-backdrop.open { opacity: 1; pointer-events: auto; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 160;
  width: min(20rem, 85vw);
  background: rgba(15, 18, 30, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-left: 1px solid var(--border-subtle);
  transform: translateX(100%);
  transition: transform 0.32s var(--anim-ease-out);
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.mobile-menu-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

#mobileNavPrimary {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.mobile-link {
  padding: 0.9rem 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 0.75rem;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.mobile-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.mobile-support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.9rem 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: 0.875rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: transform 0.2s var(--anim-ease), box-shadow 0.2s var(--anim-ease), background 0.2s var(--anim-ease), filter 0.2s var(--anim-ease);
  will-change: transform;
}
.btn .btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-hover));
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 12px 40px rgba(58, 111, 255, 0.35); }

.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-glass:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); }

.btn:active { transform: scale(0.97); }

/* ---------- Page & sections ---------- */
.page { position: relative; }

.page-enter { animation: pageIn 0.6s var(--anim-ease-out) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.section { position: relative; padding: 5rem 1.5rem; }
.section-inner { max-width: 76rem; margin: 0 auto; }
.section-inner-narrow { max-width: 56rem; }
.section-inner-faq { max-width: 52rem; }

.section-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3.25rem;
}
.section-title {
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 900;
  margin-bottom: 0.75rem;
}
.section-desc {
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 7rem;
  padding-bottom: 5rem;
  text-align: center;
}
.hero-content {
  max-width: 52rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.hero-logo-wrap { display: flex; justify-content: center; }
.hero-logo-pill {
  position: relative;
  padding: 1.75rem;
  border-radius: 1.75rem;
  background: rgba(20, 24, 38, 0.55);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hero-logo-pill::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(58,111,255,0.5), rgba(178,85,213,0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hero-logo { width: min(30rem, 78vw); height: auto; }

.hero-title {
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.6vw, 1.375rem);
  font-weight: 600;
  color: var(--text);
  min-height: 1.6em;
}

.hero-card {
  width: 100%;
  padding: 1.75rem 2rem;
  border-radius: 1.25rem;
  text-align: left;
}
.hero-desc { color: var(--muted); font-size: 1.0625rem; }
.hero-desc + .hero-desc { margin-top: 1rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
}

/* ---------- Features ---------- */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}
.features-grid > .feature-card { flex: 0 0 auto; width: calc((100% - 2.5rem) / 3); }
.features-grid.cols-2 > .feature-card { width: calc((100% - 1.25rem) / 2); }
.features-grid.cols-4 > .feature-card { width: calc((100% - 3.75rem) / 4); }

.feature-card {
  position: relative;
  padding: 1.75rem;
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform 0.3s var(--anim-ease), border-color 0.3s var(--anim-ease), box-shadow 0.3s var(--anim-ease);
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(58, 111, 255, 0.12), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s var(--anim-ease);
  pointer-events: none;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.16); }
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  margin-bottom: 1.25rem;
  transition: transform 0.3s var(--anim-ease-spring);
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-card:hover .feature-icon { transform: scale(1.12) rotate(-4deg); }

.feature-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-desc { color: var(--muted); font-size: 0.9375rem; }

/* ---------- Stats ---------- */
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}
.stats-grid > .stat-card { flex: 0 0 auto; width: calc((100% - 3.75rem) / 4); }
.stat-card {
  position: relative;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-card);
  text-align: center;
  transition: transform 0.3s var(--anim-ease), border-color 0.3s var(--anim-ease);
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.16); }
.stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.625rem;
}
.stat-label { color: var(--muted); font-weight: 600; font-size: 0.9375rem; }

/* ---------- About ---------- */
.about-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}
.about-grid > .about-card { flex: 0 0 auto; width: calc((100% - 2.5rem) / 3); }
.about-card {
  position: relative;
  padding: 1.75rem;
  border-radius: var(--radius-card);
  transition: transform 0.3s var(--anim-ease), border-color 0.3s var(--anim-ease);
}
.about-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.16); }
.about-icon-box {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
  color: var(--blue);
  background: rgba(58, 111, 255, 0.12);
  margin-bottom: 1.25rem;
  transition: transform 0.3s var(--anim-ease-spring), background 0.3s;
}
.about-icon-box svg { width: 22px; height: 22px; }
.about-card:hover .about-icon-box { transform: scale(1.1); background: rgba(58, 111, 255, 0.2); }

.about-grid > .about-card-full { width: 100%; }
.about-rules-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.about-rules-header svg { width: 22px; height: 22px; color: var(--blue); }
.about-rules-header .feature-title { margin-bottom: 0; }

.rules-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.rules-grid > .rule-item { flex: 0 0 auto; width: calc((100% - 0.75rem) / 2); }
.rule-item {
  display: flex;
  gap: 0.625rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
  align-items: flex-start;
}
.rule-num {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--blue);
}

/* ---------- Join ---------- */
.join-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}
.join-grid > .join-card { flex: 0 0 auto; width: calc((100% - 1.25rem) / 2); }
.join-card {
  position: relative;
  padding: 2rem;
  border-radius: var(--radius-card);
  transition: transform 0.3s var(--anim-ease), border-color 0.3s var(--anim-ease);
}
.join-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.16); }
.join-num {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.07);
}
.join-icon-wrap {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  margin-bottom: 1.25rem;
}
.join-icon-wrap svg { width: 24px; height: 24px; }
.join-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--blue);
  font-size: 0.9375rem;
  transition: color 0.2s;
}
.join-link:hover { color: var(--blue-hover); }
.join-link svg { width: 15px; height: 15px; }

.ip-copy-wrap {
  margin-top: 1.75rem;
  padding: 1rem;
  border-radius: var(--radius-card);
  display: flex;
  justify-content: center;
}
.ip-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  border-radius: var(--radius-pill);
  background: rgba(58, 111, 255, 0.12);
  border: 1px dashed rgba(58, 111, 255, 0.45);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.ip-copy-btn:hover { background: rgba(58, 111, 255, 0.22); }
.ip-copy-btn.copied { border-color: #22c55e; background: rgba(34, 197, 94, 0.15); }
.ip-copy-icon svg { width: 18px; height: 18px; color: var(--blue); }

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.faq-item {
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color 0.3s var(--anim-ease);
}
.faq-item.open { border-color: rgba(255, 255, 255, 0.16); }
.faq-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text);
}
.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.3s var(--anim-ease);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--anim-ease-out);
}
.faq-answer p {
  padding: 0 1.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.96875rem;
}
.faq-item.open .faq-answer { max-height: 20rem; }

/* ---------- CTA ---------- */
.cta-card {
  position: relative;
  padding: 3.5rem 2.5rem;
  border-radius: 1.5rem;
  text-align: center;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px circle at 20% 0%, rgba(58, 111, 255, 0.18), transparent 45%),
    radial-gradient(700px circle at 80% 100%, rgba(178, 85, 213, 0.18), transparent 45%);
  pointer-events: none;
}
.cta-title {
  position: relative;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 0.875rem;
}
.cta-desc {
  position: relative;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 auto 2rem;
  font-size: 1.0625rem;
}
.cta-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
}

/* ---------- Footer ---------- */
.footer { padding: 4rem 1.5rem 2.5rem; }
.footer-inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: 2rem;
  border-radius: 1.25rem;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.875rem; }
.footer-logo { width: 40px; height: 40px; border-radius: 0.75rem; }
.footer-name { font-family: var(--font-heading); font-weight: 900; font-size: 1.125rem; }
.footer-tagline { color: var(--muted); font-size: 0.875rem; }

.footer-links { display: flex; gap: 1rem; }
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}
.footer-link:hover { color: #fff; }
.footer-link svg { width: 16px; height: 16px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- Server status ---------- */
.server-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 0.85rem;
}
.server-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray);
  flex-shrink: 0;
}
.server-status.online .server-status-dot {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse 2s infinite;
}
.server-status.offline .server-status-dot { background: var(--red); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ---------- Scroll top & progress ---------- */
.scroll-top-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(20, 24, 38, 0.85);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s var(--anim-ease), transform 0.3s var(--anim-ease);
}
.scroll-top-btn.visible { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top-btn:hover { background: rgba(58, 111, 255, 0.3); }
.scroll-top-btn svg { width: 20px; height: 20px; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  z-index: 200;
  background: linear-gradient(90deg, var(--blue), var(--accent));
  width: 0;
  transition: opacity 0.4s;
}
.scroll-progress.done { opacity: 0; }

/* ---------- Reveal animations ---------- */
.reveal-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--anim-ease-out), transform 0.55s var(--anim-ease-out);
}
.reveal-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero rotator */
.hero-subtitle { position: relative; overflow: hidden; }
.hero-rot-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transform: translateX(40px);
  transition: transform 0.5s var(--anim-ease-out), opacity 0.5s var(--anim-ease-out);
}
.hero-rot-slide.hero-rot-show { transform: translateX(0); opacity: 1; }
.hero-rot-slide.hero-rot-out { transform: translateX(-40px); opacity: 0; }

/* Confetti */
.confetti-piece {
  position: fixed;
  border-radius: 2px;
  pointer-events: none;
  z-index: 300;
  animation: confetti 1s var(--anim-ease-out) forwards;
}
@keyframes confetti {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

/* Markdown table / code helpers (kept for parity) */
.md-table-wrap { overflow-x: auto; }
.md-table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.md-table th, .md-table td { padding: 0.5rem 0.75rem; border: 1px solid var(--border-subtle); text-align: left; }
code { font-family: ui-monospace, 'Cascadia Code', Menlo, monospace; font-size: 0.875em; background: rgba(255,255,255,0.08); padding: 0.125rem 0.375rem; border-radius: 0.375rem; }
.hashtag { color: var(--blue); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .features-grid > .feature-card { width: calc((100% - 1.25rem) / 2); }
  .features-grid.cols-4 > .feature-card { width: calc((100% - 1.25rem) / 2); }
  .about-grid > .about-card { width: calc((100% - 1.25rem) / 2); }
  .stats-grid > .stat-card { width: calc((100% - 1.25rem) / 2); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
  }
  .hamburger-box { position: relative; width: 22px; height: 16px; }
  .hamburger-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.3s var(--anim-ease), opacity 0.3s var(--anim-ease), top 0.3s var(--anim-ease);
  }
  .hamburger-line:nth-child(1) { top: 0; }
  .hamburger-line:nth-child(2) { top: 7px; }
  .hamburger-line:nth-child(3) { top: 14px; }
  .nav-mobile-btn.open .hamburger-line:nth-child(1) { top: 7px; transform: rotate(45deg); }
  .nav-mobile-btn.open .hamburger-line:nth-child(2) { opacity: 0; }
  .nav-mobile-btn.open .hamburger-line:nth-child(3) { top: 7px; transform: rotate(-45deg); }

  .section { padding: 3.5rem 1.25rem; }
  .hero { min-height: auto; }
  .features-grid > .feature-card,
  .features-grid.cols-2 > .feature-card,
  .features-grid.cols-4 > .feature-card { width: 100%; }
  .about-grid > .about-card { width: 100%; }
  .join-grid > .join-card { width: 100%; }
  .rules-grid > .rule-item { width: 100%; }
  .stats-grid > .stat-card { width: calc((100% - 1.25rem) / 2); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .scroll-top-btn { bottom: 1.25rem; right: 1.25rem; }
}
@media (max-width: 480px) {
  .stats-grid > .stat-card { width: 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
html.motion-off *, html.motion-off *::before, html.motion-off *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.motion-off .reveal-in { opacity: 1; transform: none; }

/* ---------- 404 Page ---------- */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 1.5rem 4rem;
  box-sizing: border-box;
  position: relative;
}
.error-container {
  text-align: center;
  width: 100%;
}
.error-code {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(7rem, 22vw, 14rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--blue) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 14px 45px rgba(58, 111, 255, 0.35));
  margin-bottom: 0.25rem;
  animation: errorFloat 4s ease-in-out infinite;
}
@keyframes errorFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.error-glass-card {
  background: rgba(20, 24, 38, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 80px rgba(58, 111, 255, 0.1);
  max-width: 34rem;
  margin: 0 auto;
}
.error-glass-card h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.error-glass-card p {
  color: var(--muted);
  font-size: 0.96875rem;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

@media (max-width: 480px) {
  .error-glass-card { padding: 1.75rem 1.25rem; }
  .error-actions { flex-direction: column; align-items: stretch; }
}
