/* ===== The Obsidian Oath Legion — Warframe / Space Theme ===== */
:root {
  --black: #050508;
  --black-soft: #0a0a12;
  --black-card: #0d0d18;
  --void: #0f0a1a;
  --void-mid: #1a1225;
  --gold: #c9a227;
  --gold-light: #e5c158;
  --gold-dark: #9a7b1a;
  --gold-glow: rgba(201, 162, 39, 0.35);
  --gold-subtle: rgba(201, 162, 39, 0.15);
  --cyan: #00d4ff;
  --cyan-dim: #00a8cc;
  --cyan-glow: rgba(0, 212, 255, 0.25);
  --cyan-subtle: rgba(0, 212, 255, 0.08);
  --text: #e4e8f0;
  --text-muted: #8e94b0;
  --text-dim: #6b7090;
  --border: rgba(201, 162, 39, 0.2);
  --border-cyan: rgba(0, 212, 255, 0.15);
  --font-heading: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --transition: 0.3s ease;
  --nav-active: #e87c4a;
  --nav-active-glow: rgba(232, 124, 74, 0.35);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

.scroll-container {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--black);
  background-image: radial-gradient(ellipse 120% 80% at 50% 0%, var(--void-mid) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 80% 60%, rgba(26, 18, 37, 0.6) 0%, transparent 50%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(15, 10, 26, 0.8) 0%, transparent 50%);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

/* Animated nebula layer (slow drift) */
.nebula-drift {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 100% 80% at 50% 30%, rgba(26, 18, 37, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 70% 70%, rgba(0, 168, 204, 0.06) 0%, transparent 45%),
    radial-gradient(ellipse 60% 100% at 30% 50%, rgba(15, 10, 26, 0.6) 0%, transparent 50%);
  background-size: 200% 200%, 150% 150%, 180% 180%;
  background-position: 0% 0%, 0% 0%, 0% 0%;
  animation: nebula-drift 25s ease-in-out infinite;
}

@keyframes nebula-drift {
  0%, 100% { background-position: 0% 0%, 0% 0%, 0% 0%; opacity: 1; }
  33% { background-position: 30% 20%, 20% 30%, -10% 10%; opacity: 0.95; }
  66% { background-position: -20% 10%, -10% -20%, 20% 0%; opacity: 1; }
}

/* Starfield (Warframe / space) – twinkle + slow drift */
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 200px 50px, rgba(0,212,255,0.2), transparent),
    radial-gradient(1px 1px at 250px 180px, rgba(255,255,255,0.35), transparent),
    radial-gradient(2px 2px at 300px 90px, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 350px 140px, rgba(0,212,255,0.15), transparent);
  background-size: 400px 250px;
  background-repeat: repeat;
  background-position: 0 0;
  opacity: 0.85;
  animation: starfield-twinkle 5s ease-in-out infinite, starfield-drift 90s linear infinite;
}

@keyframes starfield-twinkle {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.95; }
}

@keyframes starfield-drift {
  0% { background-position: 0 0; }
  100% { background-position: 400px 250px; }
}

/* Subtle noise overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===== Side nav — right side, minimal, blends with background (druids.live style) ===== */
.side-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 140px;
  height: 100vh;
  height: 100dvh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 2.5rem 0 2rem 0;
  padding-top: max(2.5rem, env(safe-area-inset-top));
  padding-right: max(0.75rem, env(safe-area-inset-right));
  background: transparent;
  transition: transform 0.35s ease;
}

/* Thin vertical line on the RIGHT edge of the menu (viewport edge) */
.side-nav::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.12) 15%, rgba(255, 255, 255, 0.18) 50%, transparent 85%);
  pointer-events: none;
}

.side-nav-links-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 1rem;
}

.side-nav .nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.side-nav .nav-links a {
  display: block;
  padding: 0.25rem 0;
  font-family: ui-monospace, 'SF Mono', 'Consolas', monospace;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  text-decoration: none;
  transition: color 0.2s ease;
}

.side-nav .nav-links a:hover {
  color: rgba(255, 255, 255, 0.6);
}

.side-nav .nav-links a.active {
  color: var(--nav-active);
  text-shadow: 0 0 20px var(--nav-active-glow);
}

.side-nav .nav-cta {
  color: rgba(255, 255, 255, 0.32) !important;
}

.side-nav .nav-cta:hover {
  color: rgba(255, 255, 255, 0.6) !important;
}

.side-nav .nav-cta.active {
  color: var(--nav-active) !important;
  text-shadow: 0 0 20px var(--nav-active-glow);
}

.side-nav .nav-toggle {
  display: none;
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  left: -48px;
  width: 44px;
  height: 44px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  background: rgba(13, 13, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: none;
  border-radius: 6px 0 0 6px;
  cursor: pointer;
  padding: 0;
  z-index: 102;
  backdrop-filter: blur(8px);
}

.side-nav .nav-toggle span {
  width: 18px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.7);
  transition: transform 0.25s, opacity 0.25s;
  display: block;
}

.main-content {
  margin-right: 0;
  margin-left: 0;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  width: 100%;
}

.side-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(5, 5, 8, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.side-nav-backdrop.visible {
  pointer-events: auto;
  opacity: 1;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.logo:hover {
  color: var(--gold-light);
}

.logo .logo-shimmer {
  display: inline-block;
  background-image: radial-gradient(
    100px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 248, 220, 0.9),
    transparent 50%
  ), linear-gradient(
    110deg,
    var(--gold-dark) 0%,
    var(--gold-light) 45%,
    #f4e4a6 50%,
    var(--gold-light) 55%,
    var(--gold-dark) 100%
  );
  background-size: 100% 100%, 200% 100%;
  background-position: 0 0, 100% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: logo-shine-nav 5s ease-in-out infinite;
}

.logo-3d {
  display: inline-block;
}

@keyframes logo-3d-come {
  0%, 100% {
    transform: translateY(0) translateZ(-20px) scale(0.96);
  }
  50% {
    transform: translateY(-4px) translateZ(20px) scale(1.05);
  }
}

@keyframes logo-3d-come-hero {
  0%, 100% {
    transform: translateY(0) translateZ(-40px) scale(0.92);
  }
  50% {
    transform: translateY(-14px) translateZ(40px) scale(1.08);
  }
}

@keyframes shadow-float {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
  50% { transform: translateX(-50%) scale(1.25); opacity: 0.75; }
}

.hero-title-wrap {
  position: relative;
  margin-bottom: 1rem;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.hero-title-3d .hero-title-shimmer {
  transform-style: preserve-3d;
}

.hero-title-shadow {
  position: absolute;
  bottom: -16px;
  left: 50%;
  width: 50%;
  height: 12px;
  background: radial-gradient(ellipse at center, rgba(201, 162, 39, 0.25), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: shadow-float 3s ease-in-out infinite;
}

.hero-title-shimmer {
  background: linear-gradient(
    110deg,
    var(--gold-dark) 0%,
    var(--gold-dark) 28%,
    var(--gold) 38%,
    var(--gold-light) 45%,
    #f4e4a6 50%,
    var(--gold-light) 55%,
    var(--gold) 62%,
    var(--gold-dark) 72%,
    var(--gold-dark) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: logo-shine 5s ease-in-out infinite, logo-3d-come-hero 3s ease-in-out infinite;
  text-shadow: none;
}

@keyframes logo-shine {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes logo-shine-nav {
  0% { background-position: 0 0, 100% 50%; }
  100% { background-position: 0 0, 0% 50%; }
}

.nav-links a,
a.btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6rem 2rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(ellipse 120% 100% at 50% 30%, rgba(26, 18, 37, 0.25) 0%, transparent 50%);
}

.hero-planet {
  position: absolute;
  width: 220px;
  height: 220px;
  top: -40px;
  right: -20px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    inset -40px -50px 80px rgba(0, 0, 0, 0.65),
    inset 25px 15px 50px rgba(255, 245, 220, 0.08),
    0 0 80px rgba(201, 162, 39, 0.08),
    0 0 140px rgba(201, 162, 39, 0.04);
}

/* Banded surface (Jupiter-like) – varied zones and belts, scrolls to simulate rotation */
.hero-planet-surface {
  position: absolute;
  left: 0;
  top: 0;
  width: 440px;
  height: 220px;
  background:
    /* Finer cloud streaks (24px repeat so loop matches main bands) */
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      rgba(180, 150, 90, 0.35) 6px,
      transparent 12px,
      rgba(120, 85, 40, 0.25) 18px,
      transparent 24px
    ),
    /* Main bands – zones (lighter) and belts (darker) with soft edges */
    repeating-linear-gradient(
      90deg,
      #e8d4a8 0px,
      #e8d4a8 4px,
      #c9a86c 14px,
      #b08a50 22px,
      #8b6914 32px,
      #6b4f10 44px,
      #5a3d0a 52px,
      #8b6914 62px,
      #a0782e 72px,
      #c49450 82px,
      #d4b070 90px,
      #c9a86c 98px,
      #9a7228 108px,
      #7a5518 116px,
      #e8d4a8 120px
    );
  background-size: 24px 100%, 120px 100%;
  animation: planet-rotate 50s linear infinite;
}

@keyframes planet-rotate-sm {
  0% { transform: translateX(0); }
  100% { transform: translateX(-80px); }
}

@keyframes planet-rotate-xs {
  0% { transform: translateX(0); }
  100% { transform: translateX(-60px); }
}

/* 3D sphere: lit side highlight */
.hero-planet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    ellipse 80% 70% at 28% 22%,
    rgba(255, 250, 235, 0.35) 0%,
    rgba(255, 248, 220, 0.08) 25%,
    transparent 55%
  );
  pointer-events: none;
}

/* 3D sphere: terminator (day/night shadow) + atmospheric limb glow */
.hero-planet::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(
      ellipse 100% 100% at 75% 55%,
      transparent 35%,
      rgba(0, 0, 0, 0.15) 50%,
      rgba(0, 0, 0, 0.5) 70%,
      rgba(0, 0, 0, 0.85) 100%
    ),
    radial-gradient(
      circle at 30% 25%,
      transparent 45%,
      rgba(255, 248, 240, 0.12) 52%,
      transparent 58%
    );
  pointer-events: none;
}

@keyframes planet-rotate {
  0% { transform: translateX(0); }
  100% { transform: translateX(-120px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px var(--gold-glow), 0 0 40px var(--gold-subtle);
}

.hero-tagline-reflective {
  background-image: radial-gradient(
    200px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 248, 220, 0.95),
    transparent 45%
  ), linear-gradient(
    110deg,
    var(--gold-dark) 0%,
    var(--gold) 40%,
    var(--gold-light) 50%,
    var(--gold) 60%,
    var(--gold-dark) 100%
  );
  background-size: 100% 100%, 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-spinner {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto 1rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 1rem;
  text-shadow: 0 0 40px var(--gold-subtle);
}

.hero-subtitle {
  font-size: 1.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 2rem;
  text-shadow: 0 0 24px var(--gold-glow), 0 0 48px rgba(201, 162, 39, 0.2), 0 0 60px var(--cyan-subtle);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 4px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--black);
  box-shadow: 0 4px 20px var(--gold-glow);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--gold-glow);
  color: var(--black);
}

/* Cursor-following reflection on button text (uses hero-content --mouse-x/y) */
.btn-reflective {
  color: transparent;
}

.btn-reflective span {
  display: inline-block;
  background-image: radial-gradient(
    100px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 248, 220, 0.5),
    transparent 40%
  ), linear-gradient(to right, var(--black), var(--black));
  background-size: 100% 100%, 100% 100%;
  background-position: 0 0, 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Fade-up animation for hero */
.animate-fade-up {
  opacity: 0;
  transform: translateY(25px);
  animation: fade-up 0.8s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  position: relative;
  animation: scroll-bounce 2s ease-in-out infinite;
}

.scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--gold);
  border-radius: 2px;
  animation: scroll-dot 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.6; transform: translateX(-50%) translateY(8px); }
}

@keyframes scroll-dot {
  0%, 100% { opacity: 1; top: 8px; }
  50% { opacity: 0.3; top: 18px; }
}

/* ===== Sections ===== */
main {
  position: relative;
  z-index: 1;
}

.section {
  padding: 5rem 2rem;
  position: relative;
  min-height: 100vh;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 3rem;
  color: var(--text);
  text-shadow: 0 0 20px var(--cyan-subtle), 0 0 40px rgba(0, 212, 255, 0.05);
}

.title-accent {
  color: var(--cyan);
  margin-right: 0.5rem;
  text-shadow: 0 0 12px var(--cyan-glow);
}

/* Scroll-triggered animation */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== About ===== */
.section-about {
  background: transparent;
}

.about-intro {
  max-width: 640px;
  margin: 0 auto 3rem;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-align: center;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.about-card {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan-dim);
  border-radius: 4px;
  padding: 2rem;
  transition: all var(--transition);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.about-card:hover {
  border-color: var(--gold);
  border-left-color: var(--cyan);
  box-shadow: 0 0 30px var(--gold-subtle), 0 0 20px var(--cyan-subtle);
  transform: translateY(-4px);
}

.about-icon {
  color: var(--cyan-dim);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.about-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 15px var(--cyan-subtle);
}

.about-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

/* ===== Rules ===== */
.section-rules {
  background: transparent;
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rule-item {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 1.5rem 2rem;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  transition: all var(--transition);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.rule-item:hover {
  border-left-color: var(--gold-light);
  box-shadow: 0 0 25px var(--gold-subtle), 0 0 15px var(--cyan-subtle);
}

.rule-number {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--gold);
  flex-shrink: 0;
  text-shadow: 0 0 12px var(--gold-glow);
}

.rule-item h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.25rem;
  text-shadow: 0 0 10px var(--cyan-subtle);
}

.rule-item p {
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* ===== Join ===== */
.section-join {
  background: transparent;
}

.join-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2rem;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--cyan-dim);
  border-radius: 4px;
  transition: all var(--transition);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.step:hover {
  border-color: var(--gold);
  border-left-color: var(--cyan);
  box-shadow: 0 0 20px var(--gold-subtle), 0 0 15px var(--cyan-subtle);
}

.step-number {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--black);
  border-radius: 8px;
  box-shadow: 0 0 15px var(--gold-glow);
}

.step h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 12px var(--cyan-subtle);
}

.step p {
  color: var(--text-muted);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.step-connector {
  width: 2px;
  height: 24px;
  background: linear-gradient(to bottom, var(--cyan-dim), transparent);
  margin-left: calc(2rem + 24px);
  opacity: 0.6;
}

.join-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 0.03em;
}

/* ===== Admins ===== */
.section-admins {
  background: transparent;
}

.admins-intro {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-align: center;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.admin-card {
  width: 100%;
  max-width: 200px;
}

.admin-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan-dim);
  border-radius: 4px;
  transition: all var(--transition);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  text-decoration: none;
  color: inherit;
}

.admin-card-link:hover {
  border-color: var(--gold);
  border-left-color: var(--cyan);
  box-shadow: 0 0 25px var(--gold-subtle), 0 0 15px var(--cyan-subtle);
  transform: translateY(-3px);
}

.admin-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--void-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-avatar-placeholder {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 12px var(--gold-glow);
}

.admin-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.25rem;
  text-align: center;
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.admin-role {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--cyan-dim);
  text-shadow: 0 0 10px var(--cyan-subtle);
  text-align: center;
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Admin editor (in-page, #edit-admins) */
.admin-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem 3rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.admin-editor-overlay.admin-editor-visible {
  opacity: 1;
  visibility: visible;
}

.admin-editor-panel {
  width: 100%;
  max-width: 640px;
  background: linear-gradient(165deg, var(--black-card) 0%, var(--void-mid) 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 0;
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.08),
              0 20px 50px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(201, 162, 39, 0.06);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  overflow: hidden;
  position: relative;
}

.admin-editor-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-subtle), transparent);
  opacity: 0.8;
}

/* Password gate */
.admin-editor-gate {
  padding: 2rem 2rem 2.25rem;
}

.admin-editor-gate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.admin-editor-gate h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
  margin: 0;
}

.admin-editor-gate h2::before {
  content: '// ';
  color: var(--gold);
  font-weight: 600;
}

.admin-editor-gate-hint {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.admin-editor-gate-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.admin-editor-password-input {
  padding: 0.65rem 1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  min-width: 220px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-editor-password-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-subtle), 0 0 20px var(--gold-glow);
}

.admin-editor-gate-form .btn-gold {
  box-shadow: 0 0 20px var(--gold-glow);
}

.admin-editor-gate-error {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #e86c6c;
  text-shadow: 0 0 12px rgba(232, 108, 108, 0.3);
}

.admin-editor-content[hidden] {
  display: none !important;
}

.admin-editor-content {
  padding: 2rem 2rem 2.25rem;
}

.admin-editor-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.admin-editor-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-subtle), transparent);
  opacity: 0.6;
}

.admin-editor-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-editor-header h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
}

.admin-editor-header h2::before {
  content: '// ';
  color: var(--gold);
  font-weight: 600;
}

.admin-editor-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--gold);
  text-decoration: none;
  border-radius: 50%;
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.admin-editor-close:hover {
  color: var(--gold-light);
  background: var(--gold-subtle);
  border-color: var(--border);
}

.admin-editor-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.admin-editor-rows {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.admin-editor-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: linear-gradient(180deg, rgba(26, 18, 37, 0.6) 0%, var(--void-mid) 100%);
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-editor-row:hover {
  border-color: rgba(201, 162, 39, 0.3);
}

.admin-editor-label {
  display: block;
  font-size: 0.75rem;
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.admin-editor-row label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-editor-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-editor-row input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-subtle);
}

/* Photo upload: file input + preview + clear */
.admin-editor-photo {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-editor-photo-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.admin-editor-file {
  font-size: 0.85rem;
  color: var(--text);
  max-width: 100%;
}

.admin-editor-file::file-selector-button {
  padding: 0.5rem 0.85rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--void-mid);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--gold);
  cursor: pointer;
  margin-right: 0.5rem;
  transition: border-color 0.2s, background 0.2s;
}

.admin-editor-file::file-selector-button:hover {
  border-color: var(--gold);
  background: var(--gold-subtle);
}

.admin-editor-preview {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--black);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.1);
}

.admin-editor-preview:has(img) {
  border-color: rgba(201, 162, 39, 0.4);
  box-shadow: 0 0 16px var(--gold-glow);
}

.admin-editor-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-editor-preview-empty {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0.25rem;
  letter-spacing: 0.05em;
}

.admin-editor-clear-photo {
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.admin-editor-clear-photo:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.admin-editor-row .admin-editor-remove {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.admin-editor-remove {
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.admin-editor-remove:hover {
  border-color: #c94a4a;
  color: #e86c6c;
}

.admin-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.admin-editor-actions .btn {
  margin: 0;
  box-shadow: 0 0 16px transparent;
  transition: box-shadow 0.2s;
}

.admin-editor-actions .btn-gold:hover {
  box-shadow: 0 0 20px var(--gold-glow);
}

.admin-editor-saved {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  color: var(--gold);
  text-shadow: 0 0 12px var(--gold-glow);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.admin-editor-saved.admin-editor-saved-visible {
  opacity: 1;
}


.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

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

.footer-edit {
  margin-top: 1rem;
  font-size: 0.85rem;
}

.footer-edit a {
  color: var(--cyan-dim);
  text-decoration: none;
}

.footer-edit a:hover {
  color: var(--cyan);
}

/* ===== Discord ===== */
.section-discord {
  padding: 5rem 2rem;
  background: transparent;
}

.discord-card {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem;
  background: linear-gradient(145deg, var(--black-card), var(--void-mid));
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  box-shadow: 0 0 40px var(--cyan-subtle);
}

.discord-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, var(--gold-subtle) 0%, transparent 45%),
    radial-gradient(circle at 30% 70%, var(--cyan-subtle) 0%, transparent 40%);
  pointer-events: none;
  animation: discord-glow 8s ease-in-out infinite;
}

@keyframes discord-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.discord-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.discord-content h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1rem;
  text-shadow: 0 0 25px var(--cyan-subtle), 0 0 40px var(--gold-subtle);
}

.discord-content > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #5865F2;
  color: white !important;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  border: none;
  box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
}

.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(88, 101, 242, 0.5);
  color: white;
}

.discord-icon,
.bot-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.discord-hint {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  opacity: 0.9;
}

/* ===== Discord Bot ===== */
.section-bot {
  padding: 5rem 2rem;
  background: transparent;
}

.bot-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 2.5rem;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan-dim);
  border-radius: 4px;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.bot-card:hover {
  border-color: var(--gold);
  border-left-color: var(--cyan);
  box-shadow: 0 0 30px var(--gold-subtle), 0 0 25px var(--cyan-subtle);
}

.bot-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}

.btn-bot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: transparent;
  color: var(--gold) !important;
  padding: 1rem 2rem;
  border: 2px solid var(--gold);
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 0 20px var(--gold-subtle);
}

.btn-bot:hover {
  background: var(--gold-subtle);
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--gold-glow);
  color: var(--gold-light) !important;
}

.bot-hint {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  opacity: 0.9;
}

.bot-hint a {
  color: var(--gold);
  text-decoration: none;
}

.bot-hint a:hover {
  text-decoration: underline;
}

/* ===== Footer ===== */
.footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
  box-shadow: 0 -1px 0 var(--border-cyan);
  text-align: center;
}

.footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .side-nav-backdrop {
    display: block;
  }

  .main-content {
    margin-right: 0;
  }

  .side-nav {
    width: min(240px, 78vw);
    transform: translateX(100%);
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .side-nav.open {
    transform: translateX(0);
  }

  .side-nav .nav-links a {
    padding: 0.4rem 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    font-size: 0.62rem;
  }

  .side-nav .nav-toggle {
    display: flex;
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    top: max(1rem, env(safe-area-inset-top));
    left: auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(13, 13, 24, 0.9);
  }

  .side-nav.open .nav-toggle {
    right: auto;
    left: calc(100vw - min(240px, 78vw) - 44px - 1rem);
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }

  /* Hero */
  .hero {
    padding: 4rem 1rem 3rem;
    padding-bottom: max(3rem, env(safe-area-inset-bottom));
    min-height: 100svh;
  }

  .hero-planet {
    width: 140px;
    height: 140px;
    top: -20px;
    right: -30px;
  }

  .hero-planet-surface {
    width: 280px;
    height: 140px;
    background-size: 16px 100%, 80px 100%;
    animation-name: planet-rotate-sm;
  }

  .hero-tagline {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
  }

  .hero-spinner {
    max-width: 260px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
  }

  .btn {
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
    min-height: 48px;
  }

  /* Sections */
  .section {
    padding: 3rem 1rem;
  }

  .container {
    padding: 0 0.5rem;
  }

  .section-title {
    font-size: 1.35rem;
    margin-bottom: 2rem;
    letter-spacing: 0.08em;
  }

  .about-intro {
    font-size: 1rem;
    margin-bottom: 2rem;
    padding: 0 0.25rem;
  }

  .about-grid {
    gap: 1.25rem;
  }

  .about-card {
    padding: 1.5rem;
  }

  .about-card h3 {
    font-size: 1rem;
  }

  .about-card p {
    font-size: 0.95rem;
  }

  .rule-item {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
  }

  .rule-number {
    font-size: 1.1rem;
  }

  .rule-item h4 {
    font-size: 0.95rem;
  }

  .step {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1rem;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .step h3 {
    font-size: 1rem;
  }

  .step p {
    font-size: 0.95rem;
  }

  .step-connector {
    margin-left: calc(1rem + 20px);
  }

  .discord-card {
    padding: 2rem 1.5rem;
  }

  .discord-content h2 {
    font-size: 1.35rem;
  }

  .discord-content > p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .btn-discord,
  .btn-bot {
    min-height: 48px;
    padding: 0.9rem 1.5rem;
  }

  .bot-card {
    padding: 1.5rem 1rem;
  }

  .bot-description {
    font-size: 0.95rem;
  }

  .admins-intro {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .admin-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
  }

  .admin-card {
    max-width: 160px;
  }

  .admin-card-inner {
    padding: 1.25rem 0.75rem;
  }

  .admin-avatar {
    width: 64px;
    height: 64px;
    margin-bottom: 0.75rem;
  }

  .admin-avatar-placeholder {
    font-size: 1.5rem;
  }

  .admin-name {
    font-size: 0.85rem;
  }

  .admin-role {
    font-size: 0.8rem;
  }

  .footer {
    padding: 1.5rem 1rem;
  }

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

/* Small phones */
@media (max-width: 480px) {
  .hero {
    padding: 3rem 0.75rem 2rem;
  }

  .hero-planet {
    width: 100px;
    height: 100px;
    top: 10px;
    right: -20px;
  }

  .hero-planet-surface {
    width: 200px;
    height: 100px;
    background-size: 12px 100%, 60px 100%;
    animation-name: planet-rotate-xs;
  }

  .hero-tagline {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
  }

  .hero-spinner {
    max-width: 200px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

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

  .about-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    width: 100%;
    right: -100%;
  }

  .nav-links.open {
    right: 0;
  }
}
