/* ═══════════════════════════════════════════
   TOKENS — Dark Theme
═══════════════════════════════════════════ */
:root {
  /* Background layers — warm charcoal */
  --void:       #08080a;
  --surface-1: #0f0f12;
  --surface-2: #16161a;
  --surface-3: #1d1d22;

  /* Text */
  --text-primary:   #f0eff4;
  --text-secondary: #a09eb8;
  --text-muted:     #5c5a72;

  /* Accent — warm orange */
  --accent:      #ff7a3d;
  --accent-dim:  rgba(255,122,61,0.12);
  --accent-glow: rgba(255,122,61,0.25);
  --accent-2:    #c47aff;  /* warm lavender */

  /* Borders */
  --border:      rgba(255,255,255,0.07);
  --border-hover:rgba(255,255,255,0.14);

  /* Radius */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;

  /* Fonts */
  --ff-display: 'Orbitron', monospace;
  --ff-body:    'Space Grotesk', sans-serif;
  --ff-mono:    'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════
   TOKENS — Light Theme
═══════════════════════════════════════════ */
:root.light {
  --void:       #f7f6f3;
  --surface-1:  #ffffff;
  --surface-2:  #f0efe9;
  --surface-3:  #e8e7e0;

  --text-primary:   #1a1926;
  --text-secondary: #4a4860;
  --text-muted:     #8e8c9e;

  --accent:      #e85d04;
  --accent-dim:  rgba(232,93,4,0.08);
  --accent-glow: rgba(232,93,4,0.18);
  --accent-2:    #8b5cf6;

  --border:      rgba(0,0,0,0.08);
  --border-hover:rgba(0,0,0,0.15);
}

/* ═══════════════════════════════════════════
   BASE RESET & BODY
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; overflow: hidden; }

body {
  font-family: var(--ff-body);
  background: var(--void);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Text selection */
::selection { background: var(--accent-dim); color: var(--accent); }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--surface-1); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 2px; }

/* ═══════════════════════════════════════════
   LAYOUT HELPERS
═══════════════════════════════════════════ */
.main-content {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ══════════════════════════════════════════════════════════════
   PAGE TRANSITIONS
══════════════════════════════════════════════════════════════ */
.page {
  display: none;
  padding-top: 64px;
  overflow-y: auto;
  box-sizing: border-box;
}
.page.active {
  display: block;
  animation: pageFadeIn 0.4s ease forwards;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   FEATURE DW: DIMENSIONAL WARP — 3D page transition
   Perspective flip with depth layers, flash, and star streaks
   ══════════════════════════════════════════════════════════════ */
.page.dim-warp-out {
  display: block;
  animation: dimWarpOut 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}
.page.dim-warp-in {
  display: block;
  animation: dimWarpIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes dimWarpOut {
  0%   { opacity: 1; transform: perspective(900px) rotateY(0deg) scale(1); filter: brightness(1); }
  40%  { opacity: 0.7; transform: perspective(900px) rotateY(-12deg) scale(0.92) translateZ(-80px); filter: brightness(1.3) blur(1px); }
  100% { opacity: 0; transform: perspective(900px) rotateY(-35deg) scale(0.75) translateZ(-200px); filter: brightness(2) blur(3px); }
}
@keyframes dimWarpIn {
  0%   { opacity: 0; transform: perspective(900px) rotateY(25deg) scale(0.8) translateZ(-150px); filter: brightness(1.8) blur(2px); }
  60%  { opacity: 0.85; transform: perspective(900px) rotateY(4deg) scale(0.96) translateZ(-30px); filter: brightness(1.1) blur(0.5px); }
  100% { opacity: 1; transform: perspective(900px) rotateY(0deg) scale(1) translateZ(0); filter: brightness(1) blur(0); }
}
.dim-warp-flash {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: radial-gradient(ellipse at center, rgba(255,122,61,0.35) 0%, rgba(196,122,255,0.15) 40%, transparent 70%);
  animation: dimWarpFlash 0.5s ease-out forwards;
  pointer-events: none;
}
@keyframes dimWarpFlash {
  0%   { opacity: 0; transform: scale(0.6); }
  30%  { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(1.5); }
}
.dim-warp-streak {
  position: fixed;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,122,61,0.4), transparent);
  z-index: 9997;
  animation: dimWarpStreak 0.45s ease-out forwards;
  pointer-events: none;
}
@keyframes dimWarpStreak {
  0%   { opacity: 0; transform: translateY(-30px) scaleY(0.3); }
  20%  { opacity: 1; transform: translateY(0) scaleY(1); }
  100% { opacity: 0; transform: translateY(60px) scaleY(1.8); }
}

/* Section container */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 48px;
}

/* Section header */
.section-label {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.2;
}

.section-sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 52px;
  font-weight: 400;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   AA: QUANTUM TEXT DECODE — Section titles decode from glyphs
══════════════════════════════════════════════════════════════ */
.section-title.decoding,
.hero-name.decoding {
  white-space: pre-wrap;
}
@keyframes decodeUnlock {
  0%   { text-shadow: 0 0 18px var(--accent-glow), 0 0 36px var(--accent-glow); }
  100% { text-shadow: none; }
}
.section-title.decoded {
  animation: decodeUnlock 0.5s ease-out;
}

/* Section divider */
.section + .section {
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════ */
.nav-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 64px;
  background: rgba(8,8,10,0.82);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--border);
  will-change: transform;
}

.nav-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; flex-shrink: 0;
}

.nav-logo {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-size: 0.75rem; font-weight: 700;
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
}

.nav-title {
  font-family: var(--ff-display);
  font-size: 0.88rem; font-weight: 600; letter-spacing: 0.12em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; gap: 2px; align-items: center; }

.nav-link {
  font-family: var(--ff-body);
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-2);
  border-color: var(--border);
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: transparent;
  position: relative;
  z-index: 1;
}

/* Rainbow border ring — rotating conic gradient */
.nav-link.active::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: conic-gradient(
    from 0deg,
    #ff0055,
    #ff7700,
    #ffdd00,
    #00ff77,
    #0077ff,
    #aa00ff,
    #ff0055
  );
  z-index: -2;
  animation: rainbow-spin 3s linear infinite;
  opacity: 0.9;
}

/* Inner mask — covers center so only the rainbow border shows */
.nav-link.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--accent-dim);
  z-index: -1;
}

.nav-link.active:hover::after {
  background: var(--surface-2);
}

@keyframes rainbow-spin {
  to { transform: rotate(360deg); }
}

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

.live-clock {
  position: relative;
  font-family: var(--ff-mono);
  font-size: 0.72rem; color: var(--accent);
  letter-spacing: 0.1em;
}

.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.status-label {
  font-family: var(--ff-mono); font-size: 0.65rem;
  color: var(--accent); letter-spacing: 0.1em;
}

.chrono-orbit-canvas {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

.nav-theme-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--surface-3);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  margin-left: 4px;
}
.nav-theme-btn:hover {
  background: var(--surface-3);
  border-color: var(--accent);
  transform: scale(1.08);
}

.nav-xray-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--surface-3);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.3s;
  margin-left: 4px;
}
.nav-xray-btn:hover {
  background: var(--surface-3);
  border-color: #00f5d4;
  transform: scale(1.08);
}
.nav-xray-btn.xray-on {
  border-color: #00f5d4;
  box-shadow: 0 0 14px rgba(0,245,212,0.35);
  color: #00f5d4;
}


/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 96px 48px 60px;
  position: relative;
}

.hero-orb-wrap {
  position: relative; display: flex; align-items: center;
  justify-content: center; margin-bottom: 48px;
}




.hero-name {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800; letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--text-primary) 45%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 20px; line-height: 1.1;
}

.hero-tagline {
  font-family: var(--ff-body);
  font-size: 1.05rem; color: var(--text-muted);
  font-weight: 400; letter-spacing: 0.04em;
  margin-bottom: 56px; max-width: 520px; line-height: 1.7;
}

/* Stats row */
.hero-stats {
  display: flex; gap: 64px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 56px;
}
.hero-stat { text-align: center; }
.hero-stat-value {
  font-family: var(--ff-display);
  font-size: 2.2rem; font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
  line-height: 1;
}
.hero-stat-label {
  font-family: var(--ff-mono);
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted); margin-top: 6px;
}

/* Capability pills */
.cap-pills {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; max-width: 680px; margin-bottom: 56px;
}
.cap-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  font-family: var(--ff-body); font-size: 0.8rem; font-weight: 500;
  border: 1px solid; transition: all 0.2s; cursor: default;
  letter-spacing: 0.02em;
}
.cap-pill.a { border-color: rgba(255,122,61,0.25); color: var(--accent); background: var(--accent-dim); }
.cap-pill.b { border-color: rgba(196,122,255,0.25); color: var(--accent-2); background: rgba(196,122,255,0.08); }
.cap-pill.c { border-color: rgba(255,200,87,0.25); color: #ffc857; background: rgba(255,200,87,0.08); }
.cap-pill.d { border-color: rgba(100,210,180,0.25); color: #64d2b4; background: rgba(100,210,180,0.08); }
.cap-pill.e { border-color: rgba(196,122,255,0.25); color: #c47aff; background: rgba(196,122,255,0.08); }
.cap-pill-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Action buttons */
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.btn-primary {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 30px; border-radius: var(--r-md);
  font-family: var(--ff-display); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent), #e85d04);
  color: #fff; border: none; cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-ghost {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--r-md);
  font-family: var(--ff-display); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: transparent;
  color: var(--text-secondary); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s;
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Daily quote */
blockquote#daily-quote {
  font-family: var(--ff-body);
  font-size: 0.95rem; color: var(--text-muted);
  font-style: italic; max-width: 560px; margin: 0 auto;
  padding: 16px 24px;
  border-left: 2px solid var(--accent);
  text-align: left; background: var(--surface-1);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
#quote-author {
  font-family: var(--ff-mono); font-size: 0.68rem;
  color: var(--text-muted); letter-spacing: 0.1em;
  margin-top: 10px; text-align: right;
}

/* ═══════════════════════════════════════════
   CAPABILITY NEBULA
═══════════════════════════════════════════ */
.nebula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ══════════════════════════════════════════════════════════════
   3D CARD TILT — Capability Cards
══════════════════════════════════════════════════════════════ */
.nebula-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  position: relative;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s, background 0.3s;
  cursor: default;
  transform-style: preserve-3d;
  will-change: transform;
  perspective: 800px;
}
.nebula-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.nebula-card:hover {
  background: var(--surface-2);
  border-color: rgba(255,122,61,0.2);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,122,61,0.08);
}
.nebula-card:hover::before { opacity: 1; }

.nebula-card-glow {
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  z-index: 0;
}
.nebula-card-icon { font-size: 2rem; margin-bottom: 16px; display: block; position: relative; z-index: 1; }
.nebula-card-name {
  font-family: var(--ff-display); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--text-primary); margin-bottom: 8px; position: relative; z-index: 1;
}
.nebula-card-desc {
  font-family: var(--ff-body); font-size: 0.82rem;
  color: var(--text-muted); line-height: 1.65; margin-bottom: 18px; position: relative; z-index: 1;
}
.nebula-bar-bg {
  height: 3px; border-radius: 2px;
  background: var(--border); margin-bottom: 8px; position: relative; z-index: 1;
}
.nebula-bar {
  height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 0 8px var(--accent-glow);
}
.nebula-card-meta { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.nebula-tag {
  font-family: var(--ff-mono); font-size: 0.62rem; letter-spacing: 0.1em;
  padding: 3px 10px; border-radius: 999px; border: 1px solid;
  text-transform: uppercase;
}
.nebula-tag.ai  { color: var(--accent); border-color: rgba(255,122,61,0.3); background: var(--accent-dim); }
.nebula-tag.sys { color: var(--accent-2); border-color: rgba(196,122,255,0.3); background: rgba(196,122,255,0.08); }
.nebula-tag.ext { color: #ffc857; border-color: rgba(255,200,87,0.3); background: rgba(255,200,87,0.08); }
.nebula-level { font-family: var(--ff-mono); font-size: 0.62rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════
   MEMORY AMBER
═══════════════════════════════════════════ */
.amber-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.amber-card {
  background: var(--surface-1);
  border: 1px solid rgba(255,200,87,0.1);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative; overflow: hidden;
  transition: all 0.3s;
}
.amber-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,200,87,0.025) 0%, transparent 55%);
  pointer-events: none;
}
.amber-card:hover {
  border-color: rgba(255,200,87,0.25);
  background: var(--surface-2);
  box-shadow: 0 0 40px rgba(255,200,87,0.05);
}
.amber-card-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 14px;
}
.amber-type {
  font-family: var(--ff-mono); font-size: 0.62rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: #ffc857;
  display: flex; align-items: center; gap: 6px;
}
.amber-type-dot { width: 5px; height: 5px; border-radius: 50%; background: #ffc857; }
.amber-time { font-family: var(--ff-mono); font-size: 0.62rem; color: var(--text-muted); }
.amber-content {
  font-family: var(--ff-body); font-size: 0.875rem;
  color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 14px;
}
.amber-tag {
  font-family: var(--ff-mono); font-size: 0.6rem; letter-spacing: 0.08em;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255,200,87,0.08);
  border: 1px solid rgba(255,200,87,0.2);
  color: #ffc857; text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   TOOL CONSTELLATION
═══════════════════════════════════════════ */
.constellation-container {
  position: relative; height: 380px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl); overflow: hidden; margin-bottom: 40px;
}
.const-legend {
  position: absolute; bottom: 16px; left: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.const-legend-item {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--ff-mono); font-size: 0.62rem; color: var(--text-muted);
}
.const-legend-dot { width: 7px; height: 7px; border-radius: 50%; }

.tool-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.tool-cat {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px;
  transition: all 0.2s;
}
.tool-cat:hover { border-color: rgba(196,122,255,0.2); background: var(--surface-2); }
.tool-cat-title {
  font-family: var(--ff-display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 14px;
}
.tool-list { display: flex; flex-direction: column; gap: 6px; }
.tool-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--r-sm);
  background: var(--surface-3); border: 1px solid var(--border);
  transition: all 0.15s;
}
.tool-item:hover {
  border-color: rgba(196,122,255,0.25);
  background: rgba(196,122,255,0.06);
}
.tool-item-icon { font-size: 0.95rem; }
.tool-item-name { font-family: var(--ff-body); font-size: 0.8rem; color: var(--text-secondary); flex: 1; }
.tool-item-badge {
  font-family: var(--ff-mono); font-size: 0.58rem; letter-spacing: 0.08em;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(196,122,255,0.12);
  border: 1px solid rgba(196,122,255,0.2);
  color: var(--accent-2); text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   MESSAGE STARDUST
═══════════════════════════════════════════ */
.msg-composer {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px; margin-bottom: 40px;
}
.composer-top { display: grid; grid-template-columns: auto 1fr; gap: 16px; margin-bottom: 16px; }
.avatar-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(255,122,61,0.2);
  font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0; position: relative;
}
.avatar-btn:hover {
  background: rgba(255,122,61,0.18);
  box-shadow: 0 0 20px var(--accent-glow);
}
.composer-inputs { display: flex; flex-direction: column; gap: 10px; }
.input-row { display: flex; gap: 10px; }
.field-input {
  flex: 1; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 9px 14px;
  font-family: var(--ff-body); font-size: 0.875rem;
  color: var(--text-primary); outline: none;
  transition: all 0.2s; min-width: 0;
}
.field-input::placeholder { color: var(--text-muted); }
.field-input:focus {
  border-color: rgba(255,122,61,0.4);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.textarea-content {
  width: 100%; min-height: 96px; resize: vertical;
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 12px 14px;
  font-family: var(--ff-body); font-size: 0.875rem;
  color: var(--text-primary); outline: none;
  transition: all 0.2s; line-height: 1.7;
}
.textarea-content::placeholder { color: var(--text-muted); }
.textarea-content:focus {
  border-color: rgba(255,122,61,0.4);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.composer-footer { display: flex; align-items: center; justify-content: space-between; }
.char-count { font-family: var(--ff-mono); font-size: 0.68rem; color: var(--text-muted); transition: color 0.2s; }
.char-count.warning { color: #ffc857; }
.char-count.danger { color: #ff4ecd; }
.btn-send {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--r-sm);
  font-family: var(--ff-display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent), #e85d04);
  color: #fff; border: none; cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-send:hover { box-shadow: 0 6px 24px var(--accent-glow); transform: translateY(-1px); }

/* Message cards */
.msg-list { display: flex; flex-direction: column; gap: 14px; }

/* Timeline message list */
.timeline-msg-list {
  position: relative;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.timeline-msg-list::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2), transparent);
}
.timeline-msg-wrap {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.timeline-msg-dot {
  position: absolute;
  left: -24px;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 1;
  flex-shrink: 0;
}
.timeline-msg-body {
  flex: 1;
  min-width: 0;
  animation: pageFadeIn 0.3s ease forwards;
  opacity: 0;
}
.timeline-msg-body .msg-card {
  margin: 0;
}
.msg-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 22px;
  transition: border-color 0.2s, background 0.2s, transform 0.08s ease-out, box-shadow 0.2s;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  perspective: 1000px;
}
/* Magnetic glow that follows the cursor */
.msg-card-glow {
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,122,255,0.15) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  z-index: 0;
}
.msg-card:hover {
  border-color: rgba(196,122,255,0.25);
  background: var(--surface-2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(196,122,255,0.06);
}
.msg-card.pinned {
  border-color: rgba(255,122,61,0.2);
  background: rgba(255,122,61,0.03);
}
.msg-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.msg-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.msg-meta { flex: 1; min-width: 0; }
.msg-author { font-family: var(--ff-body); font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.msg-time { font-family: var(--ff-mono); font-size: 0.62rem; color: var(--text-muted); }
.msg-actions {
  display: flex; gap: 5px;
  opacity: 0; transition: opacity 0.2s;
}
.msg-card:hover .msg-actions { opacity: 1; }
.msg-action-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.68rem;
  padding: 3px 8px; border-radius: 4px;
  cursor: pointer; transition: all 0.15s;
}
.msg-action-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-dim);
}
.msg-action-btn.danger:hover {
  border-color: #ff6b6b; color: #ff6b6b;
  background: rgba(255,107,107,0.08);
}
.msg-action-btn.bookmark-btn { font-size: 0.8rem; }
.msg-action-btn.bookmark-btn:hover { border-color: #ffd700; color: #ffd700; background: rgba(255,215,0,0.08); }
.msg-action-btn.bookmark-btn.active { color: #ffd700; border-color: rgba(255,215,0,0.4); }
.msg-body {
  font-family: var(--ff-body); font-size: 0.875rem;
  color: var(--text-secondary); line-height: 1.8;
  word-break: break-word;
}
.msg-reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rx-chip {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-family: var(--ff-mono); font-size: 0.7rem;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
}
.rx-chip:hover {
  border-color: rgba(196,122,255,0.3);
  background: rgba(196,122,255,0.1);
  color: var(--accent-2);
}
.rx-chip.my {
  border-color: rgba(255,122,61,0.3);
  background: var(--accent-dim);
  color: var(--accent);
}
.rx-add {
  padding: 3px 8px; border-radius: 999px; font-size: 0.7rem;
  background: var(--surface-3);
  border: 1px dashed var(--border);
  color: var(--text-muted); cursor: pointer; transition: all 0.15s;
}
.rx-add:hover { border-color: rgba(196,122,255,0.3); color: var(--accent-2); }

/* ═══════════════════════════════════════════
   STAR RATING
═══════════════════════════════════════════ */
.msg-star-rating {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-left: 6px;
  vertical-align: middle;
}
.msg-star-rating .star {
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  filter: grayscale(0.2);
  line-height: 1;
}
.msg-star-rating .star.lit {
  color: #ffc857;
  filter: none;
  text-shadow: 0 0 6px rgba(255,200,87,0.7);
}
.msg-star-rating .star:hover,
.msg-star-rating .star.hovering {
  color: #ffc857;
  filter: none;
  transform: scale(1.3);
  text-shadow: 0 0 12px rgba(255,200,87,0.9);
}
.msg-star-rating .star.rated {
  color: #ffc857;
  filter: none;
  text-shadow: 0 0 6px rgba(255,200,87,0.5);
}
.msg-star-avg {
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  color: #ffc857;
  margin-left: 3px;
  opacity: 0.8;
}

.reaction-picker {
  display: none; flex-wrap: wrap; gap: 5px;
  padding: 10px; border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  max-width: 240px; margin-top: 8px;
}
.reaction-picker.show { display: flex; }
.reaction-pick-item { font-size: 1.1rem; padding: 4px; cursor: pointer; transition: transform 0.1s; border-radius: 4px; }
.reaction-pick-item:hover { transform: scale(1.35); background: rgba(196,122,255,0.15); }

/* ═══════════════════════════════════════════
   FLOATING EMOJI REACTIONS — Bounce & Settle
═══════════════════════════════════════════ */
.floating-reaction-emoji {
  position: fixed;
  z-index: 99999;
  font-size: 2.2rem;
  line-height: 1;
  pointer-events: none;
  will-change: transform, opacity;
  animation: reactionFloat 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes reactionFloat {
  0%   { transform: translate(-50%, 0) scale(0.4) rotate(-15deg); opacity: 0; }
  15%  { transform: translate(-50%, -18px) scale(1.35) rotate(5deg); opacity: 1; }
  30%  { transform: translate(-50%, -38px) scale(1.05) rotate(-3deg); opacity: 1; }
  45%  { transform: translate(-50%, -58px) scale(1.2) rotate(2deg); opacity: 0.9; }
  70%  { transform: translate(-50%, -90px) scale(1) rotate(0deg); opacity: 0.5; }
  100% { transform: translate(-50%, -140px) scale(0.6) rotate(0deg); opacity: 0; }
}

/* ═══════════════════════════════════════════
   TIMELINE
═══════════════════════════════════════════ */
.time-controls { display: flex; gap: 10px; margin-bottom: 24px; align-items: center; }

.time-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 7px 36px 7px 14px;
  border-radius: var(--r-sm);
  cursor: pointer; transition: all 0.2s;
  font-family: var(--ff-body);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235c5a72' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  min-width: 160px;
}
.time-select:hover { border-color: var(--border-hover); color: var(--text-primary); background-color: var(--surface-3); }
.time-select:focus { outline: none; border-color: var(--accent); background-color: var(--surface-2); color: var(--text-primary); }
.time-select option { background: var(--surface-2); color: var(--text-primary); padding: 8px; }

.time-stats { font-family: var(--ff-mono); font-size: 0.68rem; color: var(--text-muted); margin-bottom: 16px; }
#timeline-list { position: relative; padding-left: 20px; }
#timeline-list::before {
  content: ''; position: absolute; left: 5px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-dot {
  position: absolute; left: -20px; top: 10px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 1;
}
.timeline-item {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px; transition: all 0.2s;
}
.timeline-item:hover { border-color: var(--border-hover); background: var(--surface-2); }
.timeline-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.timeline-avatar { font-size: 1rem; }
.timeline-author { font-family: var(--ff-body); font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.timeline-time { font-family: var(--ff-mono); font-size: 0.62rem; color: var(--text-muted); margin-left: auto; }
.timeline-content { font-family: var(--ff-body); font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; word-break: break-word; }
.timeline-empty { font-family: var(--ff-body); font-size: 0.85rem; color: var(--text-muted); padding: 20px 0; }

/* ═══════════════════════════════════════════
   DATA INSIGHTS
═══════════════════════════════════════════ */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 40px;
}
.insight-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px 20px; text-align: center;
  transition: all 0.25s;
}
.insight-card:hover {
  border-color: rgba(255,122,61,0.2);
  background: var(--surface-2);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.insight-icon { font-size: 1.8rem; margin-bottom: 10px; }
.insight-val {
  font-family: var(--ff-display); font-size: 2rem; font-weight: 700;
  color: var(--accent); margin-bottom: 4px;
  text-shadow: 0 0 20px var(--accent-glow);
}
.insight-label {
  font-family: var(--ff-mono); font-size: 0.62rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}

.chart-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px; margin-bottom: 24px;
}
.chart-title {
  font-family: var(--ff-display); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--text-primary); margin-bottom: 24px;
}
.reaction-bar-chart { display: flex; flex-direction: column; gap: 12px; }
.rbar-row { display: flex; align-items: center; gap: 12px; }
.rbar-emoji { font-size: 1.3rem; width: 30px; text-align: center; }
.rbar-bg { flex: 1; height: 26px; border-radius: var(--r-sm); background: var(--surface-3); overflow: hidden; }
.rbar-fill {
  height: 100%; border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex; align-items: center; padding-left: 10px;
  font-family: var(--ff-mono); font-size: 0.65rem;
  color: rgba(255,255,255,0.9); font-weight: 600;
  min-width: 34px; white-space: nowrap;
}
.rbar-count { font-family: var(--ff-mono); font-size: 0.72rem; color: var(--text-muted); width: 30px; text-align: right; }
.word-cloud { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; padding: 20px; }
.word-item { font-family: var(--ff-body); cursor: default; transition: all 0.2s; }
.word-item:hover { color: var(--accent) !important; transform: scale(1.12); }

/* ═══════════════════════════════════════════
   NOTEBOOK
═══════════════════════════════════════════ */
.note-composer {
  background: var(--surface-1);
  border: 1px solid rgba(196,122,255,0.15);
  border-radius: var(--r-xl);
  padding: 28px; margin-bottom: 36px;
}
.note-title-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(196,122,255,0.2);
  padding: 8px 0;
  font-family: var(--ff-display); font-size: 0.9rem;
  color: var(--text-primary); outline: none; margin-bottom: 16px;
  transition: border-color 0.2s;
}
.note-title-input::placeholder { color: var(--text-muted); }
.note-title-input:focus { border-color: var(--accent-2); }

.note-body-input {
  width: 100%; min-height: 80px; resize: vertical;
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 12px; font-family: var(--ff-body); font-size: 0.875rem;
  color: var(--text-secondary); outline: none; line-height: 1.7; margin-bottom: 14px;
  transition: all 0.2s;
}
.note-body-input::placeholder { color: var(--text-muted); }
.note-body-input:focus {
  border-color: rgba(196,122,255,0.35);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px rgba(196,122,255,0.08);
}
.note-footer { display: flex; justify-content: space-between; align-items: center; }
.note-tag-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 6px 12px;
  font-family: var(--ff-mono); font-size: 0.7rem;
  color: var(--accent-2); cursor: pointer; outline: none;
  transition: all 0.2s;
}
.note-tag-select:hover { border-color: rgba(196,122,255,0.3); background: var(--surface-3); }

.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.note-card {
  background: var(--surface-1);
  border: 1px solid rgba(196,122,255,0.1);
  border-radius: var(--r-md);
  padding: 22px; transition: all 0.25s;
}
.note-card:hover {
  border-color: rgba(196,122,255,0.25);
  background: var(--surface-2);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 0 0 1px rgba(196,122,255,0.05);
}
.note-card-title {
  font-family: var(--ff-display); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.04em; color: var(--text-primary); margin-bottom: 8px;
}
.note-card-body {
  font-family: var(--ff-body); font-size: 0.8rem;
  color: var(--text-muted); line-height: 1.7;
  margin-bottom: 14px; white-space: pre-wrap; word-break: break-word;
}
.note-card-footer { display: flex; justify-content: space-between; align-items: center; }
.note-cat-badge {
  font-family: var(--ff-mono); font-size: 0.6rem; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 10px; border-radius: 999px; border: 1px solid;
  color: var(--accent-2);
  border-color: rgba(196,122,255,0.3);
  background: rgba(196,122,255,0.08);
}
.note-del-btn {
  background: none; border: 1px solid rgba(255,107,107,0.15);
  color: var(--text-muted); font-size: 0.68rem;
  padding: 3px 10px; border-radius: 4px; cursor: pointer; transition: all 0.15s;
}
.note-del-btn:hover {
  border-color: #ff6b6b; color: #ff6b6b;
  background: rgba(255,107,107,0.08);
}

/* ═══════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════ */
.about-hero { text-align: center; padding: 80px 48px 40px; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.about-info-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: all 0.25s;
}
.about-info-card:hover {
  border-color: rgba(255,122,61,0.2);
  background: var(--surface-2);
}
.about-info-title {
  font-family: var(--ff-display); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.about-info-body {
  font-family: var(--ff-body); font-size: 0.85rem;
  color: var(--text-secondary); line-height: 1.85;
}
.about-info-body a { color: var(--accent); text-decoration: none; }
.about-info-body a:hover { text-decoration: underline; }
.about-version {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,122,61,0.2);
  font-family: var(--ff-mono); font-size: 0.68rem;
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   EMOJI PICKER
═══════════════════════════════════════════ */
.emoji-picker {
  display: none; flex-wrap: wrap; gap: 4px;
  position: absolute; bottom: 100%; left: 0;
  width: 200px; padding: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md); margin-bottom: 6px; z-index: 10;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.emoji-picker.show { display: flex; }
.emoji-picker-item { font-size: 1.1rem; padding: 4px; cursor: pointer; border-radius: 4px; transition: all 0.1s; }
.emoji-picker-item:hover { background: rgba(196,122,255,0.2); transform: scale(1.2); }

/* ═══════════════════════════════════════════
   TOAST
═══════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 24px; border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--ff-body); font-size: 0.85rem;
  color: var(--text-primary); z-index: 9999;
  opacity: 0; transition: all 0.3s;
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════
   ADMIN MODAL
═══════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(8,8,10,0.88);
  backdrop-filter: blur(12px);
  align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 36px;
  max-width: 360px; width: 90%; text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.modal-box-title {
  font-family: var(--ff-display); font-size: 0.88rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--text-primary); margin-bottom: 20px;
}
.modal-box input {
  width: 100%; padding: 11px 16px; border-radius: var(--r-sm);
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--text-primary); font-family: var(--ff-body);
  font-size: 0.875rem; outline: none; margin-bottom: 16px;
  text-align: center; transition: all 0.2s;
}
.modal-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.modal-err {
  font-family: var(--ff-mono); font-size: 0.68rem;
  color: #ff6b6b; margin-bottom: 12px; display: none;
}
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-btn {
  padding: 9px 24px; border-radius: var(--r-sm);
  font-family: var(--ff-display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; transition: all 0.2s;
}
.modal-btn-cancel {
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
}
.modal-btn-ok {
  background: linear-gradient(135deg, var(--accent), #e85d04);
  color: #fff; border: none;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.modal-btn-cancel:hover { border-color: var(--border-hover); color: var(--text-primary); }

/* ═══════════════════════════════════════════
   SEARCH
═══════════════════════════════════════════ */
#search-input {
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text-primary);
  padding: 9px 14px;
  font-family: var(--ff-body); font-size: 0.875rem;
  outline: none; transition: all 0.2s;
}
#search-input::placeholder { color: var(--text-muted); }
#search-input:focus {
  border-color: rgba(255,122,61,0.4);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--surface-3);
}

/* ═══════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════ */
#pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; }
#pagination .btn-ghost {
  border-color: var(--border); color: var(--text-muted);
  padding: 7px 16px; font-size: 0.75rem;
}
#pagination .btn-ghost:hover {
  background: var(--surface-2);
  border-color: rgba(255,122,61,0.3);
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   PIN BADGE
═══════════════════════════════════════════ */
.pin-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--ff-mono); font-size: 0.6rem; letter-spacing: 0.1em;
  padding: 2px 8px; border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,122,61,0.25);
  color: var(--accent); text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════ */
.empty-state { text-align: center; padding: 72px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 14px; opacity: 0.4; }
.empty-state-text { font-family: var(--ff-body); font-size: 0.9rem; }

/* ═══════════════════════════════════════════
   SKELETON LOADER
═══════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 600px 100%;
  border-radius: 4px;
}
.sk-msg-card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px; margin-bottom: 14px;
}
.sk-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sk-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.sk-meta { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.sk-author { height: 14px; width: 100px; border-radius: 4px; }
.sk-time { height: 10px; width: 120px; border-radius: 4px; }
.sk-body { display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 12px; border-radius: 4px; }
.sk-line:nth-child(1) { width: 95%; }
.sk-line:nth-child(2) { width: 75%; }
.sk-line:nth-child(3) { width: 55%; }

.page-loading { display: flex; align-items: center; justify-content: center; min-height: 200px; }
.page-loading-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid rgba(255,122,61,0.12);
  border-top-color: var(--accent);
}

/* ═══════════════════════════════════════════
   PAGE LOADER — Cosmic initialization overlay
═══════════════════════════════════════════ */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #060b14 0%, #0a1120 40%, #070d1a 100%);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}
.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-orbit {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 32px;
}
.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid transparent;
}
.loader-ring-1 {
  border-top-color: rgba(255, 122, 61, 0.8);
  animation: loader-spin 1.2s linear infinite;
}
.loader-ring-2 {
  inset: 12px;
  border-right-color: rgba(100, 200, 255, 0.6);
  animation: loader-spin 1.8s linear infinite reverse;
}
.loader-ring-3 {
  inset: 24px;
  border-bottom-color: rgba(255, 200, 100, 0.5);
  animation: loader-spin 2.4s linear infinite;
}
.loader-core {
  position: absolute;
  inset: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  background: radial-gradient(circle at 30% 30%, rgba(255,122,61,0.25), transparent 70%);
  box-shadow: 0 0 24px rgba(255,122,61,0.15), inset 0 0 12px rgba(255,122,61,0.08);
  animation: loader-pulse 2s ease-in-out infinite;
}

.loader-text {
  font-family: var(--ff-body);
  font-size: 1rem;
  color: var(--star-fade);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.loader-sub {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: rgba(140, 160, 190, 0.35);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.loader-dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
}
.loader-dots span {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: loader-blink 1.4s infinite both;
}
.loader-dots span:nth-child(1) { animation-delay: 0s; }
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}
@keyframes loader-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}
@keyframes loader-blink {
  0%, 80%, 100% { transform: scale(0); opacity: 0; }
  40% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════
   MISC UTILITIES
═══════════════════════════════════════════ */
.view-hidden { display: none !important; }

/* ═══════════════════════════════════════════
   SCROLL REVEAL — Feature F: Staggered scroll-triggered animations
═══════════════════════════════════════════ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger delays within common containers */
.nebula-grid .scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.nebula-grid .scroll-reveal:nth-child(2) { transition-delay: 60ms; }
.nebula-grid .scroll-reveal:nth-child(3) { transition-delay: 120ms; }
.nebula-grid .scroll-reveal:nth-child(4) { transition-delay: 180ms; }
.nebula-grid .scroll-reveal:nth-child(5) { transition-delay: 240ms; }
.nebula-grid .scroll-reveal:nth-child(6) { transition-delay: 300ms; }
.nebula-grid .scroll-reveal:nth-child(7) { transition-delay: 360ms; }
.nebula-grid .scroll-reveal:nth-child(8) { transition-delay: 420ms; }

.tool-categories .scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.tool-categories .scroll-reveal:nth-child(2) { transition-delay: 80ms; }
.tool-categories .scroll-reveal:nth-child(3) { transition-delay: 160ms; }
.tool-categories .scroll-reveal:nth-child(4) { transition-delay: 240ms; }
.tool-categories .scroll-reveal:nth-child(5) { transition-delay: 320ms; }

.timeline-wrap.scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.timeline-wrap.scroll-reveal:nth-child(2) { transition-delay: 50ms; }
.timeline-wrap.scroll-reveal:nth-child(3) { transition-delay: 100ms; }
.timeline-wrap.scroll-reveal:nth-child(4) { transition-delay: 150ms; }
.timeline-wrap.scroll-reveal:nth-child(5) { transition-delay: 200ms; }
.timeline-wrap.scroll-reveal:nth-child(6) { transition-delay: 250ms; }
.timeline-wrap.scroll-reveal:nth-child(7) { transition-delay: 300ms; }
.timeline-wrap.scroll-reveal:nth-child(8) { transition-delay: 350ms; }

.note-card.scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.note-card.scroll-reveal:nth-child(2) { transition-delay: 70ms; }
.note-card.scroll-reveal:nth-child(3) { transition-delay: 140ms; }
.note-card.scroll-reveal:nth-child(4) { transition-delay: 210ms; }
.note-card.scroll-reveal:nth-child(5) { transition-delay: 280ms; }
.note-card.scroll-reveal:nth-child(6) { transition-delay: 350ms; }

.msg-list .msg-card.scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.msg-list .msg-card.scroll-reveal:nth-child(2) { transition-delay: 50ms; }
.msg-list .msg-card.scroll-reveal:nth-child(3) { transition-delay: 100ms; }
.msg-list .msg-card.scroll-reveal:nth-child(4) { transition-delay: 150ms; }
.msg-list .msg-card.scroll-reveal:nth-child(5) { transition-delay: 200ms; }
.msg-list .msg-card.scroll-reveal:nth-child(6) { transition-delay: 250ms; }
.msg-list .msg-card.scroll-reveal:nth-child(7) { transition-delay: 300ms; }
.msg-list .msg-card.scroll-reveal:nth-child(8) { transition-delay: 350ms; }

.amber-grid .amber-card.scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.amber-grid .amber-card.scroll-reveal:nth-child(2) { transition-delay: 60ms; }
.amber-grid .amber-card.scroll-reveal:nth-child(3) { transition-delay: 120ms; }
.amber-grid .amber-card.scroll-reveal:nth-child(4) { transition-delay: 180ms; }
.amber-grid .amber-card.scroll-reveal:nth-child(5) { transition-delay: 240ms; }
.amber-grid .amber-card.scroll-reveal:nth-child(6) { transition-delay: 300ms; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */

/* Very small screens (≤480px) */
@media (max-width: 480px) {
  .hero-name { font-size: 2.2rem; }
  .hero-stat-value { font-size: 1.3rem; }
  .hero-stat-label { font-size: 0.5rem; letter-spacing: 0.1em; }
  .hero-stats { gap: 14px; }
  .cap-pills { gap: 6px; }
  .cap-pill { font-size: 0.72rem; padding: 5px 12px; }
  .hero-actions { gap: 8px; }
  .btn-primary, .btn-ghost { padding: 10px 20px; font-size: 0.7rem; }
  .msg-composer { padding: 16px; }
  .section { padding: 40px 16px; }
}

/* ══════════════════════════════════════════════════════════════
   SHAKE TO REVEAL — Feature G: Playful click-to-shake animation
   Applies to: nebula-card, msg-card, note-card, insight-card,
               about-info-card, amber-card
══════════════════════════════════════════════════════════════ */

/* All interactive cards get a grab cursor hint */
.nebula-card,
.msg-card,
.note-card,
.insight-card,
.about-info-card,
.amber-card {
  cursor: pointer;
}

/* Shake animation keyframes — playful wobble */
@keyframes cardShake {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1) !important; }
  10%  { transform: translate(-6px, 3px) rotate(-4deg) scale(1.02) !important; }
  20%  { transform: translate(5px, -4px) rotate(3deg) scale(1.02) !important; }
  30%  { transform: translate(-4px, -3px) rotate(-2deg) scale(1.02) !important; }
  40%  { transform: translate(3px, 4px) rotate(2deg) scale(1.02) !important; }
  50%  { transform: translate(-2px, -2px) rotate(-1deg) scale(1.01) !important; }
  60%  { transform: translate(2px, 1px) rotate(1deg) scale(1.01) !important; }
  70%  { transform: translate(-1px, -1px) rotate(-0.5deg) scale(1) !important; }
  80%  { transform: translate(1px, 0) rotate(0.5deg) scale(1) !important; }
  90%  { transform: translate(0, 0) rotate(0deg) scale(1) !important; }
  100% { transform: translate(0, 0) rotate(0deg) scale(1) !important; }
}

/* When card is shaking — use !important to override other transforms */
.card-shaking {
  animation: cardShake 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
  position: relative;
  z-index: 10;
}

/* Golden border shimmer overlay */
.card-shake-shimmer {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg, transparent 30%, rgba(255,200,80,0.25) 50%, transparent 70%);
  background-size: 200% 200%;
  animation: shimmerSweep 0.8s ease-in-out;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
}
@keyframes shimmerSweep {
  0%   { opacity: 0; background-position: 200% 0; }
  30%  { opacity: 1; }
  100% { opacity: 0; background-position: -200% 0; }
}
.card-shaking .card-shake-shimmer {
  opacity: 1;
}

/* Secret tooltip — hidden by default, shown after shake */
.card-shake-tooltip {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 20;
  box-shadow: 0 4px 20px rgba(255,122,61,0.35);
}

/* Speech-bubble arrow */
.card-shake-tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--accent);
}
.card-shake-tooltip.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Star emoji that pops out from card on shake */
.card-shake-star {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.4rem;
  pointer-events: none;
  opacity: 0;
  transform: scale(0) rotate(-45deg);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 20;
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.6));
}
.card-shake-star.show {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}


/* ══════════════════════════════════════════════════════
   K: HERO TEXT GLITCH EFFECT
   Cyberpunk RGB-split glitch on hero-name
══════════════════════════════════════════════════════ */











#hero-name.glitching::before,



/* Glitch scanline overlay */

/* ══════════════════════════════════════════════════════
   L: PARALLAX DEPTH SCROLL
   Multiple layers move at different rates on scroll,
   creating a satisfying 3D sense of depth.
══════════════════════════════════════════════════════ */
.parallax-layer {
  will-change: transform;
  transition: transform 0.05s linear;
}

/* Hero section is the parallax root */
.hero {
  position: relative;
  overflow: visible;
}


/* Subtle scale-up on hero orb as you scroll down — orb feels closer */
#hero-orb-wrap.parallax-layer {
  transition: transform 0.08s linear;
}

/* Hero tagline floats up slightly slower than content */
.hero-tagline.parallax-layer {
  transition: transform 0.08s linear;
}

/* Hero stats float up faster — closer to viewer */
.hero-stats.parallax-layer {
  transition: transform 0.08s linear;
}

/* Capability pills float up with content */
.cap-pills.parallax-layer {
  transition: transform 0.08s linear;
}

/* Hero orb breathing intensifies slightly on scroll */

/* M: Orb clickable — shooting star trigger */
#hero-orb {
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* ══════════════════════════════════════════════════════════════
   N: WORMHOLE ARRIVAL — messages spiral in from warp tunnel
   When navigating to page 2+ of messages, cards emerge from
   a cosmic wormhole with spiral rotation + cyan glow.
══════════════════════════════════════════════════════════════ */

/* Portal ring — a glowing vortex that opens before cards arrive */



/* Individual card wormhole arrival — spiral + scale + glow */



/* Wormhole portal canvas overlay */

/* Page number badge for wormhole pages */

/* ══════════════════════════════════════════════════════
   FEATURE O: NOVA BURST — Supernova click explosion
   Clicking a nebula-card triggers a shockwave ring +
   particle burst + screen shake
══════════════════════════════════════════════════════ */

/* Nova canvas overlay — sits above everything */
/* Expanding shockwave ring — spawned at click point */



/* Card flash overlay — bright glow inside clicked card */



/* Screen shake — subtle body shake on nova trigger */


/* ══════════════════════════════════════════════════════
   FEATURE S: SINGULARITY SURGE
   Black hole + supernova burst triggered on orb click.
   Phase 1 — Accretion: dark disc grows, particles spiral inward
   Phase 2 — Collapse: rapid shrink + brightening
   Phase 3 — Burst: 80 particles explode outward + shockwave rings
══════════════════════════════════════════════════════ */

/* Screen flash on singularity burst */


/* Hero orb glow during singularity */


/* AD: Heliosphere — Solar Wind orb glow */


/* Singularity canvas overlay */

/* AL: Quantum Tunneling — warp canvas overlay */

/* ══════════════════════════════════════════════════════
   FEATURE P: COSMIC CURSOR — Stardust trail follows the mouse
   A glowing orb cursor with particle trail that follows
   mouse movement across the entire page.
═══════════════════════════════════════════════════════ */

/* Custom cursor glow dot — the bright center of the cursor */



/* ══════════════════════════════════════════════════════════════
   FEATURE T: COSMIC PULSAR BEACON
   The hero orb emits sweeping lighthouse beams at regular intervals.
══════════════════════════════════════════════════════════════ */

/* Hero orb pulsar-active state — orb glows brighter when firing */
.pulsar-beam-system {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 5;
}

.pulsar-beam {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 400px;
  margin-left: -1.5px;
  transform-origin: top center;
  border-radius: 2px;
  opacity: 0;
  background: linear-gradient(to bottom, rgba(0, 245, 212, 0.9), rgba(0, 245, 212, 0.05));
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.5), 0 0 30px rgba(0, 245, 212, 0.2);
}

.pulsar-beam.b2 {
  background: linear-gradient(to bottom, rgba(196, 122, 255, 0.9), rgba(196, 122, 255, 0.05));
  box-shadow: 0 0 12px rgba(196, 122, 255, 0.5), 0 0 30px rgba(196, 122, 255, 0.2);
}

.pulsar-beam.b3 {
  background: linear-gradient(to bottom, rgba(255, 122, 61, 0.9), rgba(255, 122, 61, 0.05));
  box-shadow: 0 0 12px rgba(255, 122, 61, 0.5), 0 0 30px rgba(255, 122, 61, 0.2);
}

.pulsar-beam-system.active .pulsar-beam.b1 {
  animation: pulsarSweep 2.5s linear forwards;
}

.pulsar-beam-system.active .pulsar-beam.b2 {
  animation: pulsarSweep 2.5s linear 0.15s forwards;
}

.pulsar-beam-system.active .pulsar-beam.b3 {
  animation: pulsarSweep 2.5s linear 0.3s forwards;
}

@keyframes pulsarSweep {
  0%   { transform: rotate(0deg) scaleY(0.3); opacity: 0; }
  8%   { transform: rotate(0deg) scaleY(1); opacity: 0.75; }
  92%  { transform: rotate(360deg) scaleY(1); opacity: 0.75; }
  100% { transform: rotate(360deg) scaleY(0.3); opacity: 0; }
}

#hero-orb.pulsing {
  animation: orbPulsarGlow 2.5s ease-out forwards;
}

@keyframes orbPulsarGlow {
  0%   { box-shadow: 0 0 0 0 rgba(0, 245, 212, 0); }
  15%  { box-shadow: 0 0 40px 10px rgba(0, 245, 212, 0.35), 0 0 80px 20px rgba(196, 122, 255, 0.15); }
  85%  { box-shadow: 0 0 40px 10px rgba(0, 245, 212, 0.35), 0 0 80px 20px rgba(196, 122, 255, 0.15); }
  100% { box-shadow: 0 0 0 0 rgba(0, 245, 212, 0); }
}

.pulsar-badge {
  position: absolute;
  left: 50%;
  top: -36px;
  transform: translateX(-50%);
  font-family: var(--ff-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #00f5d4;
  background: rgba(8, 8, 10, 0.85);
  border: 1px solid rgba(0, 245, 212, 0.35);
  border-radius: 6px;
  padding: 3px 10px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 6;
}

.pulsar-badge.show {
  animation: pulsarBadgeShow 2.5s ease-out forwards;
}

@keyframes pulsarBadgeShow {
  0%   { opacity: 0; transform: translateX(-50%) translateY(6px); }
  12%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  80%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-4px); }
}

/* ══════════════════════════════════════════════════════════════
   FEATURE U: STELLAR SHOCKWAVE
   Click the hero orb to emit a multi-ring shockwave with
   gravitational lensing distortion and background refraction.
══════════════════════════════════════════════════════════════ */

/* Hero orb flash when shockwave fires */
#hero-orb.shockwave-flash {
  animation: stellarOrbFlash 1.2s ease-out forwards;
}
@keyframes stellarOrbFlash {
  0%   { transform: scale(1); filter: brightness(1); }
  15%  { transform: scale(1.6); filter: brightness(2.5) drop-shadow(0 0 40px rgba(0, 245, 212, 0.8)); }
  40%  { transform: scale(1.3); filter: brightness(1.8) drop-shadow(0 0 25px rgba(196, 122, 255, 0.6)); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* Orbital rumble ring expanding from orb on shockwave */
.stellar-shockwave-ring {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  border: 2px solid;
  opacity: 0;
}
.stellar-shockwave-ring.cyan {
  border-color: rgba(0, 245, 212, 0.7);
  box-shadow: 0 0 40px rgba(0, 245, 212, 0.4), 0 0 80px rgba(0, 245, 212, 0.15), inset 0 0 30px rgba(0, 245, 212, 0.1);
}
.stellar-shockwave-ring.magenta {
  border-color: rgba(196, 122, 255, 0.7);
  box-shadow: 0 0 40px rgba(196, 122, 255, 0.4), 0 0 80px rgba(196, 122, 255, 0.15), inset 0 0 30px rgba(196, 122, 255, 0.1);
}
.stellar-shockwave-ring.amber {
  border-color: rgba(255, 200, 87, 0.7);
  box-shadow: 0 0 40px rgba(255, 200, 87, 0.4), 0 0 80px rgba(255, 200, 87, 0.15), inset 0 0 30px rgba(255, 200, 87, 0.1);
}
.stellar-shockwave-ring.white {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3), 0 0 60px rgba(255, 255, 255, 0.1);
}
@keyframes stellarShockwaveExpand {
  0%   { width: 20px; height: 20px; opacity: 0.9; }
  60%  { opacity: 0.4; }
  100% { width: 280vw; height: 280vw; opacity: 0; }
}
.stellar-shockwave-ring.anim-1 { animation: stellarShockwaveExpand 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.stellar-shockwave-ring.anim-2 { animation: stellarShockwaveExpand 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards; }
.stellar-shockwave-ring.anim-3 { animation: stellarShockwaveExpand 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.24s forwards; }
.stellar-shockwave-ring.anim-4 { animation: stellarShockwaveExpand 2.0s cubic-bezier(0.22, 1, 0.36, 1) 0.36s forwards; }

/* Gravitational lensing flash overlay */
.stellar-lens-flash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 245, 212, 0.08) 0%, transparent 55%);
  z-index: 9996;
  pointer-events: none;
  animation: stellarLensFade 1.5s ease-out forwards;
}
@keyframes stellarLensFade {
  0%   { opacity: 1; }
  30%  { opacity: 0.6; }
  100% { opacity: 0; }
}

/* Shockwave badge */
.stellar-shockwave-badge {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #00f5d4;
  background: rgba(8, 8, 10, 0.85);
  border: 1px solid rgba(0, 245, 212, 0.35);
  border-radius: 6px;
  padding: 4px 12px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9999;
  opacity: 0;
}
.stellar-shockwave-badge.show {
  animation: stellarBadgeShow 2s ease-out forwards;
}
@keyframes stellarBadgeShow {
  0%   { opacity: 0; transform: translate(-50%, -50%) translateY(10px); }
  15%  { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
  80%  { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) translateY(-6px); }
}

/* Canvas lensing particle layer */
.stellar-shockwave-canvas {
  position: fixed;
  inset: 0;
  z-index: 9995;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   FEATURE V: AURORA DRIFT
   Shimmering aurora borealis curtains ripple across the
   top of the page with flowing sine waves, color shifts,
   and interactive click disturbances.
══════════════════════════════════════════════════════════════ */

/* Top-edge glow strip — aurora light source */
.aurora-drift-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 55vh;
  pointer-events: none;
  z-index: 5;
  opacity: 0.55;
  mix-blend-mode: screen;
}

/* Aurora shimmer overlay — subtle horizontal bands */


/* ══════════════════════════════════════════════════════════════
   FEATURE W: GRAVITATIONAL LENS
   Cosmic warp-field distortion — mouse creates a gravitational
   lens that bends light from the cosmos with chromatic
   aberration, Einstein ring glow, and arc streaks.
══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   FEATURE X: X-RAY VISION
   Press X or click the 👁 button to reveal a holographic
   X-ray scan of every element on the page — floating tags
   show element type, ID, class list, and dimensions.
═════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════
   Z: ZERO-G FLOAT — Cards float in micro-gravity
═══════════════════════════════════════════ */




/* Zero-G float applied to cards */

/* Float card hover — lift higher + glow burst */

/* nebula-card float base state — keep existing tilt/hover */

/* msg-card float base state */

/* note-card float base state */

/* ── Float badge — "ZERO-G" pill on active cards ── */
body.xray-active .nebula-card,
body.xray-active .msg-card,
body.xray-active .note-card,
body.xray-active .insight-card,
body.xray-active .about-info-card,
body.xray-active .amber-card,
body.xray-active .timeline-item,
body.xray-active .rbar-row,
body.xray-active .word-item,
body.xray-active .heatmap > div {
  outline: 1px solid rgba(0, 245, 212, 0.45) !important;
  outline-offset: 2px;
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.18), inset 0 0 8px rgba(0, 245, 212, 0.06) !important;
}

/* Floating data tag pill */
.xray-tag {
  position: fixed;
  pointer-events: none;
  z-index: 600;
  background: rgba(8, 8, 10, 0.9);
  border: 1px solid rgba(0, 245, 212, 0.4);
  border-radius: 6px;
  padding: 4px 9px;
  font-family: var(--ff-mono);
  font-size: 0.58rem;
  color: #00f5d4;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.2), 0 4px 16px rgba(0,0,0,0.6);
  transform: translateX(-50%);
  line-height: 1.5;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xray-tag::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,245,212,0.7), transparent);
}
.xray-tag .xray-type  { color: #c084fc; font-weight: 600; margin-right: 5px; }
.xray-tag .xray-id    { color: #ffe066; margin-right: 5px; }
.xray-tag .xray-meta  { color: rgba(0,245,212,0.7); }
.xray-tag .xray-classes {
  color: rgba(196, 122, 255, 0.9);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Nav button active state */
#btn-xray.xray-on {
  color: #00f5d4;
  text-shadow: 0 0 10px rgba(0,245,212,0.9);
}

/* ── Mood Tracker ─────────────────────────────────── */
.mood-tracker {
  max-width: 600px;
  margin: 32px auto 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px 24px;
  backdrop-filter: blur(12px);
}
.mood-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mood-title {
  font-family: var(--ff-brand);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--star-fade);
  text-transform: uppercase;
}
.mood-streak {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: #ffe066;
  background: rgba(255,224,102,0.1);
  border: 1px solid rgba(255,224,102,0.2);
  border-radius: 20px;
  padding: 3px 10px;
}
.mood-emoji-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.mood-emoji-btn {
  font-size: 1.4rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.mood-emoji-btn:hover {
  background: rgba(255,255,255,0.12);
  transform: scale(1.15);
}
.mood-emoji-btn.selected {
  background: rgba(0,245,212,0.15);
  border-color: rgba(0,245,212,0.5);
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(0,245,212,0.3);
}
.mood-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.mood-note-input {
  flex: 1;
  min-width: 140px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px 14px;
  font-family: var(--ff-body);
  font-size: 0.82rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.mood-note-input::placeholder { color: rgba(255,255,255,0.3); }
.mood-note-input:focus { border-color: rgba(0,245,212,0.5); }
.mood-history {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mood-history-dot {
  position: relative;
  font-size: 1.1rem;
  cursor: default;
  transition: transform 0.2s;
}
.mood-history-dot:hover { transform: scale(1.3); }
.mood-history-dot .mood-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,10,20,0.95);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  color: var(--star-fade);
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
}
.mood-history-dot:hover .mood-tooltip { display: block; }


/* ═══════════════════════════════════════════
   AB: MAGNETAR PULSE — msg-card magnetar neutron star effect
═══════════════════════════════════════════ */

/* Persistent magnetar core glow at card center */



/* Hover: intensified magnetar flash */



/* Shockwave rings spawned on hover */



/* Second ring — teal tint, delayed */

/* Third ring — gold/amber tint */

/* MAGNETAR badge */


/* Card hover glow intensification for magnetar effect */

/* ══════════════════════════════════════════════════════
   AC: CORONAL MASS EJECTION — solar flare orb glow
══════════════════════════════════════════════════════ */

/* Screen flash on CME */


/* Hero orb glow during CME — intense solar expansion */


/* ══════════════════════════════════════════════════════════════
   FEATURE AE: QUANTUM ENTANGLEMENT LINK
   Two msg-cards can be "entangled" — a glowing energy tether
   connects them and interactions on one mirror to its twin.
══════════════════════════════════════════════════════════════ */

/* Entangled card state */
.msg-card.entangled {
  border-color: rgba(0, 245, 212, 0.35) !important;
  box-shadow:
    0 0 0 1px rgba(0, 245, 212, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(0, 245, 212, 0.08) !important;
}

/* Persistent pulse glow for entangled cards */
.msg-card.entangled::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: transparent;
  border: 1px solid rgba(0, 245, 212, 0.4);
  pointer-events: none;
  z-index: -1;
}



/* ENTANGLED badge */


/* Selection state — card chosen as first half of entanglement pair */



/* Mirror glow — shown on entangled twin when its partner is hovered */

/* Right-click un-entangle hint on entangled cards */
.msg-card.entangled .entangle-hint {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-family: var(--ff-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  color: rgba(0, 245, 212, 0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.msg-card.entangled:hover .entangle-hint {
  opacity: 1;
}

/* ── AF: Photonic Cascade ── */
/* Element gets hit by a cascade photon and pulses */


/* ── AG: Void Rift ── */
/* Rift gravity distortion on nearby elements */


/* ── AH: Event Horizon ── */
/* ── AI: Neural Cascade ── */


/* ═══════════════════════════════════════════
   AJ: ARC LIGHTNING
═══════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   AM: COSMIC STRING RESONANCE
   Vibrating cosmic filaments fired from the hero orb
══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   AN: ANTIMATTER CASCADE
   Paired matter/antimatter particles spiral inward and annihilate.
═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   AO: SUPERNOVA REMNANT
   Clicking the hero orb triggers a blinding supernova explosion.
═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   AP: STELLAR CARTOGRAPHY
   Live navigation minimap — site sections as a star constellation
   in the bottom-right corner. Click stars to navigate.
═══════════════════════════════════════════════════════════════ */



/* Light theme override */


/* ═══════════════════════════════════════════════════════════════
   AQ: Plasma Lava Lamp
   Click the hero orb to spawn plasma blobs that float upward
   with classic lava lamp metaball merging effect.
═══════════════════════════════════════════════════════════════ */



/* ═══════════════════════════════════════════════════════════════
   AU: Nebula Weaver
   Click the hero orb to fire a luminous thread that snakes
   across the screen with a glowing head and particle trail.
═══════════════════════════════════════════════════════════════ */



/* ═══════════════════════════════════════════════════════════════
   AV: Stellar Drift
   Multi-layer parallax star drift — 4 depth layers float at
   different speeds and directions creating a 3D cosmos feel.
═══════════════════════════════════════════════════════════════ */

/* Card floating for Stellar Drift */




/* ═══════════════════════════════════════════════════════════════
   AT: Chrono Lens
   Click the hero orb to fire a time-distortion lens — concentric
   rubber-sheet rings with clock-hand particles in violet/gold/cyan.
═══════════════════════════════════════════════════════════════ */



/* ═══════════════════════════════════════════════════════════════
   AV: Cosmic Kaleidoscope
   Click the hero orb to fire a rotating kaleidoscope mandala —
   mirrored triangular segments with fractal geometry and particles.
═══════════════════════════════════════════════════════════════ */



/* ═══════════════════════════════════════════════════════════════
   AU: Gravitational Wave
   Click the hero orb to fire spectacular gravitational waves —
   concentric ripples with gravitational lensing glow and particles.
═══════════════════════════════════════════════════════════════ */



/* AW: Axion Wave badge */


/* AX: Axion Flux badge */


/* AY: Photonic Sprint badge */


/* AY: Photonic Sprint canvas */

/* BA: Quasar Beacon badge */


/* BA: Quasar Beacon canvas */

/* BB: Blazar Burst canvas */

/* BB: Blazar Burst badge */


/* ══════════════════════════════════════════════════════
   BC: DIFFRACTION GRATING — Prismatic Light-Splitting
   Screen flash on orb click + floating badge
══════════════════════════════════════════════════════ */




/* ══════════════════════════════════════════════════════
   BE: Pulse Propagation — card ripple hit animation
   Cards flash cyan and lift slightly when a sonar
   pulse ring passes through them.
══════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════
   BF: Stellar Echo — recursive echo-ring reverberation
   Click the hero orb to fire staggered expanding rings
   that spawn mini-echo rings at radius thresholds.
══════════════════════════════════════════════════════ */




/* ══════════════════════════════════════════════════════
   BG: Gravitational Kicks — sweeping gravitational arcs
   that bend spacetime in curved hyperbolic trajectories.
═══════════════════════════════════════════════════════ */




/* ══════════════════════════════════════════════════════════════
   BH: PULSAR CANNON — Rapid-fire neutron star concentric rings
   Click the hero orb to fire ultra-bright concentric rings
   with gravitational shockwaves and particle spray.
══════════════════════════════════════════════════════════════ */

/* Pulsar Cannon badge */




/* ══════════════════════════════════════════════════════════════
   BI: STARDUST TRAIL — Glowing particle trail on msg-card hover
   Canvas-based sparkle particles follow cursor inside cards
══════════════════════════════════════════════════════════════ */

/* Canvas overlay inside each msg-card — sits above card content */


/* Glow halo — slightly larger & more vivid than original, but still compatible */
.msg-card-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(140, 80, 255, 0.22) 0%,
    rgba(100, 200, 255, 0.12) 35%,
    rgba(196, 122, 255, 0.08) 55%,
    transparent 75%
  );
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease;
  z-index: 0;
  filter: blur(6px);
}

/* ══════════════════════════════════════════════════════
   BN: RADIATIVE HALO — CSS Animations
══════════════════════════════════════════════════════ */




/* ══════════════════════════════════════════════════════
   BO: PHOTON SPHERE — CSS Animations
══════════════════════════════════════════════════════ */




/* ══════════════════════════════════════════════════════
   THEME TOGGLE — Topbar
══════════════════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9000;
  display: flex;
  gap: 8px;
  align-items: center;
}

.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--surface-3);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.topbar-btn:hover {
  background: var(--surface-3);
  border-color: var(--accent);
  transform: scale(1.08);
}

.topbar-btn:active {
  transform: scale(0.95);
}

/* ══════════════════════════════════════════════════════
   BP: WARP LANE
   Twin parallel relativistic beams across the viewport.
══════════════════════════════════════════════════════ */




/* ── BQ: Gamma-Ray Pulsar ── */




/* ── BR: Bessel Burst ── */




/* ══════════════════════════════════════════════════════════════
   BS: BINARY STAR ECLIPSE — Two orbiting stars with eclipse flash
   Click the hero orb to spawn a binary star system with
   gravitational rings, accretion disc, and eclipse flash.
══════════════════════════════════════════════════════════════ */












/* Burstdar canvas */

/* Burstdar badge */

/* Soliton Wave canvas */

/* ══════════════════════════════════════════════════════════════
   ZA: ZENITH ARC — Celestial rainbow arc on scroll-to-top
   When user scrolls back to top (y=0), a luminous rainbow arc
   sweeps across the viewport like a celestial aurora bridge.
══════════════════════════════════════════════════════════════ */
.zenith-arc-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 60;
}

/* ══════════════════════════════════════════════════════════════
   FEATURE B: CONFETTI CELEBRATION — Cosmic burst on message post
   A canvas-based particle explosion that fires from the message
   composer when a new message is successfully posted.
══════════════════════════════════════════════════════════════ */
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 500;
}

/* ══════════════════════════════════════════════════════════════
   FEATURE J: COSMIC DUST — Scroll-reactive particle field
   A subtle field of cosmic dust particles that drift lazily
   across the viewport and get pushed by scroll velocity.
══════════════════════════════════════════════════════════════ */
.cosmic-dust-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 48;
}

/* ══════════════════════════════════════════════════════════════════════
   FEATURE E: AMBIENT WAVE — Pulsing waveform ambient toggle
   A tiny audio toggle that renders a pulsing waveform visualization
   and plays a subtle cosmic ambient drone when active.
══════════════════════════════════════════════════════════════════════ */
.nav-audio-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--surface-3);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.3s;
}
.nav-audio-btn:hover {
  background: var(--surface-3);
  border-color: var(--accent-2);
  transform: scale(1.08);
}
.nav-audio-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}

.waveform-canvas {
  position: fixed;
  bottom: 16px;
  left: 16px;
  width: 180px;
  height: 48px;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.waveform-canvas.active {
  opacity: 1;
}

.waveform-label {
  position: fixed;
  bottom: 6px;
  left: 20px;
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 91;
  pointer-events: none;
}
.waveform-label.active {
  opacity: 0.7;
}

/* ══════════════════════════════════════════════════════════════════════
   FEATURE K: STELLAR CURSOR TRAIL — Glowing star particles follow the cursor
   A subtle cosmic trail of twinkling star particles that spawn at the
   cursor position and drift outward, fading over time. Click for burst.
══════════════════════════════════════════════════════════════════════ */
.stellar-trail-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 49;
}

/* ══════════════════════════════════════════════════════════════════════
   FEATURE C: VISITOR ORBIT — Active visitors orbit the hero orb
   Recent visitors appear as glowing satellites on elliptical paths
   around the hero orb, each with their avatar and name tooltip.
══════════════════════════════════════════════════════════════════════ */
.visitor-orbit-system {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  pointer-events: none;
  z-index: 2;
}
.orbit-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.07);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.orbit-satellite {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  animation: orbit-spin linear infinite;
}
.orbit-satellite-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 28px; height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: var(--surface-2);
  border: 1.5px solid rgba(255,122,61,0.35);
  box-shadow: 0 0 14px rgba(255,122,61,0.18), inset 0 0 6px rgba(255,255,255,0.04);
  pointer-events: auto;
  cursor: default;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}
.orbit-satellite-glow:hover {
  transform: scale(1.35);
  box-shadow: 0 0 28px rgba(255,122,61,0.45), inset 0 0 10px rgba(255,255,255,0.08);
  z-index: 10;
}
.orbit-satellite-glow::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-3);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  letter-spacing: 0.04em;
}
.orbit-satellite-glow:hover::after {
  opacity: 1;
}
@keyframes orbit-spin {
  from { transform: rotate(0deg) translateX(var(--orbit-r)) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(var(--orbit-r)) rotate(-360deg); }
}

/* ══════════════════════════════════════════════════
   QT: QUANTUM TYPEWRITER — Holographic typewriter effect
   The hero tagline types itself out with a blinking cursor
   and cycles through cosmic phrases on orb click.
══════════════════════════════════════════════════ */

#hero-tagline {
  min-height: 1.7em;
}

.quantum-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: qtCursorBlink 0.85s step-end infinite;
  box-shadow: 0 0 10px var(--accent-glow), 0 0 20px rgba(196,122,255,0.2);
  border-radius: 1px;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

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

#hero-tagline.typing {
  text-shadow: 0 0 12px rgba(255,122,61,0.12);
}

/* ══════════════════════════════════════════════════════════════════════
   TS: TYPING STARFIELD — Magical star particles when typing
   Each keystroke in an input or textarea spawns tiny glowing stars
   that float upward, drift, and fade — turning every message into
   a personal constellation.
══════════════════════════════════════════════════════════════════════ */
.typing-star {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 10px;
  line-height: 1;
  animation: typingStarFloat 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes typingStarFloat {
  0% {
    transform: translateY(0) translateX(0) scale(1) rotate(0deg);
    opacity: 1;
    filter: drop-shadow(0 0 4px currentColor);
  }
  100% {
    transform: translateY(-100px) translateX(var(--drift, 0px)) scale(0) rotate(240deg);
    opacity: 0;
    filter: drop-shadow(0 0 0px currentColor);
  }
}

.field-input.typing-glow,
.textarea-content.typing-glow,
.mood-note-input.typing-glow {
  box-shadow: 0 0 0 3px var(--accent-dim), 0 0 20px rgba(255, 122, 61, 0.18), inset 0 0 10px rgba(255, 122, 61, 0.04);
  border-color: rgba(255, 122, 61, 0.55);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

/* ═════════════════════════════════════════════════════════════════════════════════════
   MS: METEOR SHOWER — Shooting stars streak across the viewport
   Occasional glowing meteors with luminous trails drift diagonally
   across the night sky at random intervals.
═════════════════════════════════════════════════════════════════════════════════════ */
.meteor-shower-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 47;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════════
   SS: SENSOR SWEEP — Periodic holographic scan beam
   A luminous horizontal sweep line travels down the active page every
   15 seconds, briefly highlighting interactive elements with a cyan
   holographic glow and subtle grid overlay.
═══════════════════════════════════════════════════════════════════════════════════════════════════════════ */
.sensor-sweep-line {
  position: fixed;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #00f5d4 20%, #64c8ff 50%, #00f5d4 80%, transparent 100%);
  box-shadow: 0 0 8px rgba(0, 245, 212, 0.6), 0 0 24px rgba(0, 245, 212, 0.2), 0 0 48px rgba(100, 200, 255, 0.08);
  z-index: 48;
  pointer-events: none;
  opacity: 0;
  top: -2%;
}

.sensor-sweep-line.active {
  animation: sensorSweep 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes sensorSweep {
  0% { top: -2%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 102%; opacity: 0; }
}

.sensor-scanned {
  position: relative;
  animation: sensorPulse 0.7s ease-out forwards;
}

@keyframes sensorPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 245, 212, 0);
    filter: brightness(1);
  }
  25% {
    box-shadow: 0 0 16px 1px rgba(0, 245, 212, 0.35), inset 0 0 16px rgba(0, 245, 212, 0.06);
    filter: brightness(1.12);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 245, 212, 0);
    filter: brightness(1);
  }
}

.sensor-scanned::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--r-md);
  background-image:
    linear-gradient(rgba(0, 245, 212, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 212, 0.07) 1px, transparent 1px);
  background-size: 10px 10px;
  pointer-events: none;
  opacity: 0;
  animation: sensorGrid 0.7s ease-out forwards;
  z-index: 2;
}

@keyframes sensorGrid {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sensor-sweep-line,
  .sensor-scanned,
  .sensor-scanned::after {
    animation: none !important;
    opacity: 0 !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   PR: PRISMATIC RIPPLE — Chromatic click ripples
   Click on empty space to emit expanding concentric rings with
   chromatic aberration, glow, and sparkle particles.
══════════════════════════════════════════════════════════════ */
.prismatic-ripple-container {
  position: fixed;
  pointer-events: none;
  z-index: 100;
  transform: translate(-50%, -50%);
}

.prismatic-ripple-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid;
  opacity: 0;
}

.prismatic-ripple-ring.cyan {
  border-color: rgba(0, 245, 212, 0.85);
  box-shadow: 0 0 24px rgba(0, 245, 212, 0.5), inset 0 0 20px rgba(0, 245, 212, 0.08);
}

.prismatic-ripple-ring.magenta {
  border-color: rgba(255, 78, 205, 0.85);
  box-shadow: 0 0 24px rgba(255, 78, 205, 0.5), inset 0 0 20px rgba(255, 78, 205, 0.08);
}

.prismatic-ripple-ring.amber {
  border-color: rgba(255, 200, 87, 0.85);
  box-shadow: 0 0 24px rgba(255, 200, 87, 0.5), inset 0 0 20px rgba(255, 200, 87, 0.08);
}

@keyframes prismaticRippleExpand {
  0%   { width: 0; height: 0; opacity: 0.9; }
  50%  { opacity: 0.45; }
  100% { width: 380px; height: 380px; opacity: 0; }
}

.prismatic-ripple-ring.anim-1 {
  animation: prismaticRippleExpand 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.prismatic-ripple-ring.anim-2 {
  animation: prismaticRippleExpand 1.05s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.08s forwards;
}

.prismatic-ripple-ring.anim-3 {
  animation: prismaticRippleExpand 1.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.16s forwards;
}

.prismatic-ripple-sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  pointer-events: none;
}

.prismatic-ripple-flash {
  position: fixed;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.09) 0%, transparent 50%);
  pointer-events: none;
  z-index: 99;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* ══════════════════════════════════════════════════════════════
   FEATURE ZG: ZERO-GRAVITY FLOAT — Elements gently float upward
   with sine-wave drift, creating an ethereal anti-gravity feel
   on the hero section. Pure CSS animation, no JS needed.
   ══════════════════════════════════════════════════════════════ */
.zero-gravity-float {
  animation: zeroGravityFloat 6s ease-in-out infinite;
}
@keyframes zeroGravityFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-12px) rotate(1deg); }
  50% { transform: translateY(-6px) rotate(-0.5deg); }
  75% { transform: translateY(-18px) rotate(0.5deg); }
}

.zero-gravity-float-delay-1 { animation-delay: -1.5s; }
.zero-gravity-float-delay-2 { animation-delay: -3s; }
.zero-gravity-float-delay-3 { animation-delay: -4.5s; }

/* Subtle glow pulse on floating elements */
.zero-gravity-float .hero-stat-value,
.zero-gravity-float .cap-pill {
  animation: zeroGravityGlow 4s ease-in-out infinite;
}
@keyframes zeroGravityGlow {
  0%, 100% { text-shadow: 0 0 20px var(--accent-glow); }
  50% { text-shadow: 0 0 40px var(--accent-glow), 0 0 60px rgba(255,122,61,0.1); }
}

/* Light theme adjustments */
:root.light .zero-gravity-float .hero-stat-value,
:root.light .zero-gravity-float .cap-pill {
  animation: zeroGravityGlowLight 4s ease-in-out infinite;
}
@keyframes zeroGravityGlowLight {
  0%, 100% { text-shadow: 0 0 10px var(--accent-glow); }
  50% { text-shadow: 0 0 20px var(--accent-glow), 0 0 30px rgba(232,93,4,0.08); }
}

/* ───────────────────────────────────────────────────────────────────────
   HD: HYPERDRIVE JUMP — Warp-speed starfield burst
   Shift+Click anywhere to trigger a hyperspace jump: stars
   stretch into streaks and accelerate toward the viewer.
─────────────────────────────────────────────────────────────────────── */
.hyperdrive-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 200;
}

/* ══════════════════════════════════════════════════════════════
   VL: VOID LANTERNS — Ethereal floating lanterns drift upward
   from the bottom edge with a gentle sway, warm glow, and
   flicker. Click to pop them into a burst of matching sparks.
══════════════════════════════════════════════════════════════ */
.void-lantern {
  position: fixed;
  z-index: 25;
  pointer-events: auto;
  cursor: pointer;
  width: 32px;
  height: 44px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  will-change: transform, opacity;
  animation:
    lanternRise 14s linear forwards,
    lanternSway 3.5s ease-in-out infinite alternate,
    lanternGlowPulse 2.2s ease-in-out infinite;
}

.void-lantern::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 55%;
  height: 55%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.2) 45%, transparent 70%);
  filter: blur(1px);
  opacity: 0.85;
}

.void-lantern::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 5px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: transparent;
}

.void-lantern.pop {
  opacity: 0 !important;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

@keyframes lanternRise {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  8%   { opacity: 1; transform: translateY(-8vh) scale(1); }
  92%  { opacity: 1; }
  100% { transform: translateY(-110vh) scale(0.85); opacity: 0; }
}

@keyframes lanternSway {
  0%   { margin-left: -18px; }
  100% { margin-left: 18px; }
}

@keyframes lanternGlowPulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.25); }
}

.void-lantern-spark {
  position: fixed;
  z-index: 26;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  animation: lanternSparkFly 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes lanternSparkFly {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   OC: ORBITAL CURSOR — Tiny cosmic satellites orbit the cursor
   when idle. Four colored planetoids circle at different speeds
   and distances, scattering on mouse movement.
══════════════════════════════════════════════════════════════ */
.cursor-orbit-system {
  position: fixed;
  left: 0; top: 0;
  width: 0; height: 0;
  pointer-events: none;
  z-index: 9998;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.cursor-orbit-system.active {
  opacity: 1;
}

.cursor-orbit-core {
  position: absolute;
  left: 0; top: 0;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
}

.cursor-satellite {
  position: absolute;
  left: 0; top: 0;
  width: 5px; height: 5px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px currentColor, 0 0 14px currentColor;
  opacity: 0.9;
}

@keyframes orbitCursor1 {
  from { transform: translate(-50%, -50%) rotate(0deg) translateX(22px); }
  to   { transform: translate(-50%, -50%) rotate(360deg) translateX(22px); }
}
@keyframes orbitCursor2 {
  from { transform: translate(-50%, -50%) rotate(0deg) translateX(32px); }
  to   { transform: translate(-50%, -50%) rotate(360deg) translateX(32px); }
}
@keyframes orbitCursor3 {
  from { transform: translate(-50%, -50%) rotate(0deg) translateX(16px); }
  to   { transform: translate(-50%, -50%) rotate(360deg) translateX(16px); }
}
@keyframes orbitCursor4 {
  from { transform: translate(-50%, -50%) rotate(0deg) translateX(26px); }
  to   { transform: translate(-50%, -50%) rotate(360deg) translateX(26px); }
}

.cursor-satellite.s1 {
  color: #ffc857;
  background: #ffc857;
  animation: orbitCursor1 2.2s linear infinite;
}
.cursor-satellite.s2 {
  color: #00f5d4;
  background: #00f5d4;
  animation: orbitCursor2 3.1s linear infinite;
  animation-delay: -0.7s;
}
.cursor-satellite.s3 {
  color: #ff4ecd;
  background: #ff4ecd;
  animation: orbitCursor3 4.0s linear infinite;
  animation-delay: -1.3s;
}
.cursor-satellite.s4 {
  color: #ffffff;
  background: #ffffff;
  animation: orbitCursor4 2.8s linear infinite;
  animation-delay: -2.1s;
}

/* ═══════════════════════════════════════════════════════════════════════
   LP: LUNAR PULSE — Spacebar-triggered silver moon pulse wave
   A luminous silver wave rises from the bottom edge, briefly
   illuminating cards with a lunar glow as it passes through.
═══════════════════════════════════════════════════════════════════════ */
.lunar-pulse-wave {
  position: fixed;
  bottom: -100px;
  left: 0;
  width: 100vw;
  height: 140px;
  background: linear-gradient(
    to top,
    rgba(200, 210, 230, 0) 0%,
    rgba(200, 210, 230, 0.10) 25%,
    rgba(220, 230, 255, 0.22) 50%,
    rgba(200, 210, 230, 0.10) 75%,
    rgba(200, 210, 230, 0) 100%
  );
  filter: blur(24px);
  pointer-events: none;
  z-index: 60;
  animation: lunarPulseRise 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes lunarPulseRise {
  0%   { transform: translateY(0); opacity: 0; }
  12%  { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-110vh); opacity: 0; }
}

.lunar-pulse-glow {
  animation: lunarCardGlow 2.5s ease-out forwards;
}

@keyframes lunarCardGlow {
  0%   { box-shadow: 0 0 0 0 rgba(200, 210, 230, 0); border-color: transparent; }
  25%  { box-shadow: 0 0 24px 4px rgba(200, 210, 230, 0.18), 0 0 48px 10px rgba(200, 210, 230, 0.09); border-color: rgba(200, 210, 230, 0.30) !important; }
  55%  { box-shadow: 0 0 24px 4px rgba(200, 210, 230, 0.18), 0 0 48px 10px rgba(200, 210, 230, 0.09); border-color: rgba(200, 210, 230, 0.30) !important; }
  100% { box-shadow: 0 0 0 0 rgba(200, 210, 230, 0); border-color: transparent; }
}

.lunar-pulse-moon {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(240, 245, 255, 0.95), rgba(200, 210, 230, 0.45));
  box-shadow: 0 0 24px rgba(200, 210, 230, 0.35), 0 0 48px rgba(200, 210, 230, 0.12);
  opacity: 0;
  pointer-events: none;
  z-index: 61;
  animation: lunarMoonFade 2.5s ease-out forwards;
}

@keyframes lunarMoonFade {
  0%   { opacity: 0; transform: scale(0.5); }
  12%  { opacity: 1; transform: scale(1); }
  80%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.8); }
}

/* ══════════════════════════════════════════════════════
   SF: SOLAR FLARE — Triple-click hero orb for coronal
   mass ejection with screen flash, shockwave, and
   particle burst.
══════════════════════════════════════════════════════ */

.solar-flare-flash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 248, 220, 0.95) 0%, rgba(255, 200, 100, 0.7) 40%, rgba(255, 122, 61, 0.3) 100%);
  z-index: 9998;
  pointer-events: none;
  animation: solarFlashFade 0.9s ease-out forwards;
}

@keyframes solarFlashFade {
  0%   { opacity: 1; }
  25%  { opacity: 0.8; }
  100% { opacity: 0; }
}

.solar-flare-shockwave {
  position: fixed;
  border-radius: 50%;
  border: 2px solid rgba(255, 200, 87, 0.7);
  box-shadow: 0 0 60px rgba(255, 122, 61, 0.5), 0 0 120px rgba(255, 200, 87, 0.25), inset 0 0 40px rgba(255, 200, 87, 0.15);
  pointer-events: none;
  z-index: 9997;
  animation: solarShockwaveExpand 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes solarShockwaveExpand {
  0%   { width: 10px; height: 10px; opacity: 1; margin-left: -5px; margin-top: -5px; }
  100% { width: 250vw; height: 250vw; opacity: 0; margin-left: -125vw; margin-top: -125vw; }
}

#hero-orb.flaring {
  animation: solarOrbFlare 1.2s ease-out forwards;
}

@keyframes solarOrbFlare {
  0%   { transform: scale(1); filter: brightness(1); }
  15%  { transform: scale(2.2); filter: brightness(3) drop-shadow(0 0 30px rgba(255, 200, 87, 0.8)); }
  40%  { transform: scale(1.6); filter: brightness(2) drop-shadow(0 0 20px rgba(255, 122, 61, 0.6)); }
  100% { transform: scale(1); filter: brightness(1); }
}

.solar-flare-canvas {
  position: fixed;
  inset: 0;
  z-index: 9996;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════
   AB: ETHEREAL FIREFLIES — Bioluminescent swarm that
   drifts organically across the viewport, gently drawn
   to the cursor like moths to a lantern.
══════════════════════════════════════════════════════ */
.firefly-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   Y: GRAVITY SWARM — Cursor-attracted luminous particles
   A field of glowing particles drifts lazily across the viewport.
   When the cursor moves near, particles are drawn toward it by a
   gentle gravitational force. Clicking creates a repulsive burst
   that scatters nearby particles before gravity pulls them back.
═══════════════════════════════════════════════════════════════════════ */
.gravity-swarm-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* ═════════════════════════════════════════════════════════════════════════════════════════
   CV: COMET VELOCITY — Speed-triggered cursor trail particles
   When the cursor moves rapidly across the viewport, glowing
   icy particles spawn along the trajectory, mimicking a comet's
   tail. Cyan, white, and violet sparks drift outward and fade.
════════════════════════════════════════════════════════════════════════════════════════ */
.comet-particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  animation: cometFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes cometFade {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(0.15); opacity: 0; }
}
.comet-particle.cyan {
  width: 6px; height: 6px;
  background: radial-gradient(circle, #64c8ff, transparent 70%);
  box-shadow: 0 0 8px #64c8ff, 0 0 16px rgba(100,200,255,0.4);
}
.comet-particle.white {
  width: 3px; height: 3px;
  background: radial-gradient(circle, #ffffff, transparent 70%);
  box-shadow: 0 0 6px #ffffff, 0 0 12px rgba(255,255,255,0.35);
}
.comet-particle.violet {
  width: 5px; height: 5px;
  background: radial-gradient(circle, #c47aff, transparent 70%);
  box-shadow: 0 0 8px #c47aff, 0 0 16px rgba(196,122,255,0.4);
}

/* ══════════════════════════════════════════════════════
   SP: SCROLL PROGRESS COSMIC BAR
   A glowing cosmic progress bar that tracks scroll position
══════════════════════════════════════════════════════ */
.scroll-progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff7a3d, #c47aff, #ffc857, #00f5d4, #ff7a3d);
  background-size: 200% 100%;
  box-shadow: 0 0 8px rgba(196,122,255,0.5), 0 0 16px rgba(255,122,61,0.3);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
  animation: scrollProgressShift 3s linear infinite;
  border-radius: 0 1px 1px 0;
}

@keyframes scrollProgressShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes scrollSparklePop {
  0% { transform: translate(-50%, 0) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -10px) scale(0); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════════════
   CE: CELEBRATION ECHO — Enhanced message posting celebration
   Supernova particle burst from the send button + composer glow
   + floating text — a cosmic celebration when a message is born.
══════════════════════════════════════════════════════════════ */

/* Supernova burst canvas — full-screen overlay for send button explosion */
.supernova-burst-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* Composer glow — golden aura around the message composer during post */
.composer-glow {
  animation: composerGlowPulse 1.2s ease-out forwards;
}

@keyframes composerGlowPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 200, 87, 0); }
  20%  { box-shadow: 0 0 30px 4px rgba(255, 200, 87, 0.35), 0 0 60px 8px rgba(255, 122, 61, 0.15), inset 0 0 20px rgba(255, 200, 87, 0.08); border-color: rgba(255, 200, 87, 0.5) !important; }
  50%  { box-shadow: 0 0 40px 6px rgba(255, 200, 87, 0.30), 0 0 80px 12px rgba(255, 122, 61, 0.12), inset 0 0 30px rgba(255, 200, 87, 0.06); border-color: rgba(255, 200, 87, 0.4) !important; }
  100% { box-shadow: 0 0 0 0 rgba(255, 200, 87, 0); }
}

/* Floating celebration text */
.celebration-float-text {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-family: var(--ff-brand);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffc857;
  text-shadow: 0 0 12px rgba(255, 200, 87, 0.6), 0 0 24px rgba(255, 122, 61, 0.3);
  opacity: 0;
  transform: translate(-50%, 0);
  animation: celebrationFloatUp 2s ease-out forwards;
}

@keyframes celebrationFloatUp {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0.8); }
  15%  { opacity: 1; transform: translate(-50%, -20px) scale(1); }
  70%  { opacity: 1; transform: translate(-50%, -80px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -120px) scale(0.9); }
}

/* Send button supernova flash */
.btn-send.supernova-flash {
  animation: sendSupernovaFlash 0.6s ease-out forwards;
}

@keyframes sendSupernovaFlash {
  0%   { transform: scale(1); filter: brightness(1); }
  30%  { transform: scale(1.4); filter: brightness(2.5) drop-shadow(0 0 20px rgba(255, 200, 87, 0.8)); }
  60%  { transform: scale(1.2); filter: brightness(1.8) drop-shadow(0 0 12px rgba(255, 122, 61, 0.5)); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* ══════════════════════════════════════════════════════════════════════
   NE: NEURAL ECHO — When a new message is posted, its card
   briefly echoes: a subtle ripple ring expands from the card
   while the card itself "breathes" with a scale pulse, and
   a trail of tiny particles drifts upward like fading thoughts.
══════════════════════════════════════════════════════════════ */

.neural-echo-ring {
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  animation: neuralEchoRing 1.4s ease-out forwards;
}

@keyframes neuralEchoRing {
  0%   { transform: scale(1); opacity: 0.6; border-width: 3px; }
  50%  { transform: scale(1.08); opacity: 0.25; }
  100% { transform: scale(1.2); opacity: 0; border-width: 0px; }
}

.neural-echo-pulse {
  animation: neuralEchoPulse 0.9s ease-in-out;
}

@keyframes neuralEchoPulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.015); }
  60%  { transform: scale(0.995); }
  100% { transform: scale(1); }
}

.neural-echo-particle {
  position: fixed;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  animation: neuralEchoParticle 1.6s ease-out forwards;
}

@keyframes neuralEchoParticle {
  0%   { opacity: 0.8; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.2); }
}

.neural-echo-badge {
  position: fixed;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface-1);
  border: 1px solid var(--accent);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -100%);
  animation: neuralEchoBadge 2s ease-out forwards;
  box-shadow: 0 0 12px var(--accent-glow);
}

@keyframes neuralEchoBadge {
  0%   { opacity: 0; transform: translate(-50%, -80%) scale(0.8); }
  15%  { opacity: 1; transform: translate(-50%, -120%) scale(1); }
  70%  { opacity: 1; transform: translate(-50%, -140%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -180%) scale(0.9); }
}

/* ══════════════════════════════════════════════════════════════
   DW: DIMENSIONAL WARP — 3D perspective page transition
   When navigating between pages, the outgoing page recedes into
   the distance (scale down + blur + fade) while the incoming page
   emerges from deep space (scale up + unblur + fade in).
   A subtle chromatic aberration flash accompanies the transition.
══════════════════════════════════════════════════════════════ */

.page.dim-warp-out {
  animation: dimWarpOut 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

.page.dim-warp-in {
  animation: dimWarpIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes dimWarpOut {
  0%   { transform: perspective(1200px) translateZ(0) scale(1); opacity: 1; filter: blur(0px); }
  60%  { transform: perspective(1200px) translateZ(-200px) scale(0.88) rotateX(2deg); opacity: 0.5; filter: blur(2px); }
  100% { transform: perspective(1200px) translateZ(-400px) scale(0.75) rotateX(4deg); opacity: 0; filter: blur(6px); }
}

@keyframes dimWarpIn {
  0%   { transform: perspective(1200px) translateZ(-300px) scale(0.82) rotateX(-3deg); opacity: 0; filter: blur(4px); }
  50%  { transform: perspective(1200px) translateZ(-80px) scale(0.96) rotateX(-1deg); opacity: 0.7; filter: blur(1px); }
  100% { transform: perspective(1200px) translateZ(0) scale(1) rotateX(0deg); opacity: 1; filter: blur(0px); }
}

/* Chromatic aberration flash overlay during warp */
.dim-warp-flash {
  position: fixed;
  inset: 0;
  z-index: 98;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255,122,61,0.08) 0%, transparent 70%);
  opacity: 0;
  animation: dimWarpFlash 0.5s ease-out forwards;
}

@keyframes dimWarpFlash {
  0%   { opacity: 0.6; }
  100% { opacity: 0; }
}

/* Star streak particles during warp transition */
.dim-warp-streak {
  position: fixed;
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.6), transparent);
  border-radius: 1px;
  pointer-events: none;
  z-index: 97;
  opacity: 0;
  animation: dimWarpStreak 0.4s ease-out forwards;
}

@keyframes dimWarpStreak {
  0%   { opacity: 0.8; transform: translateY(-30px) scaleY(0.3); }
  50%  { opacity: 1; transform: translateY(20px) scaleY(1); }
  100% { opacity: 0; transform: translateY(80px) scaleY(0.5); }
}

/* ══════════════════════════════════════════════════════════════
   FEATURE Y: YEAR PROGRESS BAR — Cosmic year timeline footer
   Shows annual progress with orbital milestone markers
   ══════════════════════════════════════════════════════════════ */
.year-progress-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: linear-gradient(to top, rgba(8,8,10,0.95) 0%, rgba(8,8,10,0.7) 60%, transparent 100%);
  padding: 16px 24px 12px;
  pointer-events: none;
  transform: translateY(70%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.year-progress-footer:hover {
  transform: translateY(0);
  pointer-events: auto;
}
.year-progress-footer.visible {
  transform: translateY(0);
}

.year-progress-inner {
  max-width: 900px;
  margin: 0 auto;
}

.year-progress-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.year-progress-icon {
  font-size: 0.85rem;
  filter: grayscale(0.3);
  animation: yearIconPulse 3s ease-in-out infinite;
}
@keyframes yearIconPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

.year-progress-text {
  color: var(--accent);
  font-weight: 600;
}

.year-progress-days {
  margin-left: auto;
  font-size: 0.6rem;
  opacity: 0.7;
}

.year-progress-track {
  position: relative;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: visible;
}

.year-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 2px;
  width: 0%;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.year-progress-glow {
  position: absolute;
  top: -3px;
  left: 0;
  height: 10px;
  width: 20px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: left 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0.8;
  animation: yearGlowPulse 2s ease-in-out infinite;
}
@keyframes yearGlowPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.3); }
}

.year-progress-milestones {
  position: relative;
  height: 14px;
  margin-top: 4px;
}

.year-progress-milestone {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.year-progress-milestone-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.3s;
}
.year-progress-milestone:hover .year-progress-milestone-dot,
.year-progress-milestone.passed .year-progress-milestone-dot {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

.year-progress-milestone-label {
  font-family: var(--ff-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.year-progress-milestone:hover .year-progress-milestone-label,
.year-progress-milestone.passed .year-progress-milestone-label {
  opacity: 1;
  color: var(--accent);
}

/* Light theme adjustments */
:root.light .year-progress-footer {
  background: linear-gradient(to top, rgba(247,246,243,0.95) 0%, rgba(247,246,243,0.7) 60%, transparent 100%);
}
:root.light .year-progress-track {
  background: var(--surface-3);
}
:root.light .year-progress-fill {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}

/* ══════════════════════════════════════════════════════════════════════
   FEATURE Q: QUANTUM ECHO — Keyboard typing echo effect
   When typing in any input field, a subtle echo ripple emanates
   from the cursor position, creating a tactile cosmic feedback.
══════════════════════════════════════════════════════════════════════ */
.quantum-echo-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 48;
}
.quantum-echo-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: quantum-echo-float 1.2s ease-out forwards;
}
@keyframes quantum-echo-float {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0.8;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: translate(var(--echo-dx), var(--echo-dy)) scale(0);
    opacity: 0;
  }
}
