:root {
  --bg: #0a0c18;
  --bg-alt: #0e1122;
  --card: #131629;
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #e9ecf5;
  --text-dim: #a8adc4;
  --cyan: #4fc3ff;
  --purple: #a86bff;
  --pink: #ff6ec7;
  --orange: #ff9a3d;
  --gold: #ffcf5c;
  --gradient: linear-gradient(90deg, var(--cyan), var(--purple) 50%, var(--orange));
  --radius: 16px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(10, 12, 24, 0.88), rgba(10, 12, 24, 0.88)),
    url('../Images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Baloo 2', 'Inter', sans-serif;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; color: var(--text-dim); }

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

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Background glow blobs */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}
.bg-glow--one {
  top: -200px;
  left: -150px;
  background: var(--cyan);
}
.bg-glow--two {
  bottom: -250px;
  right: -150px;
  background: var(--orange);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 24, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: 96px 0 72px;
}

.hero-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  width: min(560px, 100%);
  margin-bottom: 28px;
  filter: drop-shadow(0 10px 40px rgba(168, 107, 255, 0.25));
}

.hero-tagline {
  max-width: 560px;
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 36px;
}

.server-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.status-dot--online {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
  animation: status-pulse 2s ease-in-out infinite;
}

.status-dot--offline {
  background: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

.status-dot--maintenance {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 207, 92, 0.25);
  animation: status-pulse-maintenance 2s ease-in-out infinite;
}

@keyframes status-pulse-maintenance {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 207, 92, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(255, 207, 92, 0.4); }
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2); }
  50% { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0.35); }
}

.edition-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}

.edition-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(79, 195, 255, 0.1);
  border: 1px solid rgba(79, 195, 255, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gradient);
  color: #0a0c18;
  box-shadow: 0 8px 24px rgba(168, 107, 255, 0.25);
}

.btn-secondary {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
}

.btn-secondary:hover { border-color: var(--cyan); }

.btn-disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.btn-disabled:hover { transform: none; }

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

.section--alt {
  background: rgba(14, 17, 34, 0.82);
}

.section-title {
  font-size: 1.9rem;
  text-align: center;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 20px;
}

.section-text {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
}

.section-cta {
  text-align: center;
  margin-top: 32px;
}

/* Cards */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.card {
  flex: 1 1 300px;
  max-width: 340px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--purple);
}

.card-icon { font-size: 1.8rem; margin-bottom: 12px; }

.card h3 { font-size: 1.1rem; margin-bottom: 8px; }

.card p { font-size: 0.92rem; margin: 0; }

/* Staff */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
  justify-content: center;
  gap: 24px;
}

.staff-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 16px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.staff-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple);
}

.staff-render {
  display: block;
  max-width: 100%;
  height: auto;
  margin-bottom: 4px;
  filter: drop-shadow(0 8px 20px rgba(168, 107, 255, 0.2));
  cursor: grab;
}

.staff-render-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--card-border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.staff-render-placeholder-icon { font-size: 2rem; opacity: 0.6; }

.staff-render-placeholder-text {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.staff-render:active { cursor: grabbing; }

.staff-rank {
  margin-top: 40px;
}

.staff-rank:first-child {
  margin-top: 0;
}

.staff-rank + .staff-rank {
  padding-top: 32px;
  border-top: 1px solid var(--card-border);
}

.staff-rank-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
}

.staff-rank-header::before,
.staff-rank-header::after {
  content: '';
  flex: 1;
  max-width: 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--card-border));
}

.staff-rank-header::after {
  background: linear-gradient(90deg, var(--card-border), transparent);
}

.staff-rank-header span {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.staff-card--lead,
.staff-card--owner {
  border-color: rgba(255, 207, 92, 0.3);
  background: linear-gradient(180deg, rgba(255, 207, 92, 0.06), var(--card) 60%);
}

.staff-card--lead:hover,
.staff-card--owner:hover { border-color: var(--gold); }

.staff-card--lead .staff-role,
.staff-card--owner .staff-role {
  color: var(--gold);
  background: rgba(255, 207, 92, 0.1);
  border-color: rgba(255, 207, 92, 0.3);
}

.staff-card--owner {
  border-width: 2px;
  box-shadow: 0 0 0 1px rgba(255, 207, 92, 0.15), 0 12px 32px rgba(255, 207, 92, 0.15);
}

.staff-card--owner .staff-name {
  font-size: 1.2rem;
}

.staff-name {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
}

.staff-role {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(79, 195, 255, 0.1);
  border: 1px solid rgba(79, 195, 255, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
}

/* Supporters */
.supporters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.supporter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.supporter-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.supporter-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  image-rendering: pixelated;
}

.supporter-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.supporter-tier {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(255, 207, 92, 0.1);
  border: 1px solid rgba(255, 207, 92, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
}

.supporter-amount {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
}

.supporters-empty {
  margin-top: 40px;
  text-align: center;
  border: 1px dashed var(--card-border);
  border-radius: var(--radius);
  padding: 48px 24px;
}

.supporters-empty-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.supporters-empty p {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--text);
}

.supporters-empty-sub {
  font-weight: 400 !important;
  color: var(--text-dim) !important;
  font-size: 0.9rem;
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 40px auto 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.steps li {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  color: #0a0c18;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps h3 { font-size: 1.05rem; margin-bottom: 4px; }
.steps p { margin: 0; font-size: 0.95rem; }
.steps code {
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
}
.steps a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.steps a:hover { color: var(--purple); }

/* CTA */
.cta-inner { text-align: center; }
.cta .btn { margin-top: 8px; }
.cta-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
  opacity: 0.7;
}

/* Recruit banner */
.recruit-wrap {
  position: relative;
  z-index: 1;
  padding: 36px 0;
}

.recruit-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 24px;
  background: rgba(168, 107, 255, 0.08);
  border: 1px solid rgba(168, 107, 255, 0.25);
  border-radius: var(--radius);
  text-align: center;
}

.recruit-banner p {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
}

.recruit-banner a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.recruit-banner a:hover { color: var(--purple); }

.recruit-icon { font-size: 1.1rem; flex-shrink: 0; }

.recruit-banner--inline {
  margin-top: 56px;
}

/* Tour of Spawn carousel (home page) */
.carousel {
  position: relative;
  max-width: 820px;
  margin: 32px auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  aspect-ratio: 16 / 9;
  background: var(--card);
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 12, 24, 0.55);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.carousel-arrow:hover { background: rgba(10, 12, 24, 0.8); }
.carousel-arrow--prev { left: 14px; }
.carousel-arrow--next { right: 14px; }

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--card-border);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.active {
  background: var(--gradient);
  transform: scale(1.3);
}

/* Gallery */
.gallery-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.gallery-filter {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.gallery-filter:hover {
  border-color: var(--purple);
  color: var(--text);
}

.gallery-filter.active {
  color: #0a0c18;
  background: var(--gradient);
  border-color: transparent;
}

.gallery-empty {
  text-align: center;
  margin-top: 40px;
  color: var(--text-dim);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.gallery-item {
  display: block;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
  aspect-ratio: 16 / 10;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--purple);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 6, 12, 0.92);
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 20px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 32px 0;
  border-top: 1px solid var(--card-border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}

.footer-icon { width: 28px; height: 28px; border-radius: 50%; }

.footer-inner p { margin: 0; font-size: 0.85rem; }

/* Responsive */
@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--card-border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-toggle { display: flex; }

  .hero { padding: 64px 0 48px; }

  .section-title { font-size: 1.5rem; }
}
