/* ================================
   🌑 Global Base Theme Styles
   ================================ */
:root {
  --primary-neon: #00ffcc;
  --secondary-neon: #ff66cc;
  --dark-bg: #0a0a0a;
  --light-bg: #f5f5f5;
  --font-main: 'Share Tech Mono', monospace;
  --glow-intensity: 15px;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: linear-gradient(145deg, #010101, var(--dark-bg));
  color: var(--primary-neon);
  overflow-x: hidden;
  position: relative;
  transition: background 0.4s ease, color 0.4s ease;
}

body.light {
  background: linear-gradient(145deg, var(--light-bg), #ffffff);
  color: #111;
}
body.light .card {
  background: #fff;
  border-color: #00ccff55;
  box-shadow: 0 0 10px #00ccff22;
}
body.light a {
  color: #0099cc;
}
body.light a:hover {
  text-shadow: 0 0 4px #00ccff;
}

a {
  color: var(--secondary-neon);
  text-decoration: none;
}
a:hover {
  text-shadow: 0 0 5px var(--secondary-neon);
}

header, footer {
  text-align: center;
  padding: 2rem;
  border-bottom: 2px solid #00ffcc55;
}

/* ================================
   🟩 Neon Glow Card
   ================================ */
.card {
  background: rgba(17, 17, 17, 0.95);
  border: 2px solid #00ffcc55;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 var(--glow-intensity) var(--primary-neon);
  border-radius: 10px;
  backdrop-filter: blur(2px);
  transition: transform 0.2s ease-in-out, box-shadow 0.3s ease;
}
.card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px var(--primary-neon);
}

/* ================================
   📺 Scanlines Overlay
   ================================ */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 204, 0.03) 0px,
    rgba(0, 255, 204, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
  animation: flicker 2s infinite linear;
  pointer-events: none;
  z-index: 9999;
}
@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
  }
  20%, 24%, 55% {
    opacity: 0.9;
  }
}

/* ================================
   ⚡ Theme Toggle Button
   ================================ */
#themeToggle {
  background: transparent;
  border: 1px solid var(--primary-neon);
  color: var(--primary-neon);
  padding: 0.6em 1.2em;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  margin: 1em auto;
  display: block;
  transition: all 0.2s ease;
}
#themeToggle:hover {
  background: rgba(0, 255, 204, 0.1);
  text-shadow: 0 0 8px var(--primary-neon);
  box-shadow: 0 0 10px var(--primary-neon);
}

/* ================================
   🌀 Glitchy Text Animation
   ================================ */
.glitchy-text {
  animation: glitch 1.5s infinite;
  display: inline-block;
}
@keyframes glitch {
  0%   { text-shadow: 1px 0 magenta, -1px 0 cyan; }
  20%  { text-shadow: -1px 0 magenta, 1px 0 cyan; }
  40%  { text-shadow: 2px 0 red, -2px 0 blue; }
  60%  { text-shadow: 0 0 5px #0ff; }
  80%  { text-shadow: 1px 0 #0ff, -1px 0 #f0f; }
  100% { text-shadow: 0 0 2px #0ff; }
}

/* ================================
   📱 Responsive Styles
   ================================ */
@media (max-width: 600px) {
  body { font-size: 0.95rem; }
  .card { padding: 1rem; }
  header, footer { padding: 1rem; }
}

/* ================================
   🌐 Cyber Sections
   ================================ */
.header-cyber,
.article-cyber,
.footer-cyber {
  background: #0b0b0f;
  border: 1px solid var(--primary-neon);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 0 10px var(--primary-neon);
}

.cyber-title,
.gradient-glow {
  font-family: 'Orbitron', sans-serif;
  color: var(--primary-neon);
  text-shadow: 0 0 5px #ff00cc;
}

/* ================================
   📰 Content Formatting
   ================================ */
.wedstream-feed {
  list-style: none;
  padding-left: 0;
  margin-top: 1.5rem;
}
.wedstream-feed li {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}
.scene p,
.dialogue p {
  line-height: 1.7;
  margin-bottom: 1rem;
}
.dialogue .speaker {
  font-weight: bold;
  color: var(--secondary-neon);
}
.flash {
  font-weight: bold;
  text-align: center;
  animation: pulseFlash 1.2s infinite alternate;
}
@keyframes pulseFlash {
  0%   { color: #00ffcc; text-shadow: 0 0 5px #0ff; }
  100% { color: #ff66cc; text-shadow: 0 0 8px #f0f; }
}
.danger-line {
  color: #ff0033;
  font-weight: bold;
  text-shadow: 0 0 5px #ff0033;
}

/* ================================
   💬 Comment Box
   ================================ */
.comment-box {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cyber-textarea {
  padding: 0.75rem;
  background: #111;
  border: 1px solid var(--primary-neon);
  color: var(--primary-neon);
  resize: vertical;
  font-family: inherit;
  min-height: 100px;
}
.comment-list {
  margin-top: 1rem;
}

/* ================================
   📚 Chapters & Nav
   ================================ */
.chapters {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}
.chapters li a {
  display: block;
  padding: 0.75rem 1rem;
  background: rgba(0, 255, 204, 0.05);
  border: 1px solid #00ffcc44;
  border-radius: 6px;
  color: var(--secondary-neon);
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s, box-shadow 0.2s;
}
.chapters li a:hover {
  background: rgba(0, 255, 204, 0.15);
  box-shadow: 0 0 8px var(--secondary-neon);
  text-shadow: 0 0 5px var(--secondary-neon);
}

.nav-list {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  list-style: none;
  padding: 1rem;
  border-bottom: 1px solid #00ffcc33;
}
.nav-list a {
  font-weight: bold;
  color: var(--secondary-neon);
}
.nav-list a[aria-current="page"] {
  text-decoration: underline;
  text-shadow: 0 0 5px var(--secondary-neon);
}

/* ================================
   🧠 Lore & Intro
   ================================ */
.intro-text {
  font-style: italic;
  margin-bottom: 2rem;
  color: #00ffee;
}
.lore-block {
  margin-bottom: 2rem;
}
.lore-block h3 {
  color: var(--secondary-neon);
  margin-bottom: 0.5rem;
}
.lore-block p {
  line-height: 1.6;
}

.theme-toggle-wrapper {
  text-align: center;
  margin-top: 2rem;
}
body.dark {
  background-color: #111;
  color: #f0f0f0;
}
body.dark {
  background-color: #111;
  color: #f0f0f0;
}

body.dark a {
  color: #84c5ff;
}
body.dark .card {
  background-color: #1a1a1a;
  border-color: #00ffcc55;
  box-shadow: 0 0 15px #00ffcc44;
}
body.dark .gradient-glow {
  color: #ffb0f0;
}
