/* ==========================================================================
   BINGBlog // Cyber-Nexus Modern Design System
   A hyper-modern, glassmorphic, cyberpunk-editorial frontend for BINGBlog.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Root Variables & Color Schemes
   -------------------------------------------------------------------------- */
:root {
  /* Fonts */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Courier New', monospace;

  /* Accent Colors */
  --accent-cyan: #00f5d4;
  --accent-cyan-rgb: 0, 245, 212;
  --accent-purple: #8b5cf6;
  --accent-purple-rgb: 139, 92, 246;
  --accent-blue: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Transitions & Shadows */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s var(--ease-spring);
  --transition-slow: 0.4s var(--ease-spring);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --max-width: 1280px;
}

/* ==========================================================================
   BINGBlog // Cyber-Nexus Modern Design System
   A hyper-modern, glassmorphic, cyberpunk-editorial frontend for BINGBlog.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Root Variables & Multi-Theme Schemes (6 Visual Presets)
   -------------------------------------------------------------------------- */
:root {
  /* Fonts */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Courier New', monospace;

  /* Transitions & Radii */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s var(--ease-spring);
  --transition-slow: 0.4s var(--ease-spring);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --max-width: 1280px;
}

/* Preset 1: Cyber Void (Dark Cyan/Purple) - Default */
[data-theme="dark"],
[data-theme="cyber-cyan"] {
  --theme-id: 'cyber-cyan';
  --bg-base: #06080d;
  --bg-surface: #0a0d14;
  --bg-card: rgba(13, 17, 27, 0.72);
  --bg-card-hover: rgba(20, 26, 42, 0.88);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-card-border-hover: rgba(0, 245, 212, 0.4);

  --accent-cyan: #00f5d4;
  --accent-purple: #8b5cf6;
  --accent-blue: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-invert: #06080d;

  --nav-bg: rgba(9, 12, 20, 0.8);
  --nav-border: rgba(255, 255, 255, 0.08);

  --code-bg: #090c15;
  --code-header-bg: #0f1422;
  --code-border: rgba(255, 255, 255, 0.08);

  --glow-cyan: 0 0 25px rgba(0, 245, 212, 0.28);
  --glow-purple: 0 0 25px rgba(139, 92, 246, 0.3);
  --glow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.36);

  --grid-line: rgba(255, 255, 255, 0.025);
  --spotlight-color: rgba(0, 245, 212, 0.12);
}

/* Preset 2: Matrix Hacker (Terminal Phosphor Green) */
[data-theme="matrix-green"] {
  --theme-id: 'matrix-green';
  --bg-base: #030804;
  --bg-surface: #061108;
  --bg-card: rgba(6, 18, 9, 0.78);
  --bg-card-hover: rgba(10, 28, 14, 0.92);
  --bg-card-border: rgba(0, 255, 102, 0.18);
  --bg-card-border-hover: rgba(0, 255, 102, 0.55);

  --accent-cyan: #00ff66;
  --accent-purple: #10b981;
  --accent-blue: #34d399;
  --accent-emerald: #00ff66;
  --accent-amber: #a3e635;
  --accent-rose: #f43f5e;

  --text-primary: #e6ffed;
  --text-secondary: #86efac;
  --text-muted: #22c55e;
  --text-invert: #030804;

  --nav-bg: rgba(4, 12, 6, 0.88);
  --nav-border: rgba(0, 255, 102, 0.25);

  --code-bg: #040d06;
  --code-header-bg: #08170b;
  --code-border: rgba(0, 255, 102, 0.2);

  --glow-cyan: 0 0 25px rgba(0, 255, 102, 0.35);
  --glow-purple: 0 0 25px rgba(16, 185, 129, 0.3);
  --glow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

  --grid-line: rgba(0, 255, 102, 0.04);
  --spotlight-color: rgba(0, 255, 102, 0.15);
}

/* Preset 3: Synthwave 80s (Sunset Magenta & Electric Purple) */
[data-theme="synthwave-pink"] {
  --theme-id: 'synthwave-pink';
  --bg-base: #0c0414;
  --bg-surface: #140722;
  --bg-card: rgba(26, 10, 42, 0.75);
  --bg-card-hover: rgba(40, 16, 64, 0.9);
  --bg-card-border: rgba(255, 42, 133, 0.18);
  --bg-card-border-hover: rgba(255, 42, 133, 0.55);

  --accent-cyan: #ff2a85;
  --accent-purple: #c084fc;
  --accent-blue: #38bdf8;
  --accent-emerald: #00f5d4;
  --accent-amber: #fbbf24;
  --accent-rose: #ff2a85;

  --text-primary: #fdf2f8;
  --text-secondary: #f472b6;
  --text-muted: #c084fc;
  --text-invert: #0c0414;

  --nav-bg: rgba(18, 6, 30, 0.88);
  --nav-border: rgba(255, 42, 133, 0.25);

  --code-bg: #11051c;
  --code-header-bg: #1c092e;
  --code-border: rgba(255, 42, 133, 0.2);

  --glow-cyan: 0 0 25px rgba(255, 42, 133, 0.35);
  --glow-purple: 0 0 25px rgba(192, 132, 252, 0.3);
  --glow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.45);

  --grid-line: rgba(255, 42, 133, 0.04);
  --spotlight-color: rgba(255, 42, 133, 0.15);
}

/* Preset 4: Tokyo Drift (High-Voltage Amber & Vermilion) */
[data-theme="cyber-amber"] {
  --theme-id: 'cyber-amber';
  --bg-base: #09090b;
  --bg-surface: #121215;
  --bg-card: rgba(26, 22, 16, 0.76);
  --bg-card-hover: rgba(38, 32, 22, 0.92);
  --bg-card-border: rgba(245, 158, 11, 0.18);
  --bg-card-border-hover: rgba(245, 158, 11, 0.55);

  --accent-cyan: #f59e0b;
  --accent-purple: #ef4444;
  --accent-blue: #fbbf24;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;

  --text-primary: #fffbeb;
  --text-secondary: #fde68a;
  --text-muted: #d97706;
  --text-invert: #09090b;

  --nav-bg: rgba(16, 14, 11, 0.88);
  --nav-border: rgba(245, 158, 11, 0.25);

  --code-bg: #0e0d0b;
  --code-header-bg: #1c1813;
  --code-border: rgba(245, 158, 11, 0.2);

  --glow-cyan: 0 0 25px rgba(245, 158, 11, 0.35);
  --glow-purple: 0 0 25px rgba(239, 68, 68, 0.3);
  --glow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.45);

  --grid-line: rgba(245, 158, 11, 0.04);
  --spotlight-color: rgba(245, 158, 11, 0.15);
}

/* Preset 5: Nordic Aurora (Polar Ice Blue & Mint Teal) */
[data-theme="nordic-aurora"] {
  --theme-id: 'nordic-aurora';
  --bg-base: #050d18;
  --bg-surface: #0a1628;
  --bg-card: rgba(12, 28, 48, 0.75);
  --bg-card-hover: rgba(18, 42, 70, 0.9);
  --bg-card-border: rgba(56, 189, 248, 0.18);
  --bg-card-border-hover: rgba(56, 189, 248, 0.55);

  --accent-cyan: #38bdf8;
  --accent-purple: #2dd4bf;
  --accent-blue: #38bdf8;
  --accent-emerald: #2dd4bf;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --text-primary: #f0f9ff;
  --text-secondary: #bae6fd;
  --text-muted: #38bdf8;
  --text-invert: #050d18;

  --nav-bg: rgba(8, 20, 36, 0.88);
  --nav-border: rgba(56, 189, 248, 0.25);

  --code-bg: #071322;
  --code-header-bg: #0e223b;
  --code-border: rgba(56, 189, 248, 0.2);

  --glow-cyan: 0 0 25px rgba(56, 189, 248, 0.35);
  --glow-purple: 0 0 25px rgba(45, 212, 191, 0.3);
  --glow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.45);

  --grid-line: rgba(56, 189, 248, 0.04);
  --spotlight-color: rgba(56, 189, 248, 0.15);
}

/* Preset 6: Clean Cyber-Lab (Crisp White/Slate Light) */
[data-theme="light"],
[data-theme="clean-light"] {
  --theme-id: 'clean-light';
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(241, 245, 249, 0.96);
  --bg-card-border: rgba(0, 0, 0, 0.08);
  --bg-card-border-hover: rgba(14, 165, 233, 0.45);

  --accent-cyan: #0284c7;
  --accent-purple: #7c3aed;
  --accent-blue: #2563eb;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-invert: #ffffff;

  --nav-bg: rgba(255, 255, 255, 0.88);
  --nav-border: rgba(0, 0, 0, 0.08);

  --code-bg: #1e1e2e;
  --code-header-bg: #181825;
  --code-border: rgba(0, 0, 0, 0.08);

  --glow-cyan: 0 0 20px rgba(14, 165, 233, 0.25);
  --glow-purple: 0 0 20px rgba(124, 58, 237, 0.25);
  --glow-card: 0 8px 30px 0 rgba(0, 0, 0, 0.06);

  --grid-line: rgba(0, 0, 0, 0.03);
  --spotlight-color: rgba(14, 165, 233, 0.08);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

code, kbd, pre, samp {
  font-family: var(--font-mono);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 245, 212, 0.5);
}

/* --------------------------------------------------------------------------
   3. Background Atmosphere & Canvas
   -------------------------------------------------------------------------- */
.cyber-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
}

.ambient-aurora {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  animation: aurora-drift 24s ease-in-out infinite alternate;
}

.aurora-purple {
  top: -100px;
  right: -80px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
}

.aurora-cyan {
  bottom: 5%;
  left: -120px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
  animation-delay: -12s;
}

@keyframes aurora-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

.cyber-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Top Reading Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  z-index: 9999;
  transition: width 0.08s linear;
}
.progress-glow {
  position: absolute;
  right: 0;
  top: -2px;
  width: 20px;
  height: 7px;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   4. Floating Glassmorphic Top Navbar (The Dock)
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  height: 60px;
  padding: 0 20px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--nav-border);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-normal);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.live-beacon {
  width: 8px;
  height: 8px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  position: relative;
}
.live-beacon::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-cyan);
  animation: pulse-beacon 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-beacon {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

.brand-name {
  color: var(--text-primary);
}
.brand-accent {
  color: var(--accent-cyan);
}

.badge-dev-pill {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(0, 245, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 245, 212, 0.3);
  font-weight: 600;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-action-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.search-btn {
  width: auto;
  padding: 0 12px;
  gap: 8px;
}

.kbd-shortcut {
  display: flex;
  align-items: center;
  gap: 2px;
}
.kbd-shortcut kbd {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 4px;
  color: var(--text-muted);
}

.sound-btn .sound-off-icon { display: none; }
.sound-btn.is-muted .sound-on-icon { display: none; }
.sound-btn.is-muted .sound-off-icon { display: block; }

/* Theme Picker Popover */
.theme-picker-wrapper {
  position: relative;
}

.theme-btn {
  position: relative;
  gap: 6px;
}

.theme-current-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  transition: all var(--transition-fast);
}

.theme-dropdown-menu {
  position: absolute;
  top: 48px;
  right: -40px;
  width: 270px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), var(--glow-cyan);
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transition: all 0.2s var(--ease-spring);
  z-index: 10002;
}

.theme-dropdown-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.theme-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.theme-count-tag {
  font-size: 0.65rem;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
}

.theme-options-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.theme-option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  text-align: left;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  width: 100%;
}

.theme-option-row:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  transform: translateX(3px);
}

.theme-option-row.is-active {
  background: rgba(0, 245, 212, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 245, 212, 0.25);
}

.swatch-bubble {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

.swatch-cyan { background: #00f5d4; color: #00f5d4; }
.swatch-matrix { background: #00ff66; color: #00ff66; }
.swatch-synthwave { background: #ff2a85; color: #ff2a85; }
.swatch-amber { background: #f59e0b; color: #f59e0b; }
.swatch-nordic { background: #38bdf8; color: #38bdf8; }
.swatch-light { background: #0284c7; color: #0284c7; }

.theme-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.theme-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.theme-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.check-icon {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: bold;
  opacity: 0;
  color: var(--accent-cyan);
}

.theme-option-row.is-active .check-icon {
  opacity: 1;
}

/* Bento Theme Visuals Matrix */
.bento-theme-visuals {
  padding: 24px;
}

.bento-sub-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.theme-visual-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.visual-chip-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  transition: all var(--transition-fast);
  text-align: left;
}

.visual-chip-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.visual-chip-btn.is-active {
  background: rgba(0, 245, 212, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.25);
}

.chip-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-bottom: 6px;
}
.dot-cyan { background: #00f5d4; box-shadow: 0 0 8px #00f5d4; }
.dot-matrix { background: #00ff66; box-shadow: 0 0 8px #00ff66; }
.dot-synthwave { background: #ff2a85; box-shadow: 0 0 8px #ff2a85; }
.dot-amber { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.dot-nordic { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.dot-light { background: #0284c7; box-shadow: 0 0 8px #0284c7; }

.chip-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.chip-effect {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Matrix Scanline Overlay for Matrix Theme */
[data-theme="matrix-green"] .cyber-grid-overlay::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 255, 102, 0.04) 50%);
  background-size: 100% 3px;
  z-index: 1;
}

.btn-prod-jump {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(0, 245, 212, 0.15));
  border: 1px solid rgba(0, 245, 212, 0.3);
  color: var(--accent-cyan);
  transition: all var(--transition-fast);
}

.btn-prod-jump:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(0, 245, 212, 0.3));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.3);
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
}
.burger-bar {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* --------------------------------------------------------------------------
   5. Main Layout Containers & Bento Architecture
   -------------------------------------------------------------------------- */
.site-main {
  position: relative;
  z-index: 1;
  padding-top: 104px;
  padding-bottom: 60px;
}

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

/* Bento Card Base & Spotlight */
.bento-card, .article-card, .sidebar-widget, .term-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glow-card);
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.card-spotlight {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), var(--spotlight-color), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.bento-card:hover .card-spotlight,
.article-card:hover .card-spotlight,
.term-card:hover .card-spotlight {
  opacity: 1;
}

.bento-card:hover,
.article-card:hover,
.term-card:hover {
  border-color: var(--bg-card-border-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), var(--glow-cyan);
}

/* Holographic Rainbow Foil Sheen on 3D Tilt Cards */
.tilt-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: linear-gradient(
    var(--tilt-angle, 135deg),
    transparent 15%,
    rgba(0, 245, 212, 0.12) 35%,
    rgba(255, 42, 133, 0.14) 50%,
    rgba(139, 92, 246, 0.12) 65%,
    transparent 85%
  );
  opacity: var(--holo-opacity, 0);
  transition: opacity 0.3s ease;
  z-index: 2;
  mix-blend-mode: color-dodge;
}

/* --------------------------------------------------------------------------
   6. Hero Bento Section
   -------------------------------------------------------------------------- */
.hero-bento-section {
  margin-bottom: 40px;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}

/* Hero Main Bento (Left Top+Bottom) */
.bento-hero-main {
  grid-row: span 2;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-header-row {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

/* Holographic Avatar with Interactive 3D Gyroscope Canvas */
.avatar-cyber-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hero-holo-canvas {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 130px;
  height: 130px;
  pointer-events: none;
  z-index: 2;
}

.overclock-indicator {
  position: absolute;
  bottom: -4px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(0, 245, 212, 0.15);
  border: 1px solid rgba(0, 245, 212, 0.3);
  color: var(--accent-cyan);
  font-weight: 700;
  z-index: 3;
  transition: all var(--transition-fast);
}

.avatar-cyber-wrapper:hover .overclock-indicator {
  background: rgba(0, 245, 212, 0.3);
  box-shadow: 0 0 10px var(--accent-cyan);
  transform: scale(1.05);
}

/* Telemetry Live Bar */
.telemetry-live-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.telemetry-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.telemetry-chip.chip-ping {
  color: var(--accent-cyan);
  border-color: rgba(0, 245, 212, 0.25);
  background: rgba(0, 245, 212, 0.06);
}

/* Ambient Sound Pill in Terminal Bar */
.terminal-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ambient-sound-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.ambient-sound-pill:hover {
  background: rgba(0, 245, 212, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.ambient-sound-pill.is-playing {
  background: rgba(0, 245, 212, 0.18);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.3);
}

.ambient-eq-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.ambient-eq-wave span {
  width: 2px;
  height: 4px;
  background: currentColor;
  border-radius: 1px;
}

.ambient-sound-pill.is-playing .ambient-eq-wave span:nth-child(1) {
  animation: eq-bounce 0.8s ease-in-out infinite alternate;
}
.ambient-sound-pill.is-playing .ambient-eq-wave span:nth-child(2) {
  animation: eq-bounce 0.6s ease-in-out infinite alternate 0.2s;
}
.ambient-sound-pill.is-playing .ambient-eq-wave span:nth-child(3) {
  animation: eq-bounce 0.9s ease-in-out infinite alternate 0.4s;
}

@keyframes eq-bounce {
  from { height: 3px; }
  to { height: 10px; }
}

/* Overclock Mode Body Aura */
body.overclock-mode {
  --accent-cyan: #ff0055;
  --accent-purple: #ffb703;
  --glow-cyan: 0 0 35px rgba(255, 0, 85, 0.5);
  --glow-purple: 0 0 35px rgba(255, 183, 3, 0.45);
}
body.overclock-mode .live-beacon {
  background-color: #ff0055;
  box-shadow: 0 0 12px #ff0055;
}

.cyber-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.3);
  transition: transform var(--transition-normal);
}

.avatar-cyber-wrapper:hover .cyber-avatar {
  transform: scale(1.05);
}

.hero-title-group {
  flex: 1;
}

.status-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.25);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.pulse-beacon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.hero-glitch-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.title-lead {
  color: var(--accent-cyan);
  margin-right: 4px;
}

.cursor-blink {
  display: inline-block;
  color: var(--accent-cyan);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-bio-text {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.hero-bio-text strong {
  color: var(--accent-cyan);
}

/* Interactive Mini Terminal */
.mini-terminal {
  margin-top: 24px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--code-header-bg);
  border-bottom: 1px solid var(--code-border);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.terminal-body {
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  max-height: 130px;
  overflow-y: auto;
}

.prompt-user { color: var(--accent-cyan); }
.prompt-path { color: var(--accent-purple); }
.cmd-run { color: #f1f5f9; font-weight: 600; }
.text-dim { color: var(--text-secondary); margin-top: 4px; }

.terminal-quick-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--code-border);
  flex-wrap: wrap;
}

.quick-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.term-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
  transition: all var(--transition-fast);
}

.term-btn:hover {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--accent-cyan);
}

/* Bento Metrics Card */
.bento-metrics {
  padding: 24px;
}

.bento-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--accent-purple);
  margin-bottom: 6px;
  font-weight: 700;
}

.bento-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.metric-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.metric-number {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
}

.text-cyan { color: var(--accent-cyan); text-shadow: 0 0 15px rgba(0, 245, 212, 0.3); }
.text-purple { color: var(--accent-purple); text-shadow: 0 0 15px rgba(139, 92, 246, 0.3); }
.text-blue { color: var(--accent-blue); text-shadow: 0 0 15px rgba(56, 189, 248, 0.3); }
.text-emerald { color: var(--accent-emerald); text-shadow: 0 0 15px rgba(16, 185, 129, 0.3); }

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Bento Spotlight Card */
.bento-spotlight {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.spotlight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.spotlight-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(244, 63, 94, 0.12);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
  font-weight: 600;
}

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

.spotlight-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spotlight-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spotlight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-pill {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-weight: 500;
}

.read-prompt {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  transition: transform var(--transition-fast);
}

.bento-spotlight:hover .read-prompt svg {
  transform: translateX(3px);
}

/* Bento Tech Stack Card */
.bento-tech-stack {
  padding: 20px 24px;
}

.tech-chips-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tech-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tech-chip:hover {
  transform: translateY(-2px);
  color: var(--text-primary);
}

.chip-cyan:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); box-shadow: 0 0 10px rgba(0, 245, 212, 0.3); }
.chip-purple:hover { border-color: var(--accent-purple); color: var(--accent-purple); box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); }
.chip-blue:hover { border-color: var(--accent-blue); color: var(--accent-blue); box-shadow: 0 0 10px rgba(56, 189, 248, 0.3); }
.chip-emerald:hover { border-color: var(--accent-emerald); color: var(--accent-emerald); box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
.chip-amber:hover { border-color: var(--accent-amber); color: var(--accent-amber); box-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }

/* --------------------------------------------------------------------------
   7. Feed Layout (Left Stream + Right Sidebar)
   -------------------------------------------------------------------------- */
.feed-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: flex-start;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-tab.active {
  color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.2);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.article-card {
  display: flex;
  flex-direction: column;
}

.article-card.is-hidden {
  display: none;
}

.card-link-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-header-visual {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: #0d111a;
}

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

.article-card:hover .card-cover-img {
  transform: scale(1.05);
}

.card-cyber-banner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.banner-gradient-0 { background: linear-gradient(135deg, #091e3a 0%, #2b1055 100%); }
.banner-gradient-1 { background: linear-gradient(135deg, #022c22 0%, #064e3b 100%); }
.banner-gradient-2 { background: linear-gradient(135deg, #172554 0%, #1e1b4b 100%); }
.banner-gradient-3 { background: linear-gradient(135deg, #3b0764 0%, #4c0519 100%); }
.banner-gradient-4 { background: linear-gradient(135deg, #1f2937 0%, #111827 100%); }

.cyber-graphic-tag {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.07);
  letter-spacing: -0.05em;
}

.card-category-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(9, 12, 20, 0.85);
  backdrop-filter: blur(8px);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 245, 212, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-date, .card-reading-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text-primary);
  transition: color var(--transition-fast);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card:hover .card-title {
  color: var(--accent-cyan);
}

.card-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.card-arrow-action {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  transition: all var(--transition-fast);
}

.article-card:hover .card-arrow-action .arrow-svg {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   8. Cyber Sidebar
   -------------------------------------------------------------------------- */
.feed-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 96px;
}

.sidebar-widget {
  padding: 20px;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.widget-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

/* Author Dossier Widget */
.dossier-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.dossier-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.3);
}

.dossier-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.dossier-role {
  font-size: 0.78rem;
  color: var(--accent-purple);
  font-family: var(--font-mono);
}

.dossier-loc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.dossier-motto {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.5;
}

.dossier-actions {
  display: flex;
  gap: 8px;
}

.dossier-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.dossier-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.08);
}

/* Categories List */
.categories-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.category-list-row:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-cyan);
  transform: translateX(4px);
}

.cat-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-purple);
  margin-right: 8px;
}

.cat-name { flex: 1; }

.cat-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tag-chip:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.1);
  transform: translateY(-2px);
}

.tag-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: 2px;
}

/* Machine Specs List */
.machine-specs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.machine-specs-list li {
  display: flex;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.spec-k { color: var(--text-muted); }
.spec-v { color: var(--accent-cyan); font-weight: 500; }

/* --------------------------------------------------------------------------
   9. Article Detail Page Layout & Typography
   -------------------------------------------------------------------------- */
.article-page-container {
  max-width: 1100px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumb-nav a:hover {
  color: var(--accent-cyan);
}
.breadcrumb-sep { color: rgba(255, 255, 255, 0.2); }

.article-detail-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.article-header-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.category-pill-glowing {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(0, 245, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 245, 212, 0.4);
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.2);
}

.article-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.article-detail-title {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.article-detail-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.article-detail-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.meta-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 600;
}
.meta-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-featured-image-wrapper {
  margin-top: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--bg-card-border);
}
.article-featured-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

/* Article Content Grid: Body + TOC Sidebar */
.article-content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: flex-start;
}

.single-page-grid {
  grid-template-columns: 1fr;
}

.article-prose-wrapper {
  min-width: 0;
}

/* Cyber Prose Typography */
.prose {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.prose p {
  margin-bottom: 1.6em;
}

.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-top: 2.2em;
  margin-bottom: 0.8em;
  scroll-margin-top: 100px;
  position: relative;
}

.prose h2 {
  font-size: 1.65rem;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.prose h2::before {
  content: '##';
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-cyan);
  margin-right: 8px;
  opacity: 0.8;
}

.prose h3 {
  font-size: 1.3rem;
}
.prose h3::before {
  content: '###';
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-purple);
  margin-right: 8px;
  opacity: 0.8;
}

.prose ul, .prose ol {
  margin-bottom: 1.6em;
  padding-left: 1.6em;
}
.prose li {
  margin-bottom: 0.5em;
}

.prose blockquote {
  margin: 2em 0;
  padding: 16px 22px;
  background: rgba(139, 92, 246, 0.06);
  border-left: 4px solid var(--accent-purple);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  margin: 3em 0;
}

.prose a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(0, 245, 212, 0.4);
  transition: all var(--transition-fast);
}
.prose a:hover {
  text-decoration-color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 245, 212, 0.4);
}

.prose strong {
  font-weight: 700;
  color: #ffffff;
}

/* Inline Code */
.prose :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.12);
  color: #d8b4fe;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

/* Code Blocks with Mac OS Window Header */
.code-block-wrapper {
  margin: 2em 0;
  border-radius: var(--radius-md);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.code-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--code-header-bg);
  border-bottom: 1px solid var(--code-border);
}

.code-mac-dots {
  display: flex;
  gap: 6px;
}

.code-lang-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.code-copy-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.code-copy-btn:hover {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.prose pre {
  margin: 0;
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Tables */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 2em 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-card-border);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.prose th, .prose td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.prose th {
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-cyan);
}

.prose tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Images & Figures */
.article-image-figure {
  margin: 2.2em 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--bg-card-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  display: inline-block;
  cursor: zoom-in;
}

.article-img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-normal);
}

.image-container:hover .article-img {
  transform: scale(1.015);
}

.img-zoom-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(9, 12, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.image-container:hover .img-zoom-btn {
  opacity: 1;
}

.image-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

/* Article Tags Row */
.article-detail-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.tags-lead-icon {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tags-wrapper {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.article-tag-chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.article-tag-chip:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.1);
}

/* Copyright Attribution Box */
.article-copyright-box {
  margin: 32px 0;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
}

.copyright-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.copyright-body p {
  margin-bottom: 6px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.copyright-body p:last-child { margin-bottom: 0; }
.copyright-link {
  color: var(--accent-cyan);
  word-break: break-all;
}

/* Article Pagination Nav (Prev / Next) */
.article-pagination-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 36px 0;
}

.nav-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--radius-md);
}

.nav-dir-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.nav-card-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-card {
  opacity: 0.4;
  border-style: dashed;
}

/* Sticky Table of Contents Sidebar */
.article-toc-column {
  position: sticky;
  top: 96px;
}

.sticky-toc-box {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.toc-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.reading-percent {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.toc-content {
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  flex: 1;
}

.toc-content ul {
  list-style: none;
  padding-left: 12px;
}
.toc-content > nav > ul {
  padding-left: 0;
}

.toc-content li {
  margin: 6px 0;
}

.toc-content a {
  color: var(--text-secondary);
  display: block;
  padding: 3px 6px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
}

.toc-content a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.toc-content a.active {
  color: var(--accent-cyan);
  border-left-color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.08);
  font-weight: 600;
}

.toc-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
}

.toc-jump-top {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.toc-jump-top:hover {
  color: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   10. Archives Page Timeline
   -------------------------------------------------------------------------- */
.section-page-container, .archives-page-container, .search-page-container {
  max-width: 960px;
}

.section-hero-header {
  margin-bottom: 36px;
  text-align: center;
}

.section-beacon-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.25);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-hero-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section-hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
}

.cyber-timeline {
  position: relative;
  padding-left: 28px;
}

.cyber-timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple), transparent);
}

.timeline-year-group {
  margin-bottom: 40px;
}

.year-marker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.year-node {
  position: absolute;
  left: -28px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
}

.year-label {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.year-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-purple);
  padding: 2px 8px;
  background: rgba(139, 92, 246, 0.12);
  border-radius: var(--radius-full);
}

.timeline-posts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-post-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  transition: all var(--transition-fast);
}

.timeline-post-row:hover {
  border-color: var(--accent-cyan);
  transform: translateX(6px);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  width: 50px;
  flex-shrink: 0;
}

.timeline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.timeline-title-group {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-category {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.timeline-reading-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   11. Taxonomy Terms Grid
   -------------------------------------------------------------------------- */
.terms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.term-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
}

.term-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.term-symbol {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--accent-cyan);
  font-weight: 800;
}

.term-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.term-count-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(0, 245, 212, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 245, 212, 0.25);
}

/* --------------------------------------------------------------------------
   12. Dedicated Search Page & Instant Results
   -------------------------------------------------------------------------- */
.search-page-box {
  margin-top: 24px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 20px;
  color: var(--accent-cyan);
  pointer-events: none;
}

.standalone-search-input {
  width: 100%;
  height: 60px;
  padding: 0 54px 0 58px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: var(--font-sans);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transition: all var(--transition-fast);
}

.standalone-search-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 245, 212, 0.25);
}

.clear-search-btn {
  position: absolute;
  right: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.search-status-bar {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 16px 0 24px 20px;
}

.standalone-results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   13. Collections Page Banner
   -------------------------------------------------------------------------- */
.collection-source-banner {
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.source-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}
.source-info a {
  color: var(--accent-blue);
  text-decoration: underline;
}

.source-link-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--accent-blue);
  color: #06080d;
}

/* --------------------------------------------------------------------------
   14. About Page Profile Dossier
   -------------------------------------------------------------------------- */
.about-hero-row {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 16px;
}

.about-badges-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.about-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   15. 404 Glitch Page
   -------------------------------------------------------------------------- */
.error-page-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
}

.glitch-box {
  text-align: center;
  padding: 48px;
  max-width: 580px;
}

.error-code {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent-rose);
  text-shadow: 0 0 30px rgba(244, 63, 94, 0.4);
  margin-bottom: 12px;
}

.error-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.beacon-red { background: var(--accent-rose); box-shadow: 0 0 8px var(--accent-rose); }

.error-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}

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

.primary-btn, .secondary-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.primary-btn {
  background: var(--accent-cyan);
  color: #06080d;
}
.primary-btn:hover {
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.4);
  transform: translateY(-2px);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}
.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   16. Command Palette Modal (Cmd+K)
   -------------------------------------------------------------------------- */
.palette-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-spring);
}

.palette-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.palette-container {
  width: 90%;
  max-width: 640px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), var(--glow-cyan);
  overflow: hidden;
  transform: scale(0.96) translateY(-10px);
  transition: transform 0.25s var(--ease-spring);
}

.palette-backdrop.is-open .palette-container {
  transform: scale(1) translateY(0);
}

.palette-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 12px;
}

.palette-search-icon {
  color: var(--accent-cyan);
}

#palette-search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.1rem;
}
#palette-search-input:focus { outline: none; }

.palette-esc-badge kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.palette-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-wrap: wrap;
}

.action-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.palette-action-chip {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.palette-action-chip:hover {
  background: rgba(0, 245, 212, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 10px;
}

.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.palette-item:hover, .palette-item.is-selected {
  background: rgba(0, 245, 212, 0.08);
  border-left: 3px solid var(--accent-cyan);
}

.palette-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.palette-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.palette-item-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.palette-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.palette-item-cat {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

.palette-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 2rem; margin-bottom: 8px; }
.empty-sub { font-size: 0.8rem; margin-top: 4px; }

.palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.palette-hints {
  display: flex;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   17. Lightbox Modal
   -------------------------------------------------------------------------- */
.lightbox-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.lightbox-close-btn:hover { background: rgba(255, 255, 255, 0.2); }

.lightbox-img-wrapper {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 15px 50px rgba(0,0,0,0.6);
  transform: scale(0.96);
  transition: transform 0.25s var(--ease-spring);
}

.lightbox-backdrop.is-open #lightbox-img {
  transform: scale(1);
}

.lightbox-caption {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-top: 14px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   18. Back to Top Button
   -------------------------------------------------------------------------- */
.back-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all var(--transition-normal);
}

.back-to-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 18px rgba(0, 245, 212, 0.35);
  transform: translateY(-2px);
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.arrow-up-icon {
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   19. Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-surface);
  padding: 60px 0 36px;
  margin-top: 60px;
}

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

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(0, 245, 212, 0.06);
  border: 1px solid rgba(0, 245, 212, 0.2);
  color: var(--text-secondary);
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
}

.footer-nav-list a {
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.footer-nav-list a:hover {
  color: var(--accent-cyan);
  transform: translateX(3px);
  display: inline-block;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-highlight {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   20. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-hero-main {
    grid-row: auto;
  }
  .feed-layout {
    grid-template-columns: 1fr;
  }
  .feed-sidebar {
    position: static;
  }
  .article-content-grid {
    grid-template-columns: 1fr;
  }
  .article-toc-column {
    display: none;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    top: 10px;
    padding: 0 12px;
  }
  .nav-container {
    height: 52px;
    padding: 0 14px;
  }
  .nav-menu {
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    padding: 14px;
    flex-direction: column;
    gap: 8px;
    display: none;
  }
  .nav-menu.is-active {
    display: flex;
  }
  .nav-link {
    width: 100%;
    padding: 10px 16px;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .kbd-shortcut {
    display: none;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }
  .terms-grid {
    grid-template-columns: 1fr 1fr;
  }
  .article-detail-title {
    font-size: 1.75rem;
  }
  .article-pagination-nav {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-header-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .terms-grid {
    grid-template-columns: 1fr;
  }
  .hero-glitch-title {
    font-size: 1.45rem;
  }
}

/* ==========================================================================
   21. Cyber Reticle Cursor (赛博准星光标)
   ========================================================================== */
.cyber-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  box-shadow: 0 0 10px var(--accent-cyan);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.cyber-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 245, 212, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease-spring), height 0.2s var(--ease-spring), border-color 0.2s ease;
}

.ring-bracket {
  position: absolute;
  width: 5px;
  height: 5px;
  border-color: var(--accent-cyan);
  pointer-events: none;
}
.bracket-tl { top: -2px; left: -2px; border-top: 1.5px solid; border-left: 1.5px solid; }
.bracket-tr { top: -2px; right: -2px; border-top: 1.5px solid; border-right: 1.5px solid; }
.bracket-bl { bottom: -2px; left: -2px; border-bottom: 1.5px solid; border-left: 1.5px solid; }
.bracket-br { bottom: -2px; right: -2px; border-bottom: 1.5px solid; border-right: 1.5px solid; }

.cyber-cursor-ring.is-hover {
  width: 52px;
  height: 52px;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.35);
  animation: reticle-spin 12s linear infinite;
}

.cyber-cursor-ring.is-active {
  width: 24px;
  height: 24px;
  border-color: #ffffff;
  background: rgba(0, 245, 212, 0.2);
}

@keyframes reticle-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (pointer: coarse) {
  .cyber-cursor-dot, .cyber-cursor-ring {
    display: none !important;
  }
}

/* ==========================================================================
   22. Tactical Reading HUD (正文战术 HUD 悬浮面板)
   ========================================================================== */
.reading-tactical-hud {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 18px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-full);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), var(--glow-cyan);
  z-index: 850;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  transition: all var(--transition-normal);
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-label {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.hud-target-title {
  color: var(--accent-cyan);
  font-weight: 600;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-time-val {
  color: var(--accent-purple);
  font-weight: 600;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 12px;
}

.hud-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.75rem;
  transition: all var(--transition-fast);
}

.hud-btn:hover {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.hud-btn.is-active {
  background: rgba(0, 245, 212, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.3);
}

.hud-font-zoom {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hud-zoom-btn {
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.hud-zoom-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

/* Focus Reading Mode */
body.focus-reading-mode .prose > * {
  opacity: 0.28;
  filter: blur(0.4px);
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}
body.focus-reading-mode .prose > *:hover {
  opacity: 1;
  filter: none;
  transform: scale(1.008);
}

@media (max-width: 768px) {
  .reading-tactical-hud {
    bottom: 12px;
    padding: 6px 12px;
    gap: 8px;
    max-width: 95vw;
  }
  .hud-target { display: none; }
}

/* ==========================================================================
   23. Cyber Synthesizer Widget (音频合成台)
   ========================================================================== */
.synth-widget .widget-header {
  justify-content: space-between;
}

.synth-live-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.synth-live-eq span {
  width: 2px;
  height: 4px;
  background: var(--accent-cyan);
  border-radius: 1px;
}
.synth-live-eq.is-active span:nth-child(1) { animation: eq-bounce 0.4s ease-in-out infinite alternate; }
.synth-live-eq.is-active span:nth-child(2) { animation: eq-bounce 0.3s ease-in-out infinite alternate 0.1s; }
.synth-live-eq.is-active span:nth-child(3) { animation: eq-bounce 0.5s ease-in-out infinite alternate 0.2s; }
.synth-live-eq.is-active span:nth-child(4) { animation: eq-bounce 0.35s ease-in-out infinite alternate 0.15s; }
.synth-live-eq.is-active span:nth-child(5) { animation: eq-bounce 0.45s ease-in-out infinite alternate 0.25s; }

.synth-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.synth-keyboard {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.synth-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  transition: all var(--transition-fast);
}

.synth-key:hover {
  background: rgba(0, 245, 212, 0.12);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.synth-key.is-pressed {
  background: rgba(0, 245, 212, 0.3);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px var(--accent-cyan);
  transform: scale(0.95);
}

.note-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.key-bind {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   24. Fullscreen Matrix Terminal Takeover
   ========================================================================== */
.matrix-takeover-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #020703;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.matrix-takeover-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.matrix-takeover-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.45;
  pointer-events: none;
}

.matrix-takeover-box {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 780px;
  background: rgba(4, 15, 6, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid #00ff66;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 50px rgba(0, 255, 102, 0.3);
  overflow: hidden;
  font-family: var(--font-mono);
}

.matrix-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(0, 255, 102, 0.08);
  border-bottom: 1px solid rgba(0, 255, 102, 0.2);
}

.matrix-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.matrix-box-title {
  color: #00ff66;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.matrix-close-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #86efac;
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid rgba(0, 255, 102, 0.3);
  padding: 3px 10px;
  border-radius: 4px;
}
.matrix-close-btn:hover {
  background: #00ff66;
  color: #020703;
}

.matrix-box-body {
  padding: 18px;
  height: 320px;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #86efac;
}

.matrix-term-line {
  margin-bottom: 4px;
}

.matrix-box-input-row {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(0, 255, 102, 0.2);
}

.matrix-prompt {
  color: #00ff66;
  font-size: 0.88rem;
  font-weight: 700;
  margin-right: 8px;
}

.matrix-input-field {
  flex: 1;
  background: none;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.92rem;
}
.matrix-input-field:focus { outline: none; }

/* ==========================================================================
   25. Article AI Summary (TL;DR) Card
   ========================================================================== */
.article-ai-summary {
  margin: 0 0 32px 0;
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.04), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(0, 245, 212, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.ai-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-spark-icon {
  font-size: 1.15rem;
}

.ai-header-title {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

.ai-regenerate-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.ai-regenerate-btn:hover {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.ai-summary-body {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.ai-summary-p {
  margin-bottom: 12px;
  color: var(--text-primary);
}

.ai-key-points {
  margin-top: 10px;
  padding-left: 2px;
}

.ai-point-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-purple);
  font-weight: 700;
  display: inline-block;
  margin-bottom: 6px;
}

.ai-bullets-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-bullets-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.88rem;
}

.ai-bullets-list li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: bold;
}

.ai-summary-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.ai-tag-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==========================================================================
   26. Cyber Power Cell Battery Charge (能量补给站)
   ========================================================================== */
.article-power-cell-wrapper {
  margin: 36px 0;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.power-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cell-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cell-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

.cell-count-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.25);
  color: var(--accent-cyan);
}

.cell-sub-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cell-interactive-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.battery-chamber {
  flex: 1;
  height: 38px;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.battery-fluid {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  box-shadow: 0 0 20px var(--accent-cyan);
  border-radius: var(--radius-sm);
  transition: width 0.15s ease;
}

.battery-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(90deg, transparent 0, transparent 4px, rgba(0,0,0,0.3) 4px, rgba(0,0,0,0.3) 6px);
  pointer-events: none;
}

.battery-percent-text {
  position: relative;
  z-index: 2;
  margin-left: auto;
  margin-right: 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.charge-power-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  background: var(--accent-cyan);
  color: #06080d;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
  user-select: none;
}

.charge-power-btn:hover {
  box-shadow: 0 0 25px rgba(0, 245, 212, 0.5);
  transform: translateY(-2px);
}

.charge-power-btn:active {
  transform: scale(0.96);
  background: #ffffff;
}

/* ==========================================================================
   27. Live Interactive Architecture Canvas & Inspector
   ========================================================================== */
.arch-flow-section {
  margin: 28px 0 40px 0;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
}

.arch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.arch-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.arch-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.arch-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.arch-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.arch-canvas-container {
  width: 100%;
  border-radius: var(--radius-md);
  background: #04070e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 16px;
}

.arch-canvas {
  width: 100%;
  height: 260px;
  display: block;
}

.arch-node-inspector {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.inspector-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-cyan);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.inspector-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.inspector-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.inspector-meta {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* ==========================================================================
   28. Floating In-Blog AI Assistant Drawer (BING-AI)
   ========================================================================== */
.ai-floating-trigger {
  position: fixed;
  bottom: 80px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 245, 212, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), var(--glow-cyan);
  color: var(--accent-cyan);
  z-index: 9500;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.ai-floating-trigger:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 245, 212, 0.45);
}

.ai-trigger-beacon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.ai-trigger-icon {
  font-size: 1.1rem;
}

.ai-assistant-drawer {
  position: fixed;
  bottom: 88px;
  right: 24px;
  width: 440px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 110px);
  background: var(--bg-surface);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(0, 245, 212, 0.35);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7), var(--glow-cyan);
  display: flex;
  flex-direction: column;
  z-index: 100010;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.96);
  transition: all 0.25s var(--ease-spring);
  overflow: hidden;
}

.ai-assistant-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ai-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-drawer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-model-select {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.4);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  outline: none;
  cursor: pointer;
}

.ai-2fa-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.ai-2fa-btn:hover {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.ai-2fa-btn.is-unlocked {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
  font-weight: 700;
}

/* 2FA Overlay Modal inside Drawer */
.ai-2fa-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 14, 0.94);
  backdrop-filter: blur(12px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ai-2fa-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  font-family: var(--font-sans);
}

.ai-2fa-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ai-2fa-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
  flex: 1;
}

.ai-2fa-close-x {
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.ai-2fa-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.ai-2fa-input-row {
  display: flex;
  gap: 8px;
}

.ai-2fa-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  text-align: center;
}
.ai-2fa-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
}

.ai-2fa-submit-btn {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-cyan);
  color: #06080d;
  font-weight: 700;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.ai-2fa-submit-btn:hover {
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.4);
}

.ai-2fa-feedback {
  font-size: 0.78rem;
  margin-top: 8px;
  min-height: 18px;
}
.ai-2fa-feedback.is-error { color: #f43f5e; }
.ai-2fa-feedback.is-success { color: #10b981; }

.ai-drawer-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-drawer-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.ai-drawer-close-btn {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
}
.ai-drawer-close-btn:hover { color: #ffffff; }

.ai-quick-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  overflow-x: auto;
  white-space: nowrap;
}

.chips-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.ai-chip-btn {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.ai-chip-btn:hover {
  background: rgba(0, 245, 212, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.ai-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-chat-msg {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
  line-height: 1.6;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 245, 212, 0.15);
  flex-shrink: 0;
  font-size: 0.9rem;
}

.msg-user .msg-avatar {
  background: rgba(139, 92, 246, 0.2);
}

.ai-header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.ai-header-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.ai-thought-box {
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}
.thought-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-purple);
  user-select: none;
}
.thought-body {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-height: 140px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.msg-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
  line-height: 1.65;
}

.msg-user .msg-content {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.25);
  color: #f1f5f9;
}

.msg-content a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.ai-chat-footer {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 8px;
}

.ai-chat-input {
  flex: 1;
  background: none;
  border: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
}
.ai-chat-input:focus { outline: none; }

.ai-chat-send-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-cyan);
  color: #06080d;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ai-chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 10px var(--accent-cyan);
}

/* ==========================================================================
   29. Sound Pack Popover Menu
   ========================================================================== */
.sound-picker-wrapper {
  position: relative;
}

.sound-pack-menu {
  position: absolute;
  top: 48px;
  right: -20px;
  width: 200px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transition: all 0.2s var(--ease-spring);
  z-index: 10002;
}

.sound-pack-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.sound-menu-header {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 700;
  padding: 4px 6px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 4px;
}

.sound-packs-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sound-pack-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  width: 100%;
}

.sound-pack-row:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.sound-pack-row.is-active {
  background: rgba(0, 245, 212, 0.1);
  color: var(--accent-cyan);
  font-weight: 600;
}

.check-mark {
  margin-left: auto;
  opacity: 0;
  font-family: var(--font-mono);
}

.sound-pack-row.is-active .check-mark {
  opacity: 1;
}
