:root {
  --bg: #020617;
  --bg-elevated: rgba(9, 13, 34, 0.96);
  --accent: #3b82f6;
  --accent-strong: #60a5fa;
  --text-main: #f5f5f5;
  --text-muted: #9ca3af;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.65);
  --shadow-subtle: 0 10px 25px rgba(0, 0, 0, 0.45);
  --transition-med: 0.22s ease-out;

  --tag-planned: rgba(148, 163, 184, 0.18);
  --tag-dev: rgba(59, 130, 246, 0.18);
  --tag-testing: rgba(22, 163, 74, 0.18);
}

* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-main);

  background-color: var(--bg);
  background-image: url("/data/nb-bg-main.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;

  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 12px;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: -15%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
      circle at 22% 30%,
      rgba(56, 189, 248, 0.35),
      transparent 58%
    ),
    radial-gradient(
      circle at 78% 80%,
      rgba(59, 130, 246, 0.22),
      transparent 60%
    );
  mix-blend-mode: screen;
  opacity: 0.4;
  filter: blur(16px);
  transform-origin: center;
  animation: nbNebulaDrift 40s ease-in-out infinite alternate;
}

@keyframes nbNebulaDrift {
  0% {
    transform: translate3d(-40px, -20px, 0) scale(1);
    opacity: 0.35;
  }
  50% {
    transform: translate3d(10px, 10px, 0) scale(1.04);
    opacity: 0.5;
  }
  100% {
    transform: translate3d(40px, -30px, 0) scale(1.02);
    opacity: 0.38;
  }
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page {
  width: 100%;
  max-width: 1100px;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.97),
    rgba(15, 23, 42, 0.92)
  );
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 20px 20px 26px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.page-inner {
  position: relative;
  z-index: 1;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 4px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: auto;
  display: block;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.brand-text span {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-strong);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Recruitment-style header buttons */
.btn-home,
.btn-discord,
.btn-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(96, 165, 250, 0.55);
  color: #e5e7eb;
  background: radial-gradient(
    circle at 20% 0%,
    rgba(96, 165, 250, 0.25),
    rgba(15, 23, 42, 0.92)
  );
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
  white-space: nowrap;
}

.btn-home:hover,
.btn-discord:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(96, 165, 250, 0.35);
}

.btn-discord {
  border-color: rgba(129, 140, 248, 0.7);
  background: radial-gradient(
    circle at 20% 0%,
    rgba(129, 140, 248, 0.4),
    rgba(30, 64, 175, 0.6)
  );
}

.btn-discord:hover {
  box-shadow: 0 14px 32px rgba(129, 140, 248, 0.45);
}

/* Keep your gold launcher CTA, but sized like the others */
.btn-launcher {
  border-color: rgba(250, 204, 21, 0.9);
  background: radial-gradient(
    circle at 20% 0%,
    rgba(250, 250, 150, 0.45),
    rgba(30, 64, 175, 0.95)
  );
  color: #fefce8;
  box-shadow: 0 14px 40px rgba(250, 204, 21, 0.35);
}

.btn-launcher:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 48px rgba(250, 204, 21, 0.55);
}

.badge-dev {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: rgba(30, 64, 175, 0.35);
  border: 1px solid rgba(96, 165, 250, 0.75);
  color: #dbeafe;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

/* MAIN LAYOUT */
main {
  display: flex;
  gap: 22px;
  align-items: stretch;
}

.left-column {
  flex: 1.45;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 0;
}

.right-column {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}

/* Unified panels (Recruitment rhythm) */
.panel,
.hero,
.vision,
.dev-status,
.donation-panel {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-subtle);
}

.hero {
  padding: 26px 22px 22px;
}
.vision {
  padding: 22px 22px 20px;
}
.dev-status {
  padding: 18px 22px;
}
.panel {
  padding: 18px 16px;
}
.donation-panel {
  padding: 20px 22px 18px;
  margin-top: 16px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-strong);
  margin-bottom: 6px;
}

.hero-title {
  font-size: 1.7rem;
  margin: 0 0 8px;
  letter-spacing: 0.03em;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  max-width: 36rem;
  line-height: 1.55;
}

.hero-description {
  font-size: 0.9rem;
  color: #cbd5f5;
  margin-bottom: 16px;
  line-height: 1.6;
  max-width: 40rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.hero-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
}

.vision-title,
.panel-header h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #e5e7eb;
  margin: 0 0 10px;
}

.vision-text {
  font-size: 0.9rem;
  color: #cbd5f5;
  line-height: 1.7;
  max-width: 40rem;
  margin: 0;
}

.dev-status {
  font-size: 0.88rem;
  color: #cbd5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dev-status strong {
  color: #e5e7eb;
}

.dev-status-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 26rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-header span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Uniform cards */
.principles-grid,
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.principle-card,
.feature-card {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #020617, #030712);
  border: 1px solid rgba(148, 163, 184, 0.5);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.principle-card:hover,
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}

.principle-title,
.feature-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.principle-text,
.feature-text {
  font-size: 0.84rem;
  color: #cbd5f5;
  line-height: 1.55;
}

.feature-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  gap: 10px;
}

.status-tag {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-planned {
  background: var(--tag-planned);
  border-color: rgba(148, 163, 184, 0.8);
}

.status-dev {
  background: var(--tag-dev);
  border-color: rgba(96, 165, 250, 0.9);
  color: #dbeafe;
}

.status-testing {
  background: var(--tag-testing);
  border-color: rgba(34, 197, 94, 0.9);
  color: #bbf7d0;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

/* Patch notes */
.patchnotes-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.patchnotes-container {
  margin-top: 4px;
  padding: 10px 11px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #020617, #030712);
  border: 1px solid rgba(148, 163, 184, 0.5);

  flex: 1;
  min-height: 0;
  overflow-y: auto;

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #e5e7eb;
}

.patchnotes-empty {
  color: var(--text-muted);
  font-style: italic;
}

.patchnotes-meta {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

/* Donation */
.donation-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.donation-text {
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: #cbd5f5;
  max-width: 40rem;
  line-height: 1.6;
}

.donation-note {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #a5b4fc;
  margin-top: 6px;
}

.donation-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(96, 165, 250, 0.75);
  color: #e5e7eb;
  background: radial-gradient(
    circle at 20% 0%,
    rgba(96, 165, 250, 0.45),
    rgba(15, 23, 42, 0.9)
  );
  box-shadow: var(--shadow-subtle);
  white-space: nowrap;
  transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.donation-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(96, 165, 250, 0.45);
}

footer {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 880px) {
  body {
    padding: 18px 10px;
    background-attachment: scroll;
    background-position: center top;
  }

  .page {
    padding: 18px 14px 22px;
    border-radius: 20px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  main {
    flex-direction: column;
  }

  .brand-mark {
    width: 70px;
  }
}

@media (max-width: 540px) {
  body {
    padding: 14px 8px;
  }

  header {
    align-items: center;
    text-align: center;
  }

  .brand {
    flex-direction: column;
    align-items: center;
  }

  .brand-text h1 {
    font-size: 1.3rem;
  }
  .brand-text span {
    letter-spacing: 0.14em;
  }

  .header-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .btn-home,
  .btn-launcher,
  .btn-discord {
    width: 100%;
    justify-content: center;
  }

  .hero-title {
    font-size: 1.45rem;
  }
  .hero-subtitle,
  .hero-description {
    font-size: 0.86rem;
  }

  .principles-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }
}
