/**
 * ==============================================================================
 * ADIT.EXE — COMPONENT ARCHITECTURE & INTERACTIVE MODULES
 * ==============================================================================
 */

/* ----------------------------------------------------------------------------
 * 1. FIXED HUD HEADER & NAVIGATION
 * ---------------------------------------------------------------------------- */
.hud-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(1, 6, 25, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: var(--z-hud-bar);
  transition: background var(--transition-smooth);
}

.hud-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.hud-logo-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-bright);
  background: radial-gradient(circle, var(--color-cobalt-blue) 0%, var(--color-midnight-navy) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  box-shadow: 0 0 14px var(--glow-cobalt);
  position: relative;
}

.hud-logo-text {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #fff;
}

.hud-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.hud-nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

.hud-nav-links a:hover, .hud-nav-links a.active {
  color: #ffffff;
}

.hud-nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-bright-red);
  transition: width var(--transition-smooth);
}

.hud-nav-links a:hover::after, .hud-nav-links a.active::after {
  width: 100%;
}

.hud-controls-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Audio Synthesizer Toggle */
.hud-btn-icon {
  background: rgba(37, 93, 206, 0.12);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.hud-btn-icon:hover {
  background: rgba(37, 93, 206, 0.3);
  color: #ffffff;
  border-color: var(--color-cobalt-blue);
  box-shadow: 0 0 12px var(--glow-cobalt);
}

.hud-btn-icon.active {
  border-color: var(--color-bright-red);
  color: var(--color-bright-red);
  box-shadow: 0 0 14px var(--glow-red);
}

/* Achievement Pill In Nav */
.hud-achievement-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(2, 24, 97, 0.7);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hud-achievement-pill:hover {
  border-color: var(--color-cobalt-blue);
  background: rgba(37, 93, 206, 0.2);
}

.hud-achievement-pill .trophy-icon {
  color: #ffc107;
}

/* ----------------------------------------------------------------------------
 * 2. CINEMATIC OPENING SEQUENCE (THE DIGITAL REVEAL)
 * ---------------------------------------------------------------------------- */
#intro-sequence {
  position: fixed;
  inset: 0;
  background: var(--bg-deep-void);
  z-index: var(--z-intro);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#intro-sequence.intro-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-canvas-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  width: 100%;
}

.intro-terminal-box {
  background: rgba(1, 14, 54, 0.85);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-hud), 0 0 40px rgba(2, 24, 97, 0.5);
  padding: 24px 32px;
  margin-bottom: 32px;
  text-align: left;
  border-radius: var(--radius-sm);
  position: relative;
}

.intro-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

/* Visual Biometric Scanner Pad */
.intro-biometric-scanner-pad {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(2, 10, 36, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.intro-scanner-visual {
  width: 70px;
  height: 70px;
  position: relative;
  flex-shrink: 0;
  border: 1px solid var(--border-medium);
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle, var(--glow-cobalt-subtle) 0%, transparent 70%);
}

.intro-scanner-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.scanner-arc {
  fill: none;
  stroke: var(--color-cobalt-blue);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
}
.scanner-arc.outer {
  stroke-dasharray: 6, 8;
  animation: radarRotate 10s linear infinite;
}
.scanner-arc.middle {
  stroke: var(--color-bright-red);
  stroke-dasharray: 4, 6;
  animation: radarRotate 7s linear infinite reverse;
}
.scanner-ridge {
  fill: none;
  stroke: var(--color-cobalt-blue);
  stroke-width: 1.2;
  opacity: 0.75;
}
.scanner-center-core {
  fill: var(--color-bright-red);
  transform-box: fill-box;
  transform-origin: center;
  animation: pipPulse 1.5s infinite;
  transition: fill 0.4s ease;
}
.scanner-center-core.verified {
  fill: #00ffaa;
  filter: drop-shadow(0 0 6px #00ffaa);
}

.intro-scanner-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-bright-red), var(--color-cobalt-blue), transparent);
  box-shadow: 0 0 8px var(--color-bright-red);
  animation: laserScanVertical 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.intro-scanner-telemetry {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scanner-telemetry-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.scanner-telemetry-item .sc-label {
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.scanner-telemetry-item .sc-val {
  font-weight: 700;
  color: #ffffff;
}

.scanner-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.scanner-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-cobalt-blue), var(--color-bright-red));
  box-shadow: 0 0 10px var(--glow-cobalt);
  transition: width 0.3s ease-out;
}

/* Recovery Fallback Box */
.intro-recovery-box {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(222, 17, 16, 0.15);
  border: 1px solid var(--border-red-bright);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recovery-msg {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #ffb3b3;
}

.recovery-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.intro-terminal-lines {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.8;
  min-height: 140px;
}

.intro-terminal-line {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.intro-terminal-line.visible {
  opacity: 1;
  transform: translateX(0);
}

.intro-terminal-line.success {
  color: #00ffaa;
}

.intro-terminal-line.danger {
  color: var(--text-accent-red);
}

.intro-hero-title {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ffffff 30%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.intro-hero-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: var(--text-accent-blue);
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.intro-hero-subtitle.visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.intro-action-buttons.visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-skip-btn {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 10;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.intro-skip-btn:hover {
  color: #fff;
  border-color: var(--color-bright-red);
  background: rgba(222, 17, 16, 0.15);
}

/* ----------------------------------------------------------------------------
 * 3. THE PLAYER DOSSIER (CONFIDENTIAL INTELLIGENCE FILE)
 * ---------------------------------------------------------------------------- */
.dossier-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 36px;
  margin-top: 40px;
}

.dossier-card {
  background: var(--bg-surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-hud);
  position: relative;
  overflow: hidden;
}

.dossier-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-bright-red), var(--color-cobalt-blue));
}

.dossier-profile-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dossier-avatar-frame {
  width: 240px;
  height: 240px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-bright);
  padding: 6px;
  background: radial-gradient(circle, var(--glow-cobalt-subtle) 0%, var(--bg-surface-navy) 100%);
  position: relative;
  margin-bottom: 24px;
  box-shadow: 0 0 30px var(--glow-cobalt);
  overflow: hidden; /* Strictly clip all targeting overlays */
}

.dossier-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  filter: contrast(1.15) brightness(0.95);
  display: block;
}

/* ----------------------------------------------------------------------------
 * PRECISION TARGETING OVERLAY SYSTEM
 * ---------------------------------------------------------------------------- */
.targeting-reticle-overlay {
  position: absolute;
  inset: 6px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}

/* Focal Point Lock: Calibrated to Operative Head/Visor (50% X, 36% Y) */
.targeting-focal-lock {
  position: absolute;
  width: 90px;
  height: 90px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: all 0.3s ease;
}

.targeting-rings-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.targeting-rings-svg .ring-outer {
  fill: none;
  stroke: var(--targeting-color-primary);
  stroke-width: 1.2;
  opacity: 0.7;
}

.targeting-rings-svg .ring-dashed {
  fill: none;
  stroke: var(--targeting-color-secondary);
  stroke-width: 1.5;
  stroke-dasharray: 4, 6;
  opacity: 0.85;
  transform-box: fill-box;
  transform-origin: center;
  animation: radarRotate 14s linear infinite;
}

.targeting-rings-svg .ring-inner {
  fill: none;
  stroke: var(--targeting-color-primary);
  stroke-width: 1;
  opacity: 0.5;
}

.targeting-rings-svg .crosshair {
  stroke: var(--targeting-color-primary);
  stroke-width: 1.2;
  opacity: 0.85;
}

.targeting-rings-svg .center-pip {
  fill: var(--targeting-color-secondary);
  animation: pipPulse 1.8s infinite ease-in-out;
}

/* 4 Tactical Corner Tracking Brackets */
.tracking-bracket {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--targeting-color-primary);
  border-style: solid;
  opacity: 0.9;
  filter: drop-shadow(0 0 3px var(--targeting-color-primary));
}
.bracket-tl { top: 0; left: 0; border-width: 2px 0 0 2px; }
.bracket-tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.bracket-bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.bracket-br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* Thin Animated Laser Scanline */
.targeting-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--targeting-color-secondary), var(--targeting-color-primary), transparent);
  box-shadow: 0 0 8px var(--targeting-color-secondary);
  opacity: 0.85;
  animation: laserScanVertical 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

/* Grid Calibration Ticks */
.targeting-grid-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.targeting-grid-ticks .tick-x {
  position: absolute;
  top: 36%;
  height: 1px;
  background: var(--targeting-color-primary);
  opacity: 0.5;
}
.targeting-grid-ticks .tick-1 { left: 4px; width: 8px; }
.targeting-grid-ticks .tick-2 { right: 4px; width: 8px; }

/* Status & Telemetry Badge */
.targeting-telemetry-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(5, 12, 32, 0.88);
  border: 1px solid var(--targeting-color-primary);
  border-radius: 2px;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.targeting-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.targeting-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--targeting-color-secondary);
  box-shadow: 0 0 6px var(--targeting-color-secondary);
  animation: pulseDot 1.2s infinite ease-in-out;
}

.targeting-status-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.targeting-coords-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.dossier-name {
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.dossier-callsign {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-accent-red);
  letter-spacing: 0.2em;
  margin-bottom: 16px;
}

.dossier-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: linear-gradient(90deg, rgba(222, 17, 16, 0.2), rgba(37, 93, 206, 0.2));
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #ffffff;
  margin-bottom: 24px;
}

.dossier-quick-stats {
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: left;
}

.dossier-stat-item .stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dossier-stat-item .stat-val {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Dossier Telemetry Bars */
.telemetry-bars-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

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

.telemetry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.telemetry-name {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.telemetry-value {
  color: #fff;
  font-weight: 700;
}

.telemetry-status-tag {
  font-size: 0.7rem;
  color: var(--text-accent-red);
  margin-left: 8px;
}

.telemetry-track {
  width: 100%;
  height: 8px;
  background: rgba(1, 14, 54, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.telemetry-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-cobalt-blue), var(--color-bright-red));
  border-radius: var(--radius-sm);
  width: 0%;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px var(--glow-cobalt);
}

/* ----------------------------------------------------------------------------
 * 4. THE ADIT PARTICLE ENGINE (CANVAS TYPOGRAPHY & LIVE TRANSMITTER)
 * ---------------------------------------------------------------------------- */
.particle-console-panel {
  margin-top: 24px;
  padding: 16px 20px;
  background: rgba(1, 14, 54, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hud);
  position: relative;
  z-index: 2;
}

.particle-console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.particle-char-counter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(1, 6, 25, 0.75);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.05em;
  user-select: none;
}

.particle-char-counter .counter-label {
  color: var(--text-muted);
  margin-right: 4px;
  font-size: 0.7rem;
}

.particle-char-counter .counter-val {
  color: var(--color-bright-red);
  font-weight: 700;
}

.particle-char-counter .counter-max {
  color: var(--text-muted);
}

.particle-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.particle-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
}

.particle-prompt-symbol {
  position: absolute;
  left: 14px;
  color: var(--text-accent-red);
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  pointer-events: none;
  user-select: none;
}

.particle-text-input {
  width: 100%;
  background: rgba(1, 6, 25, 0.85);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 11px 40px 11px 34px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  transition: all var(--transition-fast);
  outline: none;
}

.particle-text-input:focus {
  border-color: var(--color-cobalt-blue);
  box-shadow: 0 0 16px var(--glow-cobalt);
  background: rgba(2, 24, 97, 0.45);
}

.particle-text-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.82rem;
}

.particle-input-clear-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition-fast);
}

.particle-input-clear-btn:hover {
  color: var(--color-bright-red);
}

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

.particle-action-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.particle-action-btn .btn-glyph {
  font-size: 0.95rem;
  line-height: 1;
}

.particle-action-btn.btn-reform {
  background: var(--color-cobalt-blue);
  color: #ffffff;
  border: 1px solid var(--border-bright);
  box-shadow: 0 0 14px var(--glow-cobalt);
}

.particle-action-btn.btn-reform:hover {
  background: #3470ea;
  box-shadow: 0 0 20px var(--glow-cobalt-strong);
  transform: translateY(-1px);
}

.particle-action-btn.btn-reset {
  background: rgba(1, 6, 25, 0.75);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.particle-action-btn.btn-reset:hover {
  color: #ffffff;
  border-color: var(--border-red-bright);
  background: rgba(222, 17, 16, 0.2);
  box-shadow: 0 0 12px var(--glow-red-subtle);
}

.particle-presets-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.presets-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.particle-stage-wrap {
  position: relative;
  width: 100%;
  min-height: 520px;
  height: 60vh;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: radial-gradient(circle at center, rgba(2, 24, 97, 0.4) 0%, var(--bg-deep-void) 90%);
  overflow: hidden;
  margin-top: 20px;
  box-shadow: var(--shadow-hud);
}

.particle-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.particle-hud-overlay {
  position: absolute;
  top: 18px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.particle-telemetry-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  background: rgba(1, 6, 25, 0.6);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.particle-mode-selector {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(1, 6, 25, 0.8);
  padding: 5px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.particle-mode-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.particle-mode-btn:hover {
  color: #fff;
  border-color: var(--border-medium);
}

.particle-mode-btn.active {
  background: var(--color-cobalt-blue);
  color: #fff;
  border-color: var(--border-bright);
  box-shadow: 0 0 12px var(--glow-cobalt);
}

.particle-help-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  pointer-events: none;
  background: rgba(1, 6, 25, 0.75);
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  z-index: 2;
}

/* Fallback Container */
.particle-fallback-display {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(2, 24, 97, 0.6) 0%, var(--bg-deep-void) 90%);
  z-index: 3;
}

.fallback-glow-text {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--text-primary);
  text-shadow: 0 0 20px var(--glow-cobalt), 0 0 40px var(--glow-red);
  letter-spacing: 0.05em;
  line-height: 1.15;
  word-break: break-word;
}

.fallback-status-badge {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-accent-red);
  letter-spacing: 0.15em;
  background: rgba(222, 17, 16, 0.15);
  border: 1px solid var(--border-red-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
  .particle-console-panel {
    padding: 12px 14px;
  }
  .particle-input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .particle-actions-cluster {
    width: 100%;
  }
  .particle-action-btn {
    flex: 1;
    justify-content: center;
    padding: 9px 12px;
  }
  .particle-stage-wrap {
    min-height: 380px;
    height: 48vh;
  }
  .particle-hud-overlay {
    top: 12px;
    left: 14px;
    right: 14px;
  }
  .particle-telemetry-tag {
    display: none;
  }
  .particle-help-hint {
    font-size: 0.62rem;
    padding: 3px 10px;
    letter-spacing: 0.08em;
  }
}

/* ----------------------------------------------------------------------------
 * 5. FRIENDSHIP ARCHIVES (REAL GAMING MEMORIES)
 * ---------------------------------------------------------------------------- */
.archives-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  margin-bottom: 36px;
}

.archive-filter-btn {
  background: rgba(2, 24, 97, 0.5);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.archive-filter-btn:hover, .archive-filter-btn.active {
  background: var(--color-cobalt-blue);
  border-color: var(--border-bright);
  color: #ffffff;
  box-shadow: 0 0 14px var(--glow-cobalt);
}

.memories-masonry-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
}

.memory-card {
  grid-column: span 6;
  background: var(--bg-surface-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-hud);
  transition: all var(--transition-smooth);
  cursor: pointer;
}

.memory-card.featured-wide {
  grid-column: span 12;
}

.memory-card.wide-7 {
  grid-column: span 7;
}

.memory-card.compact-5 {
  grid-column: span 5;
}

.memory-card.tall {
  grid-column: span 5;
}

.memory-card.standard-6 {
  grid-column: span 6;
}

.memory-card:hover {
  border-color: var(--color-bright-red);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(1, 6, 25, 0.9), 0 0 25px var(--glow-red-subtle);
}

.memory-img-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: #01081e;
}

.memory-card.featured-wide .memory-img-wrapper {
  height: 480px;
}

.memory-card.wide-7 .memory-img-wrapper {
  height: 380px;
}

.memory-card.compact-5 .memory-img-wrapper {
  height: 380px;
}

.memory-card.tall .memory-img-wrapper {
  height: 480px;
}

.memory-card.standard-6 .memory-img-wrapper {
  height: 320px;
}

.memory-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  filter: contrast(1.05) brightness(0.92);
}

.memory-card:hover .memory-card-img {
  transform: scale(1.04);
  filter: contrast(1.1) brightness(1);
}

.memory-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(1, 6, 25, 0.95) 0%, rgba(2, 24, 97, 0.3) 50%, transparent 100%);
  pointer-events: none;
}

.memory-badge-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  background: rgba(1, 6, 25, 0.85);
  border: 1px solid var(--border-red-bright);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-accent-red);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 0 12px var(--glow-red-subtle);
}

.memory-body {
  padding: 24px;
}

.memory-category-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}

.memory-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #fff;
}

.memory-caption {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.memory-footer-intel {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ----------------------------------------------------------------------------
 * 6. LIGHTBOX MODAL
 * ---------------------------------------------------------------------------- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(1, 6, 25, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: var(--z-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content-box {
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  background: var(--bg-surface-navy);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  box-shadow: 0 0 60px rgba(37, 93, 206, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.lightbox-image-viewport {
  width: 100%;
  max-height: 60vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.lightbox-image-viewport img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.lightbox-info-pane {
  padding: 24px 32px;
  background: var(--bg-surface-navy);
  border-top: 1px solid var(--border-medium);
}

.lightbox-close-btn, .lightbox-nav-btn {
  position: absolute;
  background: rgba(1, 6, 25, 0.8);
  border: 1px solid var(--border-medium);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.lightbox-close-btn {
  top: 16px;
  right: 16px;
}

.lightbox-nav-btn.prev {
  top: 40%;
  left: 16px;
  transform: translateY(-50%);
}

.lightbox-nav-btn.next {
  top: 40%;
  right: 16px;
  transform: translateY(-50%);
}

.lightbox-close-btn:hover, .lightbox-nav-btn:hover {
  background: var(--color-bright-red);
  border-color: #fff;
}

/* ----------------------------------------------------------------------------
 * 7. THE CLASSIFIED BIRTHDAY FILE (SARCASM ENGINE)
 * ---------------------------------------------------------------------------- */
.reports-accordion-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 36px;
}

.report-folder {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.report-folder:hover {
  border-color: var(--color-cobalt-blue);
  box-shadow: 0 4px 20px rgba(37, 93, 206, 0.15);
}

.report-folder.active {
  border-color: var(--color-bright-red);
  box-shadow: 0 6px 30px rgba(222, 17, 16, 0.25);
}

.report-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(2, 24, 97, 0.4);
  user-select: none;
}

.report-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.report-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-accent-blue);
}

.report-title-text {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

/* Rubber Stamp Styling */
.rubber-stamp {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  padding: 3px 10px;
  text-transform: uppercase;
  border: 2px solid var(--color-cobalt-blue);
  color: var(--color-cobalt-blue);
  border-radius: 2px;
  transform: rotate(-3deg);
  display: inline-block;
}

.rubber-stamp.stamp-red {
  border-color: var(--color-bright-red);
  color: var(--color-bright-red);
  transform: rotate(2deg);
}

.report-body-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(1, 14, 54, 0.75);
}

.report-folder.active .report-body-panel {
  max-height: 400px;
}

.report-inner-content {
  padding: 24px;
  border-top: 1px dashed var(--border-subtle);
}

.report-details {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 18px;
}

.report-punchline-box {
  background: rgba(222, 17, 16, 0.1);
  border-left: 3px solid var(--color-bright-red);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #ffffff;
}

/* ----------------------------------------------------------------------------
 * 8. INTERACTIVE CYBERSECURITY TERMINAL
 * ---------------------------------------------------------------------------- */
.terminal-workstation {
  background: rgba(1, 8, 30, 0.92);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hud), 0 0 50px rgba(37, 93, 206, 0.25);
  overflow: hidden;
  margin-top: 36px;
}

.terminal-titlebar {
  background: rgba(2, 24, 97, 0.7);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-medium);
}

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

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-bright-red);
}

.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #27c93f; }

.terminal-screen {
  padding: 24px;
  min-height: 320px;
  max-height: 440px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #a4c2ff;
  line-height: 1.7;
}

.terminal-output-block {
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.terminal-prompt-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.terminal-prompt-label {
  color: var(--text-accent-red);
  font-weight: 700;
}

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

.terminal-quick-chips {
  padding: 14px 20px;
  background: rgba(1, 14, 54, 0.85);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.terminal-chip {
  background: rgba(37, 93, 206, 0.15);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.terminal-chip:hover {
  background: var(--color-cobalt-blue);
  color: #fff;
  border-color: #fff;
}

/* ----------------------------------------------------------------------------
 * 9. GAMING CHAPTER & DESERT ATMOSPHERE
 * ---------------------------------------------------------------------------- */
.desert-experience-frame {
  position: relative;
  min-height: 520px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-hud);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  margin-top: 36px;
  background-image: url('../images/ui/desert_night.jpg');
  background-size: cover;
  background-position: center;
}

.desert-atmosphere-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(1, 6, 25, 0.4) 0%, rgba(1, 6, 25, 0.88) 100%),
              linear-gradient(0deg, rgba(2, 24, 97, 0.85) 0%, transparent 60%);
}

.desert-quote-card {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.desert-quote-text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

/* ----------------------------------------------------------------------------
 * 10. BIRTHDAY COUNTDOWN & CELEBRATION
 * ---------------------------------------------------------------------------- */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 36px;
  margin-bottom: 36px;
}

.countdown-unit-box {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 32px 16px;
  text-align: center;
  box-shadow: var(--shadow-hud);
  position: relative;
  overflow: hidden;
}

.countdown-unit-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-bright-red);
}

.countdown-number {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 20px var(--glow-cobalt);
}

.countdown-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.countdown-action-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

/* Celebration State Active */
.celebration-burst-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
}

.celebration-banner-modal {
  display: none;
  background: linear-gradient(135deg, rgba(2, 24, 97, 0.95), rgba(222, 17, 16, 0.95));
  border: 2px solid #fff;
  padding: 32px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 80px rgba(222, 17, 16, 0.7);
  text-align: center;
  margin-top: 32px;
  animation: pulseGlow 2s infinite ease-in-out;
}

.celebration-banner-modal.active {
  display: block;
}

/* ----------------------------------------------------------------------------
 * 11. THE FINAL BROTHERHOOD LETTER (SEALED ENVELOPE INTERACTION)
 * ---------------------------------------------------------------------------- */
.letter-section-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
}

.envelope-trigger-card {
  width: 100%;
  max-width: 600px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-hud), 0 0 40px rgba(2, 24, 97, 0.5);
  transition: all var(--transition-smooth);
  position: relative;
}

.envelope-trigger-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-bright-red);
  box-shadow: 0 20px 50px rgba(1, 6, 25, 0.9), 0 0 35px var(--glow-red);
}

.wax-seal-badge {
  width: 84px;
  height: 84px;
  background: radial-gradient(circle, var(--color-bright-red) 0%, #750808 100%);
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(222, 17, 16, 0.6), inset 0 2px 6px rgba(255, 255, 255, 0.3);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: 0.1em;
}

.letter-unfolded-card {
  width: 100%;
  max-width: 760px;
  background: #fbf9f4;
  color: #1a1e28;
  border-radius: var(--radius-sm);
  padding: 56px 48px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
  display: none;
  position: relative;
  margin-top: 24px;
}

.letter-unfolded-card.active {
  display: block;
  animation: letterOpen 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.letter-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 10rem;
  color: rgba(2, 24, 97, 0.04);
  pointer-events: none;
  font-weight: 900;
}

.letter-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  padding-bottom: 16px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #657088;
}

.letter-salutation {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--color-midnight-navy);
}

.letter-body-p {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2b3345;
  margin-bottom: 18px;
}

.letter-signoff {
  margin-top: 36px;
  font-family: var(--font-editorial);
  font-size: 1.3rem;
  color: var(--color-midnight-navy);
}

.letter-signature-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-bright-red);
  margin-top: 4px;
}

.letter-ps {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed rgba(0, 0, 0, 0.15);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #555f75;
}

/* ----------------------------------------------------------------------------
 * 12. ACHIEVEMENTS NOTIFICATION TOAST
 * ---------------------------------------------------------------------------- */
.achievement-toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 40px rgba(1, 6, 25, 0.9), 0 0 25px var(--glow-cobalt);
  z-index: var(--z-toast);
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.achievement-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.achievement-toast-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(222, 17, 16, 0.2);
  border: 1px solid var(--border-red-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffc107;
  font-size: 1.3rem;
}

/* ----------------------------------------------------------------------------
 * 13. ACHIEVEMENTS DRAWER MODAL
 * ---------------------------------------------------------------------------- */
.achievements-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: rgba(1, 8, 30, 0.96);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-medium);
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.8);
  z-index: calc(var(--z-hud-bar) + 10);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.achievements-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.drawer-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  flex: 1;
}

.drawer-item {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(2, 24, 97, 0.4);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0.5;
  transition: all var(--transition-fast);
}

.drawer-item.unlocked {
  opacity: 1;
  border-color: var(--border-bright);
  background: rgba(37, 93, 206, 0.15);
}

/* ----------------------------------------------------------------------------
 * 14. FOOTER (END OF TRANSMISSION)
 * ---------------------------------------------------------------------------- */
.footer-chapter {
  padding: 60px 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  background: var(--bg-deep-void);
  position: relative;
  z-index: var(--z-content);
}

.footer-transmission-line {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer-credit {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ----------------------------------------------------------------------------
 * 15. DISTINCTIVE ANIMATED MECHANICAL SPIDER CURSOR
 * ---------------------------------------------------------------------------- */
#spider-cursor-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transform-origin: center center;
  transition: opacity 0.3s ease;
  will-change: transform;
}

.spider-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 6px var(--spider-color-glow));
}

.spider-abdomen {
  fill: var(--spider-color-body);
  stroke: var(--spider-color-legs);
  stroke-width: 1.4;
  transition: fill var(--theme-transition-speed) ease, stroke var(--theme-transition-speed) ease;
}

.spider-core {
  fill: var(--spider-color-glow);
  filter: drop-shadow(0 0 4px var(--spider-color-glow));
  animation: pipPulse 2s infinite ease-in-out;
  transition: fill var(--theme-transition-speed) ease;
}

.spider-head {
  fill: var(--spider-color-body);
  stroke: var(--spider-color-legs);
  stroke-width: 1.2;
  transition: fill var(--theme-transition-speed) ease, stroke var(--theme-transition-speed) ease;
}

.spider-eye {
  fill: var(--spider-color-glow);
  filter: drop-shadow(0 0 3px var(--spider-color-glow));
  transition: fill var(--theme-transition-speed) ease;
}

.spider-leg {
  fill: none;
  stroke: var(--spider-color-legs);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--theme-transition-speed) ease;
}

#spider-cursor-container.pounce .spider-svg {
  transform: scale(0.72);
  transition: transform 0.1s ease-out;
}

#spider-cursor-container.alert {
  filter: drop-shadow(0 0 12px var(--spider-color-glow));
}

#spider-cursor-container.alert .spider-eye {
  fill: #ffffff;
  filter: drop-shadow(0 0 6px #ffffff);
}

/* Silk Trail Canvas */
#spider-silk-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: calc(var(--z-cursor) - 1);
}

@media (pointer: coarse) {
  #spider-cursor-container, #spider-silk-canvas {
    display: none !important;
  }
}

/* ----------------------------------------------------------------------------
 * 16. THEME REACTOR HUD CONTROLS & MATRIX DRAWER
 * ---------------------------------------------------------------------------- */
.theme-reactor-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-medium);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.theme-reactor-btn:hover {
  border-color: var(--color-cobalt-blue);
  box-shadow: 0 0 16px var(--glow-cobalt);
}

.reactor-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-cobalt-blue);
  box-shadow: 0 0 8px var(--color-cobalt-blue);
  animation: pulseDot 1.5s infinite;
}

.reactor-theme-name {
  font-weight: 700;
  letter-spacing: 0.08em;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reactor-mode-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: rgba(37, 93, 206, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  color: var(--text-accent-blue);
  text-transform: uppercase;
}

/* Theme Reactor Drawer / Modal */
.theme-reactor-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  background: rgba(8, 12, 28, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-medium);
  box-shadow: -15px 0 60px rgba(0, 0, 0, 0.85);
  z-index: calc(var(--z-hud-bar) + 20);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-reactor-drawer.open {
  right: 0;
}

.reactor-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.reactor-mode-selector-bar {
  display: flex;
  gap: 6px;
  background: rgba(2, 8, 26, 0.8);
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.reactor-mode-btn {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.reactor-mode-btn.active {
  background: var(--color-cobalt-blue);
  color: #fff;
  border-color: var(--border-bright);
  box-shadow: 0 0 10px var(--glow-cobalt);
}

/* Auto Timer Progress Bar */
.reactor-timer-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}

.reactor-timer-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--color-cobalt-blue), var(--color-bright-red));
  transition: width 0.1s linear;
}

.reactor-themes-scrollable {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}

.reactor-themes-scrollable::-webkit-scrollbar {
  width: 5px;
}

.reactor-themes-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.reactor-themes-scrollable::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}

.reactor-themes-scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--color-cobalt-blue);
}

.theme-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(16, 24, 48, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.theme-card-item:hover {
  border-color: var(--border-bright);
  background: rgba(37, 93, 206, 0.15);
  transform: translateX(-2px);
}

.theme-card-item:focus-visible {
  outline: 2px solid var(--color-cobalt-blue);
  outline-offset: 2px;
  background: rgba(37, 93, 206, 0.22);
  border-color: var(--border-bright);
  transform: translateX(-2px);
}

.theme-card-item.active {
  border-color: var(--color-cobalt-blue);
  background: rgba(37, 93, 206, 0.25);
  box-shadow: inset 0 0 12px var(--glow-cobalt-subtle);
}

.theme-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.theme-card-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.theme-card-mood {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.theme-card-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* ============================================================================
 * 16. CHAPTER 02 — IDENTITY DISTORTION (EXPERIMENTAL KINETIC TYPOGRAPHY)
 * ============================================================================ */
.distortion-stage-wrap {
  position: relative;
  background: var(--bg-surface-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 48px 36px;
  overflow: hidden;
  box-shadow: var(--shadow-hud);
  perspective: 1200px;
}

.distortion-bg-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.1);
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 16rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.distortion-hero-stack {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  margin: 24px 0 36px 0;
}

.distortion-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.distortion-glyph-main {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7.5vw, 6.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
  color: #ffffff;
  transition: all 0.4s ease;
  position: relative;
  display: inline-block;
}

.distortion-glyph-outline {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7.5vw, 6.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-cobalt-blue);
  transition: all 0.4s ease;
  position: relative;
  display: inline-block;
}

.distortion-chromatic {
  text-shadow: 
    3px 0 var(--color-bright-red),
    -3px 0 var(--color-cobalt-blue),
    0 0 20px var(--glow-cobalt);
}

.distortion-wireframe {
  -webkit-text-stroke: 1.5px var(--color-bright-red) !important;
  color: transparent !important;
  text-shadow: none !important;
}

.distortion-deconstruct .distortion-line:nth-child(odd) {
  transform: translateX(-24px) skewX(-6deg);
}

.distortion-deconstruct .distortion-line:nth-child(even) {
  transform: translateX(24px) skewX(6deg);
}

.distortion-tag-pill-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.distortion-tag-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  background: rgba(2, 24, 97, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.distortion-tag-pill:hover {
  border-color: var(--color-bright-red);
  color: #fff;
  transform: translateY(-2px);
}

.distortion-controls-row {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.distortion-btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  padding: 8px 16px;
  background: rgba(37, 93, 206, 0.12);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.distortion-btn:hover,
.distortion-btn.active {
  background: var(--color-cobalt-blue);
  color: #ffffff;
  border-color: var(--color-cobalt-blue);
  box-shadow: 0 0 16px var(--glow-cobalt);
}

/* ============================================================================
 * 17. CHAPTER 05 — THE FRIENDSHIP TIMELINE (CHRONOLOGICAL NARRATIVE)
 * ============================================================================ */
.timeline-spine-wrapper {
  position: relative;
  padding: 40px 0;
  max-width: 1000px;
  margin: 0 auto;
}

/* Central Glowing Laser Line */
.timeline-laser-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, 
    var(--color-cobalt-blue) 0%, 
    var(--color-bright-red) 50%, 
    var(--color-cobalt-blue) 100%
  );
  box-shadow: 0 0 10px var(--glow-cobalt);
  z-index: 1;
}

.timeline-milestone-item {
  position: relative;
  z-index: 2;
  margin-bottom: 60px;
  display: flex;
  width: 100%;
}

.timeline-milestone-item:nth-child(odd) {
  justify-content: flex-start;
  padding-right: calc(50% + 36px);
}

.timeline-milestone-item:nth-child(even) {
  justify-content: flex-end;
  padding-left: calc(50% + 36px);
  margin-left: auto;
}

/* Center Node Dot */
.timeline-node-core {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-deep-void);
  border: 2px solid var(--color-cobalt-blue);
  box-shadow: 0 0 12px var(--glow-cobalt);
  z-index: 3;
  transition: all 0.3s ease;
}

.timeline-node-core::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--color-bright-red);
  animation: pipPulse 2s infinite ease-in-out;
}

.timeline-milestone-item:hover .timeline-node-core {
  transform: translate(-50%, -50%) scale(1.3);
  border-color: #00ffaa;
  box-shadow: 0 0 20px #00ffaa;
}

.timeline-card {
  width: 100%;
  background: var(--bg-surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  box-shadow: var(--shadow-hud);
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hud), 0 0 24px var(--glow-cobalt-subtle);
}

.timeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.timeline-year-tag {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-accent-red);
  letter-spacing: 0.05em;
  line-height: 1;
}

.timeline-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  background: rgba(37, 93, 206, 0.18);
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.timeline-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.timeline-location-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.timeline-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.timeline-intel-box {
  background: rgba(2, 10, 36, 0.6);
  border-left: 2px solid var(--color-cobalt-blue);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-accent-blue);
  letter-spacing: 0.05em;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

@media (max-width: 992px) {
  .memory-card,
  .memory-card.featured-wide,
  .memory-card.wide-7,
  .memory-card.compact-5,
  .memory-card.tall,
  .memory-card.standard-6 {
    grid-column: span 12;
  }
  .memory-card.featured-wide .memory-img-wrapper,
  .memory-card.tall .memory-img-wrapper {
    height: 380px;
  }
  .memory-card.wide-7 .memory-img-wrapper,
  .memory-card.compact-5 .memory-img-wrapper,
  .memory-card.standard-6 .memory-img-wrapper {
    height: 320px;
  }
}

@media (max-width: 768px) {
  .timeline-laser-spine {
    left: 24px;
  }
  .timeline-node-core {
    left: 24px;
  }
  .timeline-milestone-item,
  .timeline-milestone-item:nth-child(odd),
  .timeline-milestone-item:nth-child(even) {
    padding-left: 60px;
    padding-right: 0;
    margin-left: 0;
  }

  .lightbox-modal {
    padding: 16px;
  }
  .lightbox-content-box {
    max-height: 95vh;
  }
  .lightbox-image-viewport {
    max-height: 50vh;
  }
  .lightbox-image-viewport img {
    max-height: 48vh;
  }
  .lightbox-info-pane {
    padding: 16px;
  }
}

@media (max-width: 576px) {
  .memory-card.featured-wide .memory-img-wrapper,
  .memory-card.tall .memory-img-wrapper,
  .memory-card.wide-7 .memory-img-wrapper,
  .memory-card.compact-5 .memory-img-wrapper,
  .memory-card.standard-6 .memory-img-wrapper,
  .memory-img-wrapper {
    height: 240px;
  }
}


