/* ==============================
   Neo Dominion Cyberpunk AU CSS
   ============================== */

/* 🌈 Theme Variables */
:root {
  --cyber-glow-cyan: #00eaff;
  --cyber-glow-pink: #ff00ff;
  --cyber-bg-dark: #0a0a12;
  --cyber-fg-light: #f0faff;
  --cyber-fg-muted: #99aaff;
  --cyber-accent: #ff66ff;
}

/* 🖥️ Base Body & Background */
body {
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', 'Quicksand', sans-serif;
  color: var(--cyber-fg-light);
  background-color: var(--cyber-bg-dark);
  background-image: url('/images/neon-city-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

/* 🌧️ Rain Canvas */
#rain-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.25;
  mix-blend-mode: screen;
}

/* 🎆 Glowy Container */
.neod-container {
  margin: 40px auto;
  padding: 30px;
  max-width: 850px;
  backdrop-filter: blur(10px) brightness(1.2);
  background: rgba(0, 0, 10, 0.65);
  border: 2px solid #2a2a3f;
  border-radius: 12px;
  box-shadow:
    0 0 25px rgba(30, 255, 255, 0.2),
    0 0 60px rgba(255, 0, 255, 0.15),
    inset 0 0 20px rgba(0, 255, 255, 0.05);
  position: relative;
  z-index: 10;
}

/* 🧬 Terminal‑Style Header */
.neod-header h1 {
  font-size: 3em;
  text-align: center;
  color: var(--cyber-glow-cyan);
  text-shadow: 0 0 12px var(--cyber-glow-cyan), 0 0 24px var(--cyber-glow-pink);
  animation: neonFlicker 1.9s infinite alternate;
  margin-bottom: 8px;
}

.neod-header .tagline {
  font-size: 1.2em;
  text-align: center;
  color: #77eaff;
  text-shadow: 0 0 6px #77eaff;
  margin-bottom: 24px;
}

/* 📜 Neo Dominion Intro Paragraphs */
.neod-intro p {
  font-size: 1.2em;
  line-height: 1.7;
  margin: 20px 0;
  color: #e3eaff;
  text-shadow: 0 0 6px #101020;
}

/* 📂 Chapter Archive */
.neod-chapters h2 {
  font-size: 2em;
  color: var(--cyber-accent);
  text-shadow: 0 0 10px var(--cyber-glow-pink);
  margin: 30px 0 18px;
  text-align: center;
}

.neod-chapters ul {
  list-style: none;
  padding-left: 0;
  margin: 0 auto;
  max-width: 720px;
}

.neod-chapters ul li {
  margin: 10px 0;
}

/* 🔗 Chapter Links */
.neod-chapters ul li a {
  display: block;
  font-size: 1.3em;
  padding: 10px 16px;
  border-left: 3px solid var(--cyber-accent);
  text-decoration: none;
  color: #33ffff;
  background: rgba(10, 10, 25, 0.6);
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(50, 255, 255, 0.2);
  transition: all 0.25s ease-in-out;
}

.neod-chapters ul li a:hover {
  color: #ff99ff;
  background: rgba(30, 0, 40, 0.8);
  transform: scale(1.05);
  box-shadow:
    0 0 14px rgba(255, 0, 255, 0.35),
    0 0 20px rgba(0, 255, 255, 0.25);
}

/* 🦾 Footer */
.neod-footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9em;
  color: var(--cyber-fg-muted);
  border-top: 1px solid #444;
  padding-top: 18px;
}

/* 🔙 Back Link Button */
.back-link {
  display: inline-block;
  padding: 8px 14px;
  margin-top: 10px;
  font-size: 1em;
  color: var(--cyber-glow-cyan);
  text-decoration: none;
  border: 2px solid var(--cyber-glow-cyan);
  border-radius: 10px;
  transition: 0.2s ease-in-out;
}

.back-link:hover {
  color: var(--cyber-glow-pink);
  border-color: var(--cyber-glow-pink);
  text-shadow: 0 0 8px var(--cyber-glow-pink), 0 0 12px var(--cyber-glow-cyan);
  transform: scale(1.03);
}

/* 🧠 Focus Styles for A11y */
a:focus {
  outline: 2px dashed var(--cyber-glow-cyan);
  outline-offset: 4px;
}

/* 📡 Neon Flicker Animation */
@keyframes neonFlicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow:
      0 0 8px var(--cyber-glow-cyan),
      0 0 14px var(--cyber-glow-pink),
      0 0 20px var(--cyber-glow-pink);
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}

/* ==============================
   Scanline Effect Overlay
   ============================== */
#scanline-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 100% 4px;
  mix-blend-mode: overlay;
  animation: scanWave 6s infinite linear;
  z-index: 5;
}

@keyframes scanWave {
  from { background-position-y: 0; }
  to { background-position-y: 4px; }
}

/* ==============================
   Loading Screen
   ============================== */
#neo-loader {
  position: fixed;
  inset: 0;
  background: #000a12;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 1;
  transition: opacity 0.7s ease;
}

#neo-loader::before {
  content: "◢ NEO DOMINION ⚡";
  font-family: 'Orbitron', sans-serif;
  font-size: 2.2em;
  color: var(--cyber-glow-cyan);
  text-shadow: 0 0 8px var(--cyber-glow-cyan), 0 0 14px var(--cyber-glow-pink);
  animation: flickerLoader 1.8s infinite alternate;
}

@keyframes flickerLoader {
  0%, 20%, 50%, 80%, 100% {
    opacity: 1;
    text-shadow: 0 0 8px var(--cyber-glow-cyan), 0 0 14px var(--cyber-glow-pink);
  }
  30%, 40%, 60%, 70% {
    opacity: 0.25;
    text-shadow: none;
  }
}

/* ==============================
   Glitch Animation (Optional)
   ============================== */
.glitch {
  position: relative;
  color: var(--cyber-glow-cyan);
  text-shadow: 2px 0 var(--cyber-glow-pink), -2px 0 #00ffff;
  animation: glitchEffect 1s infinite;
}

@keyframes glitchEffect {
  0% { clip-path: inset(0 0 90% 0); transform: translate(1px, -1px); }
  20% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 1px); }
  40% { clip-path: inset(20% 0 60% 0); transform: translate(2px, 0px); }
  60% { clip-path: inset(0 0 90% 0); transform: translate(-1px, -2px); }
  80% { clip-path: inset(30% 0 50% 0); transform: translate(1px, 1px); }
  100% { clip-path: inset(0 0 90% 0); transform: translate(0, 0); }
}

/* ==============================
   Responsive Tweaks
   ============================== */
@media (max-width: 768px) {
  .neod-container {
    padding: 20px;
  }
  .neod-header h1 {
    font-size: 2.4em;
  }
  .neod-intro p {
    font-size: 1em;
  }
  .neod-chapters ul li a {
    font-size: 1.1em;
  }
}
#terminal-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  color: #00ff99;
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  padding: 24px;
  z-index: 999999;
  overflow-y: auto;
}

#terminal-modal.hidden {
  display: none;
}
.page-glitch {
  position: fixed;
  inset: 0;
  background: #000;
  pointer-events: none;
  z-index: 100000;
  animation: glitchFlash 0.5s forwards;
}

@keyframes glitchFlash {
  0% { opacity: 0; }
  25% { opacity: 1; background: #0a0a12; }
  50% { opacity: 1; background: #000; }
  100% { opacity: 1; background: #0f0f18; }
}
#intro-screen {
  position: fixed;
  inset: 0;
  background: #000c19;
  color: #00eaff;
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  padding: 40px;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 6px #00eaff;
}

#intro-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
