/* ==========================================================================
   HEATH BARKER BOOKS - STYLE SYSTEM (DARKLING_SYS v1.0)
   ========================================================================== */

/* 1. Design Tokens & Variables */
:root {
  /* Color Palette - Guided by Fleeing Oblivion Brand Guide */
  --color-bg-base: #060709;         /* Extremely deep cosmic space black */
  --color-bg-terminal: #0a0a0a;     /* Pure brand terminal black */
  --color-bg-card: #121316;         /* Gunmetal dark-slate cards */
  --color-bg-card-hover: #1b1c20;   /* Slightly elevated gunmetal card */
  --color-bg-overlay: rgba(10, 10, 10, 0.85);
  
  --color-accent-cyan: #00ffff;     /* Electric Cyan */
  --color-accent-violet: #8a2be2;   /* Portal Violet */
  --color-accent-rose: #ff2a5f;     /* Crimson/Rose */
  --color-accent-cyan-light: #99ffff;  /* Lighter Electric Cyan for hidden/classified paths */
  --color-accent-violet-light: #d3a4ff; /* Lighter Portal Violet for hidden/classified paths */
  --color-accent-cyan-rgb: 0, 255, 255;
  --color-accent-violet-rgb: 138, 43, 226;
  --color-accent-rose-rgb: 255, 42, 95;
  
  --color-text-primary: #ffffff;
  --color-text-secondary: #b0b5c0;
  --color-text-muted: #626875;
  --color-border: rgba(255, 255, 255, 0.08);
  
  /* Fonts */
  --font-display: 'Orbitron', sans-serif;
  --font-tech: 'Share Tech Mono', monospace;
  --font-body: 'Inter', sans-serif;
  
  /* Layout */
  --header-height: 80px;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --container-max-width: 1200px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Global Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  scrollbar-gutter: stable;
  background-color: var(--color-bg-base);
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

p {
  color: var(--color-text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* Custom Scrollbar */
@supports (scrollbar-color: auto) {
  html {
    scrollbar-color: var(--color-accent-cyan) var(--color-bg-base);
    scrollbar-width: thin;
  }
}

/* Legacy Webkit scrollbar for Safari/Chrome fallback */
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--color-bg-base);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--color-text-muted);
    border-radius: var(--border-radius-sm);
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-cyan);
  }
}

/* Visually Hidden Helper (SEO-friendly) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 3. Ambient Background & Visuals */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -3;
}

.glow-field {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vh;
  background: 
    radial-gradient(circle at 20% 30%, rgba(var(--color-accent-cyan-rgb), 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(var(--color-accent-violet-rgb), 0.03) 0%, transparent 50%);
  filter: blur(80px);
  pointer-events: none;
  z-index: -2;
  transition: background var(--transition-slow);
  animation: ambientFloat 30s ease-in-out infinite alternate;
}

@keyframes ambientFloat {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-45%, -52%) scale(1.08) rotate(4deg); }
  100% { transform: translate(-53%, -47%) scale(0.94) rotate(-3deg); }
}

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.15) 50%
  );
  background-size: 100% 4px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.3;
}

/* State changes driven by navigation */
body.reader-active .glow-field {
  background: 
    radial-gradient(circle at 15% 15%, rgba(var(--color-accent-cyan-rgb), 0.16) 0%, transparent 65%),
    radial-gradient(circle at 85% 85%, rgba(var(--color-accent-cyan-rgb), 0.1) 0%, transparent 65%);
}

body.creator-active .glow-field {
  background: 
    radial-gradient(circle at 85% 15%, rgba(var(--color-accent-violet-rgb), 0.16) 0%, transparent 65%),
    radial-gradient(circle at 15% 85%, rgba(var(--color-accent-violet-rgb), 0.1) 0%, transparent 65%);
}

/* 4. Header & Navigation */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(6, 7, 9, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.main-header.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.header-container {
  max-width: var(--container-max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-img {
  height: 45px;
  width: auto;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--color-text-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  position: relative;
  transition: background var(--transition-fast);
}

.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  transition: transform var(--transition-fast), top var(--transition-fast);
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.nav-list {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  position: relative;
  padding: 8px 0;
}

body.reader-active .nav-link:hover,
body.reader-active .nav-link.active {
  color: var(--color-accent-cyan);
}

body.creator-active .nav-link:hover,
body.creator-active .nav-link.active {
  color: var(--color-accent-violet);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  transition: width var(--transition-fast);
}

body.reader-active .nav-link::after { background-color: var(--color-accent-cyan); }
body.creator-active .nav-link::after { background-color: var(--color-accent-violet); }

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.home-btn {
  border: 1px solid var(--color-text-muted);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

body.reader-active .nav-link.home-btn:hover {
  border-color: var(--color-accent-cyan);
  background: rgba(0, 255, 255, 0.05);
}

body.creator-active .nav-link.home-btn:hover {
  border-color: var(--color-accent-violet);
  background: rgba(138, 43, 226, 0.05);
}

.nav-link.home-btn::after {
  display: none;
}

.hidden {
  display: none !important;
}

/* 5. Gate Selector (Landing Deck) */
.gate-selector {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* --- Split Threshold Container --- */
.split-threshold-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
  background: #060709;
}

/* Central Overlay Hero */
.welcome-hero-overlay {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  text-align: center;
  width: 100%;
  max-width: 600px;
  animation: fadeInDown var(--transition-slow);
}

.welcome-title {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 0.25em;
  margin-bottom: 8px;
  background: linear-gradient(to right, #fff 40%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.welcome-subtitle {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--color-text-muted);
  margin-bottom: 0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* Individual Panel styling */
.split-panel {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  cursor: pointer;
  transition: flex 0.8s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.8s ease, border-color 0.8s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.reader-panel {
  background: linear-gradient(135deg, rgba(6, 7, 9, 0.96), rgba(9, 21, 31, 0.98));
  border-right: 1px solid rgba(0, 243, 255, 0.05);
}

.creator-panel {
  background: linear-gradient(135deg, rgba(6, 7, 9, 0.96), rgba(20, 11, 31, 0.98));
  border-left: 1px solid rgba(189, 0, 255, 0.05);
}

/* Flex expansion on hover */
.split-panel:hover {
  flex: 1.35;
}

.reader-panel:hover {
  background: linear-gradient(135deg, rgba(8, 11, 15, 0.95), rgba(12, 32, 48, 0.95));
  border-right-color: rgba(0, 243, 255, 0.15);
  box-shadow: 10px 0 40px rgba(0, 243, 255, 0.04);
}

.creator-panel:hover {
  background: linear-gradient(135deg, rgba(8, 11, 15, 0.95), rgba(30, 15, 48, 0.95));
  border-left-color: rgba(189, 0, 255, 0.15);
  box-shadow: -10px 0 40px rgba(189, 0, 255, 0.04);
}

/* Muted vector blueprint backdrop */
.panel-schematic {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.06;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s ease, filter 0.8s ease;
  filter: grayscale(90%) blur(1px);
  z-index: 1;
  pointer-events: none;
}

.schematic-reader {
  background-image: url('assets/images/schematic-portal.svg');
  transform: scale(0.85);
}

.schematic-creator {
  background-image: url('assets/images/schematic-network.svg');
  transform: scale(0.85);
}

.split-panel:hover .panel-schematic {
  opacity: 0.18;
  transform: scale(0.92);
  filter: grayscale(0%) blur(0px);
}

/* Mouse-tracking glow overlay using ::after */
.split-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.035), transparent 45%);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.split-panel:hover::after {
  opacity: 1;
}

.reader-panel::after {
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 243, 255, 0.04), transparent 45%);
}

.creator-panel::after {
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(189, 0, 255, 0.04), transparent 45%);
}

/* Panel Content Styling with soft glassmorphic backdrop for layout clarity */
.panel-content {
  position: relative;
  z-index: 3;
  max-width: 440px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  border-radius: var(--border-radius-md);
  background: rgba(6, 7, 9, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.6s ease, background-color 0.6s ease;
  margin-top: 80px; /* Offset below the absolutely-positioned central logo overlay */
}

.split-panel:hover .panel-content {
  transform: translateY(-8px);
  background: rgba(6, 7, 9, 0.55);
  border-color: rgba(255, 255, 255, 0.06);
}

.reader-panel:hover .panel-content {
  border-color: rgba(0, 243, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 243, 255, 0.03);
}

.creator-panel:hover .panel-content {
  border-color: rgba(189, 0, 255, 0.12);
  box-shadow: 0 10px 30px rgba(189, 0, 255, 0.03);
}

.panel-tag {
  font-family: var(--font-tech);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  margin-bottom: 16px;
}

.panel-heading {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 16px 0;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.panel-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 28px;
  transition: color 0.4s ease;
}

.split-panel:hover .panel-desc {
  color: rgba(255, 255, 255, 0.85);
}

/* Panel Call-to-Action Buttons */
.panel-action {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-tech);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  padding: 12px 28px;
  border: 1px solid currentColor;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--border-radius-sm);
  transition: all 0.4s ease;
  font-weight: bold;
}

.split-panel:hover .panel-action {
  background: currentColor;
  color: #060709 !important;
  box-shadow: 0 0 20px currentColor;
}

.panel-action .arrow {
  transition: transform 0.3s ease;
}

.split-panel:hover .panel-action .arrow {
  transform: translateX(6px);
}

/* Mobile Responsiveness for Panels */
@media (max-width: 768px) {
  .split-threshold-container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }
  
  .split-panel {
    flex: none;
    height: 50vh;
    padding: 30px;
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: height 0.6s ease;
  }
  
  .split-panel:hover {
    flex: none;
    height: 60vh;
  }
  
  .welcome-hero-overlay {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 60px 20px 20px;
    background: #060709;
  }
  
  .panel-content {
    margin-top: 0;
    padding: 20px;
  }
  
  .panel-heading {
    font-size: 1.8rem;
  }
  
  .panel-desc {
    font-size: 0.85rem;
    margin-bottom: 20px;
  }
  
  .schematic-reader,
  .schematic-creator {
    transform: scale(0.6);
  }
  
  .split-panel:hover .panel-schematic {
    transform: scale(0.65);
  }
}

/* Helpers */
.text-cyan { color: var(--color-accent-cyan); }
.text-violet { color: var(--color-accent-violet); }
.text-rose { color: var(--color-accent-rose); }

/* --- Path-specific active background systems (grid overlays & ambient glow field coordinates) --- */
body.reader-active {
  background-color: var(--color-bg-base);
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(0, 243, 255, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 15% 80%, rgba(189, 0, 255, 0.12) 0%, transparent 50%),
    radial-gradient(circle, rgba(0, 243, 255, 0.25) 1.5px, transparent 1.5px),
    linear-gradient(rgba(0, 243, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.08) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px, 60px 60px;
  background-attachment: fixed;
  background-position: center;
}

body.creator-active {
  background-color: var(--color-bg-base);
  background-image: 
    radial-gradient(circle at 80% 80%, rgba(189, 0, 255, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 15% 20%, rgba(0, 243, 255, 0.12) 0%, transparent 50%),
    radial-gradient(circle, rgba(189, 0, 255, 0.25) 1.5px, transparent 1.5px),
    linear-gradient(rgba(189, 0, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(189, 0, 255, 0.08) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px, 60px 60px;
  background-attachment: fixed;
  background-position: center;
}

/* 6. Layout Path Containers */
.page-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.path-container {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 80px;
  animation: fadeInUp var(--transition-normal);
}

/* Floating background schematic overlay for path containers */
.path-background-schematic {
  position: absolute;
  width: 750px;
  height: 750px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.18; /* Clearly visible vector blueprint background */
  pointer-events: none;
  z-index: -1;
  filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.02));
  transition: opacity var(--transition-normal);
}

.path-background-schematic.left {
  left: -200px;
  top: 15%;
  animation: rotateSlow 120s linear infinite;
}

.path-background-schematic.right {
  right: -200px;
  top: 50%;
  animation: rotateSlowCounter 150s linear infinite;
}

/* Animations for background schematics */
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateSlowCounter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.section-block {
  margin-bottom: 120px;
}

.section-header {
  margin-bottom: 48px;
}

.section-tag {
  font-family: var(--font-tech);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.section-divider {
  width: 100%;
  height: 1px;
  background-color: var(--color-border);
  position: relative;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 80px;
  height: 3px;
}

body.reader-active .section-divider::before { background-color: var(--color-accent-cyan); }
body.creator-active .section-divider::before { background-color: var(--color-accent-violet); }

.section-intro {
  max-width: 750px;
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
}

/* 7. Buttons & Components */
.btn {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  padding: 14px 28px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: inline-block;
  text-align: center;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
  border: 1px solid transparent;
}

/* Reader theme CTAs */
body.reader-active .btn-primary {
  background-color: var(--color-accent-cyan);
  color: var(--color-bg-base);
}
body.reader-active .btn-primary:hover {
  background-color: #00cccc;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.35);
}
body.reader-active .btn-secondary {
  background-color: transparent;
  border-color: var(--color-accent-cyan);
  color: var(--color-accent-cyan);
}
body.reader-active .btn-secondary:hover {
  background-color: rgba(0, 255, 255, 0.05);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

/* Creator theme CTAs */
body.creator-active .btn-primary {
  background-color: var(--color-accent-violet);
  color: #ffffff;
}
body.creator-active .btn-primary:hover {
  background-color: #761ec8;
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.35);
}
body.creator-active .btn-secondary {
  background-color: transparent;
  border-color: var(--color-accent-violet);
  color: var(--color-accent-violet);
}
body.creator-active .btn-secondary:hover {
  background-color: rgba(138, 43, 226, 0.05);
  box-shadow: 0 0 10px rgba(138, 43, 226, 0.15);
}

/* Default state buttons */
.btn-primary {
  background-color: var(--color-accent-cyan);
  color: var(--color-bg-base);
}
.btn-secondary {
  background-color: transparent;
  border-color: var(--color-text-muted);
  color: var(--color-text-primary);
}
.btn-secondary:hover {
  border-color: var(--color-text-primary);
  background-color: rgba(255,255,255,0.03);
}

/* Bookshelf Layout */
.bookshelf-grid {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.book-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  background-color: rgba(18, 19, 22, 0.85); /* Semi-transparent gunmetal dark slate */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

body.reader-active .book-card:hover {
  border-color: rgba(0, 255, 255, 0.4);
  box-shadow: 
    0 12px 40px rgba(0, 255, 255, 0.08),
    inset 0 0 24px rgba(0, 255, 255, 0.03);
  transform: translateY(-4px);
}

.book-card::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 60%;
  transform: translate(-10%, -35%);
  width: 750px;
  height: 750px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.22; /* Clearly visible vector schematics backdrop */
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.book-card:nth-child(odd)::before {
  background-image: url('assets/images/schematic-portal.svg');
}

.book-card:nth-child(even)::before {
  background-image: url('assets/images/schematic-network.svg');
}

.book-card:hover::before {
  opacity: 0.38;
  transform: translate(-10%, -35%) scale(1.06);
}

.book-cover-wrapper,
.book-details {
  position: relative;
  z-index: 1;
}

.book-cover-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.05);
}

.book-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.book-card:hover .book-cover-img {
  transform: scale(1.03);
}

.book-cover-glow {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.2);
  pointer-events: none;
}

.book-details {
  display: flex;
  flex-direction: column;
}

.book-series {
  font-family: var(--font-tech);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  font-weight: 700;
}

.book-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.book-tagline {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-text-primary);
  margin-bottom: 24px;
}

.book-synopsis {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 30px;
}

.book-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.promise-tag {
  font-family: var(--font-tech);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.book-warnings {
  margin-bottom: 32px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 20px;
}

.warning-label {
  font-family: var(--font-tech);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  font-weight: bold;
  margin-bottom: 8px;
  display: block;
}

.warning-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  opacity: 0.85;
}

.book-actions {
  display: flex;
  gap: 16px;
  margin-top: auto;
  align-items: center;
}

/* Card Placeholder style for volume 2 */
.book-cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  background-color: var(--color-bg-base);
  border: 1px dashed var(--color-text-muted);
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  text-align: center;
  position: relative;
}

.placeholder-glow {
  position: absolute;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(var(--color-accent-violet-rgb), 0.06) 0%, transparent 60%);
  filter: blur(20px);
  pointer-events: none;
}

.placeholder-glow.text-rose {
  background: radial-gradient(circle, rgba(var(--color-accent-rose-rgb), 0.06) 0%, transparent 60%);
}

.placeholder-serial {
  font-family: var(--font-tech);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.placeholder-title {
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  color: var(--color-text-secondary);
}

.placeholder-tag {
  font-family: var(--font-tech);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.status-badge {
  font-family: var(--font-tech);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  padding: 8px 16px;
  border: 1px solid var(--color-accent-violet);
  background: rgba(138, 43, 226, 0.05);
}

.status-badge.text-rose {
  border-color: var(--color-accent-rose);
  background: rgba(255, 42, 95, 0.05);
}

/* Additional Books List */
.other-books-segment {
  grid-column: 1 / -1;
  border-top: 1px solid var(--color-border);
  padding-top: 48px;
}

.subsegment-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-bottom: 24px;
}

.other-books-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.mini-book-card {
  display: flex;
  gap: 24px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 24px;
  transition: background-color var(--transition-fast);
}

.mini-book-card:hover {
  background-color: rgba(255,255,255,0.03);
}

.mini-cover-placeholder {
  width: 90px;
  height: 130px;
  background-color: var(--color-bg-base);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.mini-cover-img {
  width: 90px;
  height: 130px;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.mini-info {
  display: flex;
  flex-direction: column;
}

.mini-series {
  font-family: var(--font-tech);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.mini-info h5 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.mini-info p {
  font-size: 0.85rem;
}

/* Preludes Grid */
.preludes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.prelude-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 40px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.prelude-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 255, 0.2);
}

.prelude-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  align-items: center;
}

.prelude-num {
  font-family: var(--font-tech);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.prelude-length {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.prelude-title {
  font-size: 1.4rem;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.prelude-summary {
  font-size: 0.9rem;
  margin-bottom: 32px;
  color: var(--color-text-secondary);
}

.prelude-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Transmission (Newsletter) Section */
.transmission-card {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 280px;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  position: relative;
}

.transmission-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--color-accent-cyan);
}

.transmission-content {
  padding: 56px;
}

.transmission-content h3 {
  font-size: 1.8rem;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.transmission-content p {
  font-size: 1rem;
  max-width: 600px;
  margin-bottom: 32px;
}

.transmission-form .form-group {
  display: flex;
  gap: 12px;
  max-width: 550px;
}

.form-input {
  flex: 1;
  background-color: var(--color-bg-base);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  padding: 14px 20px;
  color: var(--color-text-primary);
  font-family: var(--font-tech);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent-cyan);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

.form-feedback {
  margin-top: 12px;
  font-family: var(--font-tech);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  min-height: 20px;
}

.transmission-decor {
  background-color: rgba(255,255,255,0.01);
  border-left: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.radar-scan {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 255, 0.1);
  position: relative;
}

.radar-scan::before {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 255, 0.05);
}

.radar-scan::after {
  content: '';
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 255, 0.03);
}

.radar-line {
  position: absolute;
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, rgba(0,255,255,0.2) 0%, transparent 60%);
  transform-origin: bottom right;
  top: calc(50% - 80px);
  left: calc(50% - 80px);
  animation: radarRotate 4s linear infinite;
  border-radius: 80px 0 0 0;
}

/* Systems Log (Blog) */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.blog-card {
  background-color: rgba(18, 19, 22, 0.85); /* Semi-transparent gunmetal dark slate */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 36px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
  position: relative;
  overflow: hidden;
}

body.creator-active .blog-card:hover {
  border-color: rgba(138, 43, 226, 0.4);
  box-shadow: 
    0 12px 40px rgba(138, 43, 226, 0.08),
    inset 0 0 24px rgba(138, 43, 226, 0.03);
  transform: translateY(-4px);
}

.blog-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 60%;
  transform: translate(-10%, -35%);
  width: 450px;
  height: 450px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.18; /* Clearly visible card background watermark */
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.blog-card:nth-child(odd)::after {
  background-image: url('assets/images/schematic-portal.svg');
}

.blog-card:nth-child(even)::after {
  background-image: url('assets/images/schematic-network.svg');
}

.blog-card:hover::after {
  opacity: 0.32;
  transform: translate(-10%, -35%) scale(1.08);
}

.blog-meta,
.blog-title,
.blog-excerpt,
.blog-read-more {
  position: relative;
  z-index: 1;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--color-text-muted);
  transition: background-color var(--transition-fast);
}

.blog-card:hover::before {
  background-color: var(--color-accent-violet);
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  align-items: center;
}

.blog-date {
  font-family: var(--font-tech);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.blog-tag {
  font-family: var(--font-tech);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.blog-title {
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.blog-excerpt {
  font-size: 0.9rem;
  margin-bottom: 24px;
  color: var(--color-text-secondary);
  flex-grow: 1;
}

.blog-link {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap var(--transition-fast);
}

.blog-link:hover {
  gap: 12px;
}

/* Author Dossier Section */
.dossier-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: start;
}

.matrix-bio-box {
  background-color: var(--color-bg-terminal);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 32px;
  font-family: var(--font-tech);
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}

.matrix-bio-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-accent-violet);
}

.bio-stat {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
  padding-bottom: 8px;
}

.bio-stat:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.bio-stat span:first-child {
  color: var(--color-text-muted);
}

.bio-stat span:last-child {
  color: var(--color-accent-violet);
}

.dossier-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dossier-subtitle {
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

/* 8. Retro Terminal Emulator */
.terminal-emulator {
  background-color: var(--color-bg-terminal);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  position: relative;
}

body.reader-active .terminal-emulator { border-color: rgba(var(--color-accent-cyan-rgb), 0.2); }
body.creator-active .terminal-emulator { border-color: rgba(var(--color-accent-violet-rgb), 0.2); }

.terminal-bar {
  background-color: #121212;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.terminal-dots {
  display: flex;
  gap: 8px;
  margin-right: 20px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.terminal-title {
  font-family: var(--font-tech);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.terminal-body {
  padding: 24px;
  min-height: 380px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.terminal-log {
  flex-grow: 1;
  font-family: var(--font-tech);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.terminal-line {
  margin-bottom: 10px;
  word-break: break-all;
  white-space: pre-wrap;
}

.terminal-line.system-msg {
  color: var(--color-text-muted);
}

.terminal-line.command-echo {
  color: #ffffff;
}

.terminal-line.response-msg {
  color: var(--color-accent-cyan);
}

body.creator-active .terminal-line.response-msg {
  color: var(--color-accent-violet);
}

.terminal-line.error-msg {
  color: #ff5f56;
}

.highlight-text {
  color: #ffffff;
  font-weight: bold;
}

.term-click {
  cursor: pointer;
}
.term-click:hover {
  text-decoration: underline;
  opacity: 0.9;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-tech);
  font-size: 0.9rem;
  border-top: 1px dashed rgba(255,255,255,0.05);
  padding-top: 16px;
  margin-top: 16px;
}

.terminal-prompt {
  color: var(--color-text-muted);
}

.terminal-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--color-accent-cyan);
  font-family: var(--font-tech);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  caret-color: var(--color-accent-cyan);
}

body.creator-active .terminal-input {
  color: var(--color-accent-violet);
  caret-color: var(--color-accent-violet);
}

/* 9. HTML5 Dialog Modals */
.dialog-modal {
  border: none;
  background: transparent;
  width: 100%;
  max-width: 800px;
  padding: 24px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  max-height: 90vh;
  outline: none;
}

.dialog-modal::backdrop {
  background-color: rgba(6, 7, 9, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  animation: fadeIn 0.3s forwards;
}

.modal-wrapper {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

body.reader-active .modal-wrapper { border-color: rgba(var(--color-accent-cyan-rgb), 0.25); }
body.creator-active .modal-wrapper { border-color: rgba(var(--color-accent-violet-rgb), 0.25); }

.modal-header {
  padding: 24px 32px;
  background-color: #121316;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-tag {
  font-family: var(--font-tech);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  display: block;
}

.modal-title {
  font-size: 1.4rem;
  letter-spacing: 0.05em;
}

.modal-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
  padding: 5px;
}

.modal-close:hover {
  color: var(--color-text-primary);
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.story-metadata {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.story-divider {
  border: none;
  height: 1px;
  background-color: var(--color-border);
  margin-bottom: 24px;
}

.manuscript-text {
  margin-bottom: 20px;
}

.manuscript-text:last-child {
  margin-bottom: 0;
}

.modal-footer {
  padding: 20px 32px;
  background-color: #121316;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
}

/* 10. Footer Footer */
.main-footer {
  border-top: 1px solid var(--color-border);
  background-color: #060709;
  padding: 24px 0;
  font-family: var(--font-tech);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.footer-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-marker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

.footer-link:hover {
  color: var(--color-accent-cyan);
  text-shadow: 0 0 8px var(--color-accent-cyan);
}

body.creator-active .footer-link:hover {
  color: var(--color-accent-violet);
  text-shadow: 0 0 8px var(--color-accent-violet);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  animation: pulseCyan 1.5s infinite;
}

body.reader-active .pulse-dot { background-color: var(--color-accent-cyan); animation-name: pulseCyan; }
body.creator-active .pulse-dot { background-color: var(--color-accent-violet); animation-name: pulseViolet; }

/* 11. Keyframes & Animation Definitions */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseCyan {
  0% { opacity: 0.4; }
  50% { opacity: 1; text-shadow: 0 0 8px rgba(0, 255, 255, 0.4); }
  100% { opacity: 0.4; }
}

@keyframes pulseViolet {
  0% { opacity: 0.4; }
  50% { opacity: 1; text-shadow: 0 0 8px rgba(138, 43, 226, 0.4); }
  100% { opacity: 0.4; }
}

@keyframes radarRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 12. Media Queries & Responsiveness */
@media (max-width: 992px) {
  .welcome-title { font-size: 2.8rem; }
  .gates-grid { gap: 24px; }
  .gate-card { padding: 32px; height: 360px; }
  
  .book-card {
    grid-template-columns: 240px 1fr;
    gap: 32px;
    padding: 32px;
  }
  .book-title { font-size: 1.8rem; }
  
  .dossier-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .matrix-bio-box { max-width: 360px; }
  
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .welcome-title { font-size: 2.2rem; }
  .welcome-subtitle { letter-spacing: 0.2em; font-size: 0.8rem; }
  
  .gates-grid {
    grid-template-columns: 1fr;
  }
  .gate-card { height: auto; min-height: 280px; }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background-color: #060709;
    border-left: 1px solid var(--color-border);
    padding: 40px 24px;
    transition: right var(--transition-normal);
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    gap: 24px;
  }
  
  .book-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }
  .book-cover-wrapper {
    max-width: 240px;
    margin: 0 auto;
  }
  
  .preludes-grid {
    grid-template-columns: 1fr;
  }
  
  .transmission-card {
    grid-template-columns: 1fr;
  }
  .transmission-content { padding: 32px 24px; }
  .transmission-decor { display: none; }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .path-background-schematic {
    display: none;
  }
}

/* 10. Atmospheric Glitch & Flicker Effects */
@keyframes glitchFlicker {
  0% { opacity: 0.98; filter: hue-rotate(0deg) saturate(1); }
  10% { opacity: 0.95; filter: hue-rotate(2deg) saturate(1.2) contrast(1.1); }
  15% { opacity: 0.99; filter: hue-rotate(-1deg); }
  25% { opacity: 0.93; filter: hue-rotate(5deg) contrast(1.3); }
  30% { opacity: 0.97; }
  35% { opacity: 0.91; filter: saturate(1.5); }
  45% { opacity: 0.99; filter: hue-rotate(0deg) saturate(1); }
  50% { opacity: 0.94; }
  55% { opacity: 0.98; }
  65% { opacity: 0.92; }
  70% { opacity: 0.99; }
  100% { opacity: 1; filter: none; }
}

.glitch-transition {
  animation: glitchFlicker 0.4s ease-out;
}

/* --- Visual Upgrades: HUD Overlay --- */
.hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  font-family: var(--font-tech);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.25);
  padding: 30px;
  display: flex;
  justify-content: space-between;
}

.hud-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hud-line {
  display: flex;
  gap: 8px;
}

.hud-label {
  color: rgba(255, 255, 255, 0.15);
}

.hud-val {
  font-weight: bold;
}

.hud-footer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 100%;
  padding: 0 40px;
}

.hud-ticker {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hud-footer a {
  pointer-events: auto;
}


/* --- Visual Upgrades: Aperture Portal Ring --- */
.aperture-portal-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-emblem-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.welcome-emblem {
  height: 60px;
  position: relative;
  z-index: 5;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.15));
}

.aperture-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.02);
  transition: border-color 0.6s ease, box-shadow 0.6s ease;
}

.outer-ring {
  width: 120px;
  height: 120px;
  border-style: dashed;
  animation: spinClockwise 25s linear infinite;
}

.inner-ring {
  width: 90px;
  height: 90px;
  border-style: double;
  animation: spinCounterClockwise 15s linear infinite;
}

/* Hover colors driven by JS state injection */
body.reader-hovered .aperture-ring {
  border-color: rgba(var(--color-accent-cyan-rgb), 0.45);
  box-shadow: 0 0 25px rgba(var(--color-accent-cyan-rgb), 0.15);
}

body.creator-hovered .aperture-ring {
  border-color: rgba(var(--color-accent-violet-rgb), 0.45);
  box-shadow: 0 0 25px rgba(var(--color-accent-violet-rgb), 0.15);
}

/* Legacy hover glow tweaks removed (no longer needed for split panels) */

/* --- Spin animations --- */
@keyframes spinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinCounterClockwise {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* ==========================================================================
   TRANSMISSION LOGS (NEWSLETTER ARCHIVES) GUI STYLES
   ========================================================================== */
.transmission-logs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.transmission-logs-grid .log-card {
  background-color: rgba(18, 19, 22, 0.85); /* Semi-transparent gunmetal dark slate */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 36px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.transmission-logs-grid .log-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--color-text-muted);
  transition: background-color var(--transition-fast);
}

.transmission-logs-grid .log-card:hover::before {
  background-color: var(--color-accent-cyan);
}

body.reader-active .transmission-logs-grid .log-card:hover {
  border-color: rgba(0, 255, 255, 0.4);
  box-shadow: 
    0 12px 40px rgba(0, 255, 255, 0.08),
    inset 0 0 24px rgba(0, 255, 255, 0.03);
  transform: translateY(-4px);
}

.transmission-logs-grid .log-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 60%;
  transform: translate(-10%, -35%);
  width: 450px;
  height: 450px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.18; /* Clearly visible card background watermark */
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.transmission-logs-grid .log-card:nth-child(odd)::after {
  background-image: url('assets/images/schematic-portal.svg');
}

.transmission-logs-grid .log-card:nth-child(even)::after {
  background-image: url('assets/images/schematic-network.svg');
}

.transmission-logs-grid .log-card:hover::after {
  opacity: 0.32;
  transform: translate(-10%, -35%) scale(1.08);
}

.log-meta,
.log-title,
.log-excerpt,
.log-link {
  position: relative;
  z-index: 1;
}

.log-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  align-items: center;
}

.log-date {
  font-family: var(--font-tech);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.log-tag {
  font-family: var(--font-tech);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.log-title {
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.log-excerpt {
  font-size: 0.9rem;
  margin-bottom: 24px;
  color: var(--color-text-secondary);
  flex-grow: 1;
}

.log-link {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap var(--transition-fast);
}

.log-link:hover {
  gap: 12px;
}

/* ==========================================================================
   SYSTEMS LOG SPLIT DASHBOARD STYLES
   ========================================================================== */
.syslog-dashboard {
  display: grid;
  grid-template-columns: 380px 1fr;
  height: 600px;
  border: 1px solid rgba(var(--color-accent-violet-rgb), 0.2);
  border-radius: var(--border-radius-lg);
  background-color: rgba(18, 19, 22, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
  margin-top: 36px;
  transition: border-color var(--transition-normal);
}

.syslog-dashboard:hover {
  border-color: rgba(var(--color-accent-violet-rgb), 0.4);
}

.syslog-inbox-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  background-color: rgba(10, 11, 13, 0.2);
}

.inbox-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background-color: rgba(var(--color-accent-violet-rgb), 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-tech);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.inbox-pane-title {
  font-weight: 700;
  color: var(--color-accent-violet);
  text-shadow: 0 0 10px rgba(var(--color-accent-violet-rgb), 0.3);
}

.inbox-pane-stats {
  color: var(--color-text-muted);
}

.inbox-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background-color: rgba(0, 0, 0, 0.15);
}

.inbox-filters .filter-btn {
  background: transparent;
  border: 1px solid rgba(var(--color-accent-violet-rgb), 0.3);
  color: var(--color-text-muted);
  font-family: var(--font-tech);
  font-size: 0.65rem;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.inbox-filters .filter-btn:hover {
  border-color: var(--color-accent-violet);
  color: #ffffff;
}

.inbox-filters .filter-btn.active {
  background-color: var(--color-accent-violet);
  border-color: var(--color-accent-violet);
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 8px rgba(var(--color-accent-violet-rgb), 0.4);
}

.inbox-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar for list and content */
.inbox-list::-webkit-scrollbar,
.bookshelf-list::-webkit-scrollbar,
.reader-content-area::-webkit-scrollbar {
  width: 8px;
}

.inbox-list::-webkit-scrollbar-track,
.bookshelf-list::-webkit-scrollbar-track,
.reader-content-area::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.inbox-list::-webkit-scrollbar-thumb,
.bookshelf-list::-webkit-scrollbar-thumb,
.reader-content-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.inbox-list::-webkit-scrollbar-thumb:hover,
.bookshelf-list::-webkit-scrollbar-thumb:hover,
.reader-content-area::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--color-accent-violet-rgb), 0.5);
}

.inbox-row {
  display: grid;
  grid-template-columns: 20px 70px 80px 1fr;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.inbox-row:last-child {
  border-bottom: none;
}

.inbox-row:hover {
  background-color: rgba(var(--color-accent-violet-rgb), 0.03);
  box-shadow: inset 3px 0 0 var(--color-accent-violet);
}

.inbox-row.selected {
  background-color: rgba(var(--color-accent-violet-rgb), 0.08);
  box-shadow: inset 3px 0 0 var(--color-accent-violet);
}

.inbox-status {
  display: flex;
  align-items: center;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent-violet);
  box-shadow: 0 0 8px var(--color-accent-violet);
  transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
}

.inbox-row.read .status-dot {
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.inbox-date {
  font-family: var(--font-tech);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.inbox-tag {
  font-family: var(--font-tech);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.inbox-subject {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
  transition: color 0.2s;
}

.inbox-row:hover .inbox-subject {
  color: #ffffff;
}

.syslog-reader-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: rgba(6, 7, 9, 0.35);
}

.reader-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background-color: rgba(0, 0, 0, 0.1);
  font-family: var(--font-tech);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.reader-status-glowing {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-accent-violet);
  text-shadow: 0 0 8px rgba(var(--color-accent-violet-rgb), 0.3);
}

.reader-status-glowing .pulse-dot {
  background-color: var(--color-accent-violet);
  box-shadow: 0 0 8px var(--color-accent-violet);
}

.reader-content-area {
  flex: 1;
  padding: 28px 36px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.reader-standby {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 300px;
  opacity: 0.7;
}

.standby-radar {
  position: relative;
  width: 64px;
  height: 64px;
  border: 1.5px solid rgba(var(--color-accent-violet-rgb), 0.20);
  border-radius: 50%;
  margin-bottom: 20px;
  overflow: hidden;
}

.standby-radar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border: 1px dashed rgba(var(--color-accent-violet-rgb), 0.25);
  border-radius: 50%;
}

.standby-radar .radar-sweep {
  position: absolute;
  width: 50%;
  height: 50%;
  top: 0;
  left: 50%;
  background: linear-gradient(90deg, rgba(var(--color-accent-violet-rgb), 0.4) 0%, transparent 100%);
  transform-origin: 0% 100%;
  animation: radarScan 3s linear infinite;
}

@keyframes radarScan {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.standby-title {
  font-family: var(--font-tech);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--color-accent-violet);
  margin-bottom: 8px;
  text-shadow: 0 0 8px rgba(var(--color-accent-violet-rgb), 0.2);
}

.standby-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.active-email-reader {
  display: flex;
  flex-direction: column;
}

.active-email-reader .email-headers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.active-email-reader .email-header-line {
  display: flex;
  font-family: var(--font-tech);
  font-size: 0.8rem;
  line-height: 1.4;
}

.active-email-reader .header-label {
  width: 90px;
  color: var(--color-text-muted);
  font-weight: 700;
}

.active-email-reader .header-val {
  color: var(--color-text-primary);
}

.active-email-reader .email-body-text {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-back-btn {
  display: none;
  margin-top: 32px;
  width: 100%;
  font-family: var(--font-tech);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   INBOX INTEGRATED NEWSLETTER SIGNUP STYLES
   ========================================================================== */
.inbox-register-tile {
  padding: 16px 20px;
  background-color: rgba(var(--color-accent-cyan-rgb), 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-sans);
}

.register-tile-header {
  margin-bottom: 4px;
}

.register-tile-title {
  font-family: var(--font-tech);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: block;
}

.register-tile-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  margin-bottom: 12px;
}

.mini-form-group {
  display: flex;
  gap: 8px;
}

.form-input-mini {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm);
  padding: 6px 10px;
  color: #ffffff;
  font-family: var(--font-tech);
  font-size: 0.75rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input-mini:focus {
  outline: none;
  border-color: var(--color-accent-cyan);
  box-shadow: 0 0 8px rgba(var(--color-accent-cyan-rgb), 0.25);
}

.btn-mini {
  padding: 6px 12px !important;
  font-size: 0.7rem !important;
  font-family: var(--font-tech) !important;
  letter-spacing: 0.05em !important;
}

.form-feedback-mini {
  font-family: var(--font-tech);
  font-size: 0.65rem;
  margin-top: 6px;
  min-height: 14px;
}

/* ==========================================================================
   BOOKSHELF DASHBOARD & DETAILS STYLES
   ========================================================================== */
.bookshelf-dashboard {
  display: grid;
  grid-template-columns: 380px 1fr;
  height: 600px;
  border: 1px solid rgba(var(--color-accent-cyan-rgb), 0.2);
  border-radius: var(--border-radius-lg);
  background-color: rgba(18, 19, 22, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
  margin-top: 36px;
  transition: border-color var(--transition-normal);
}

.bookshelf-dashboard:hover {
  border-color: rgba(var(--color-accent-cyan-rgb), 0.4);
}

.bookshelf-list-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  background-color: rgba(10, 11, 13, 0.2);
}

.bookshelf-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background-color: rgba(var(--color-accent-cyan-rgb), 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-tech);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.bookshelf-pane-title {
  font-weight: 700;
  color: var(--color-accent-cyan);
  text-shadow: 0 0 10px rgba(var(--color-accent-cyan-rgb), 0.3);
}

.bookshelf-pane-stats {
  color: var(--color-text-muted);
}

.bookshelf-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.bookshelf-list .inbox-row {
  grid-template-columns: 20px 45px 120px 1fr;
}

.bookshelf-cover-thumb {
  width: 30px;
  height: 44px;
  border-radius: 3px;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.bookshelf-cover-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bookshelf-cover-thumb.placeholder-thumb {
  font-family: var(--font-tech);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.4);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1.5px dashed rgba(255, 255, 255, 0.1);
}

.bookshelf-list .inbox-row:hover .bookshelf-cover-thumb {
  border-color: rgba(var(--color-accent-cyan-rgb), 0.5);
  transform: scale(1.05);
}

.bookshelf-list .inbox-row.selected .bookshelf-cover-thumb {
  border-color: var(--color-accent-cyan);
  box-shadow: 0 0 5px rgba(var(--color-accent-cyan-rgb), 0.3);
}

.bookshelf-reader-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: rgba(6, 7, 9, 0.35);
}

/* Book reader detail styles */
.book-details-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.book-cover-col {
  flex: 0 0 160px;
  max-width: 160px;
}

.book-cover-wrapper-card {
  position: relative;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.book-cover-wrapper-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--color-accent-cyan-rgb), 0.4);
}

.book-cover-img-card {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 2 / 3;
}

.book-cover-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow: inset 0 0 20px rgba(var(--color-accent-cyan-rgb), 0.15);
  pointer-events: none;
  mix-blend-mode: overlay;
}

.book-cover-placeholder-card {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  background-color: rgba(18, 19, 22, 0.5);
  border: 1.5px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  overflow: hidden;
}

.book-cover-placeholder-card .placeholder-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--color-accent-cyan-rgb), 0.08) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.book-cover-placeholder-card .placeholder-glow.text-rose {
  background: radial-gradient(circle, rgba(var(--color-accent-rose-rgb), 0.08) 0%, transparent 60%);
}

.book-cover-placeholder-card .placeholder-glow.text-violet {
  background: radial-gradient(circle, rgba(var(--color-accent-violet-rgb), 0.08) 0%, transparent 60%);
}

.book-cover-placeholder-card .placeholder-serial {
  font-family: var(--font-tech);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  z-index: 2;
  margin-bottom: 8px;
}

.book-cover-placeholder-card .placeholder-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  z-index: 2;
}

.book-info-col {
  flex: 1;
}

.book-series {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.book-title {
  font-family: var(--font-title);
  color: #ffffff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.book-promises {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.promise-tag {
  font-family: var(--font-tech);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-accent-cyan);
  background-color: rgba(var(--color-accent-cyan-rgb), 0.08);
  border: 1px solid rgba(var(--color-accent-cyan-rgb), 0.25);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.book-synopsis-text {
  font-size: 0.9rem;
}

.book-warnings-box {
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-sm);
  padding: 14px 18px;
  margin-top: 16px;
}

.book-actions-layout .btn {
  font-family: var(--font-tech);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 10px 18px;
}

/* ==========================================================================
   CYAN ACCENT THEME OVERRIDES FOR DASHBOARDS (READER ACTIVE)
   ========================================================================== */
body.reader-active .syslog-dashboard {
  border-color: rgba(var(--color-accent-cyan-rgb), 0.2);
}
body.reader-active .syslog-dashboard:hover {
  border-color: rgba(var(--color-accent-cyan-rgb), 0.4);
}
body.reader-active .inbox-pane-header {
  background-color: rgba(var(--color-accent-cyan-rgb), 0.04);
}
body.reader-active .inbox-pane-title {
  color: var(--color-accent-cyan);
  text-shadow: 0 0 10px rgba(var(--color-accent-cyan-rgb), 0.3);
}
body.reader-active .inbox-filters .filter-btn {
  border-color: rgba(var(--color-accent-cyan-rgb), 0.3);
}
body.reader-active .inbox-filters .filter-btn:hover {
  border-color: var(--color-accent-cyan);
}
body.reader-active .inbox-filters .filter-btn.active {
  background-color: var(--color-accent-cyan);
  border-color: var(--color-accent-cyan);
  box-shadow: 0 0 8px rgba(var(--color-accent-cyan-rgb), 0.4);
}
body.reader-active .inbox-row:hover {
  background-color: rgba(var(--color-accent-cyan-rgb), 0.03);
  box-shadow: inset 3px 0 0 var(--color-accent-cyan);
}
body.reader-active .inbox-row.selected {
  background-color: rgba(var(--color-accent-cyan-rgb), 0.08);
  box-shadow: inset 3px 0 0 var(--color-accent-cyan);
}
body.reader-active .status-dot {
  background-color: var(--color-accent-cyan);
  box-shadow: 0 0 8px var(--color-accent-cyan);
}
body.reader-active .inbox-list::-webkit-scrollbar-thumb,
body.reader-active .bookshelf-list::-webkit-scrollbar-thumb,
body.reader-active .reader-content-area::-webkit-scrollbar-thumb {
  background: rgba(var(--color-accent-cyan-rgb), 0.25);
}
body.reader-active .inbox-list::-webkit-scrollbar-thumb:hover,
body.reader-active .bookshelf-list::-webkit-scrollbar-thumb:hover,
body.reader-active .reader-content-area::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--color-accent-cyan-rgb), 0.5);
}
body.reader-active .reader-status-glowing {
  color: var(--color-accent-cyan);
  text-shadow: 0 0 8px rgba(var(--color-accent-cyan-rgb), 0.3);
}
body.reader-active .reader-status-glowing .pulse-dot {
  background-color: var(--color-accent-cyan);
  box-shadow: 0 0 8px var(--color-accent-cyan);
}
body.reader-active .standby-radar {
  border-color: rgba(var(--color-accent-cyan-rgb), 0.2);
}
body.reader-active .standby-radar::before {
  border-color: rgba(var(--color-accent-cyan-rgb), 0.25);
}
body.reader-active .standby-radar .radar-sweep {
  background: linear-gradient(90deg, rgba(var(--color-accent-cyan-rgb), 0.4) 0%, transparent 100%);
}
body.reader-active .standby-title {
  color: var(--color-accent-cyan);
  text-shadow: 0 0 8px rgba(var(--color-accent-cyan-rgb), 0.2);
}

/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM / BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  .syslog-dashboard,
  .bookshelf-dashboard {
    grid-template-columns: 1fr;
    height: 550px;
    position: relative;
  }
  
  .syslog-inbox-pane,
  .bookshelf-list-pane {
    width: 100%;
    transition: transform 0.3s ease-in-out;
  }
  
  .syslog-reader-pane,
  .bookshelf-reader-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 10;
  }
  
  .syslog-dashboard.show-reader .syslog-inbox-pane,
  .bookshelf-dashboard.show-reader .bookshelf-list-pane {
    transform: translateX(-100%);
  }
  
  .syslog-dashboard.show-reader .syslog-reader-pane,
  .bookshelf-dashboard.show-reader .bookshelf-reader-pane {
    transform: translateX(0);
  }
  
  .mobile-back-btn {
    display: block;
  }
  
  .inbox-row {
    grid-template-columns: 20px 60px 80px 1fr;
    padding: 12px 16px;
  }
  
  .bookshelf-list .inbox-row {
    grid-template-columns: 20px 45px 100px 1fr;
    padding: 12px 16px;
  }
  
  .inbox-subject {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .book-details-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
  }
  
  .book-cover-col {
    flex: 0 0 auto;
    width: 130px;
  }
  
  .book-promises {
    justify-content: center;
  }
  
  .book-actions-layout {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .inbox-row {
    grid-template-columns: 20px 1fr;
    grid-template-rows: auto auto;
    gap: 4px;
    padding: 12px 16px;
  }
  
  .bookshelf-list .inbox-row {
    grid-template-columns: 20px 45px 1fr;
    grid-template-rows: auto auto;
    gap: 4px;
    padding: 12px 16px;
  }
  
  .inbox-status {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }
  
  .inbox-subject {
    grid-column: 2;
    grid-row: 1;
    white-space: normal;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    padding-right: 0;
  }
  
  .bookshelf-list .inbox-row .bookshelf-cover-thumb {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
  
  .bookshelf-list .inbox-row .inbox-subject {
    grid-column: 3;
    grid-row: 1;
    white-space: normal;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    padding-right: 0;
  }
  
  .inbox-tag {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.65rem;
  }
  
  .bookshelf-list .inbox-row .inbox-tag {
    grid-column: 3;
    grid-row: 2;
    font-size: 0.65rem;
  }
  
  .inbox-date {
    display: none;
  }
}

