: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;
}

* {
  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: 18px;
}

.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(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge-private {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: rgba(15, 118, 110, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.38);
  color: #a5f3fc;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(129, 140, 248, 0.7);
  color: #e5e7eb;
  background: radial-gradient(
    circle at 20% 0%,
    rgba(129, 140, 248, 0.4),
    rgba(30, 64, 175, 0.6)
  );
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
  white-space: nowrap;
}

.btn-discord:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(129, 140, 248, 0.45);
}

.btn-home {
  display: inline-flex;
  align-items: 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 {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(96, 165, 250, 0.35);
}

.top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 18px;
}

.panel {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  padding: 22px 22px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-subtle);
}

.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.92rem;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.55;
  max-width: 42rem;
}

.hero-description {
  font-size: 0.9rem;
  color: #cbd5f5;
  margin: 0;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 12px 0 0;
}

.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);
}

.section-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #cbd5f5;
  line-height: 1.6;
  font-size: 0.9rem;
}

.list li {
  margin: 6px 0;
}

.roles {
  margin-top: 18px;
}

.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 0 2px 10px;
}

.grid-header h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #e5e7eb;
  margin: 0;
}

.grid-header span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.role-card {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #020617, #030712);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: inherit;
}

.role-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 2px;
}
.role-tag {
  font-size: 0.75rem;
  color: #a5b4fc;
  text-transform: uppercase;
  margin: 0;
}
.role-desc {
  font-size: 0.84rem;
  margin: 8px 0 0;
  color: #cbd5f5;
  line-height: 1.5;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pill-row span {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
}

.apply {
  margin-top: 18px;
}

.apply-panel {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-subtle);
}

.apply-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.card-link {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #020617, #030712);
  border: 1px solid rgba(148, 163, 184, 0.5);
  text-decoration: none;
  transition: transform var(--transition-med), box-shadow var(--transition-med);
  color: inherit;
  display: block;
}

.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}

.server-name {
  font-size: 1rem;
  font-weight: 600;
}
.server-tag {
  font-size: 0.75rem;
  color: #a5b4fc;
  text-transform: uppercase;
}
.server-desc {
  font-size: 0.84rem;
  margin-top: 6px;
  color: #cbd5f5;
  line-height: 1.5;
}

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: 980px) {
  .role-grid,
  .apply-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@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: space-between;
  }

  .top {
    grid-template-columns: 1fr;
  }
  .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;
  }

  .badge-private {
    justify-content: center;
  }
  .btn-discord,
  .btn-home {
    justify-content: center;
    width: 100%;
  }

  .brand-mark {
    width: 64px;
  }

  .hero-title {
    font-size: 1.4rem;
  }
  .hero-subtitle,
  .hero-description,
  .list {
    font-size: 0.86rem;
  }

  .role-grid,
  .apply-grid {
    grid-template-columns: 1fr;
  }
}
