/* ═══════════════════════════════════════════════
   SNIN Client v8.56 — DESIGN FORGE LUXURY
   theme-luxury personality: Elegant, deliberate, warm.
   Gold accents, charcoal void, glass morphism.
   Emil Kowalski animation standards (14.3K ★)
   ═══════════════════════════════════════════════ */

:root {
  /* ═══ SURFACE: charcoal void (60%) ═══ */
  --bg-root: #08080f;
  --white: #ffffff;
  --bg-surface: rgba(12, 12, 22, 0.94);
  --bg-card: rgba(18, 18, 32, 0.72);
  --bg-card-hover: rgba(24, 24, 42, 0.88);
  --bg-input: rgba(255, 255, 255, 0.04);

  /* ═══ BORDER: warm gold traces ═══ */
  --border-dim: rgba(212, 163, 115, 0.05);
  --border-subtle: rgba(212, 163, 115, 0.10);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-active: rgba(212, 163, 115, 0.45);

  /* ═══ TEXT: warm white (30%) ═══ */
  --text-primary: #efe9df;
  --text-secondary: #b8b0a4;
  --text-muted: #7a7268;
  --text-dim: #4a4440;

  /* ═══ ACCENT: warm gold (10%) ═══ */
  --accent: #d4a373;
  --accent-rgb: 212, 163, 115;
  --accent-light: #e8c9a0;
  --accent-glow: rgba(212, 163, 115, 0.35);
  --accent-glow-strong: rgba(212, 163, 115, 0.55);
  --zk-green: #22c55e;
  --zk-green-rgb: 34, 197, 94;
  --zk-green-glow: rgba(34, 197, 94, 0.3);

  /* Accent aliases (backward compat) */
  --accent-mint: var(--accent);
  --accent-mint-glow: var(--accent-glow);
  --accent-cyan: var(--accent);
  --accent-cyan-glow: var(--accent-glow);
  --accent-warm: #e8a850;
  --accent-warm-glow: rgba(232, 168, 80, 0.4);
  --accent-rose: #c97a6a;
  --accent-rose-glow: rgba(201, 122, 106, 0.35);
  --accent-purple: #9b8ec4;
  --accent-purple-glow: rgba(155, 142, 196, 0.35);
  --accent-sky: #8aafc8;
  --accent-sky-glow: rgba(138, 175, 200, 0.3);

  /* ═══ STATUS COLORS ═══ */
  --success: #22c55e;
  --success-glow: rgba(34, 197, 94, 0.35);
  --danger: #ff4d6a;
  --danger-glow: rgba(255, 77, 106, 0.35);
  --zap: #f3c623;
  --zap-glow: rgba(243, 198, 35, 0.4);
  --warning: #f5a623;
  --warning-glow: rgba(245, 166, 35, 0.35);  --accent-gold: var(--accent);
  --accent-gold-glow: var(--accent-glow);
  --accent-green: #8aaa8a;
  --accent-green-glow: rgba(138, 170, 138, 0.3);

  /* Legacy neon refs — remapped to gold */
  --neon-cyan: var(--accent);
  --neon-cyan-glow: var(--accent-glow);
  --neon-magenta: #c97a6a;
  --neon-magenta-glow: rgba(201, 122, 106, 0.35);
  --neon-purple: #9b8ec4;
  --neon-purple-glow: rgba(155, 142, 196, 0.35);
  --neon-lime: #8aaa8a;
  --neon-lime-glow: rgba(138, 170, 138, 0.3);
  --neon-amber: #e8a850;

  /* ═══ EASING (design-rules) ═══ */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* ═══ DURATIONS ═══ */
  --dur-fast: 120ms;
  --dur-normal: 180ms;
  --dur-slow: 250ms;
  --dur-modal: 300ms;
  --neon-amber-glow: rgba(232, 168, 80, 0.4);

  /* ═══ STATUS COLORS ═══ */
  --status-online: #6aaa7a;
  --status-away: #e8a850;
  --status-error: #c97a6a;
  --success: #6aaa7a;
  --warning: #e8a850;
  --danger: #c97a6a;

  /* ═══ RADIUS ═══ */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* ═══ TYPOGRAPHY ═══ */
  --font-body: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --text-xs: 10px;
  --text-sm: 12px;
  --text-base: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-display: 48px;
  --leading-tight: 1.2;
  --leading-normal: 1.55;
  --leading-relaxed: 1.75;
  --tracking-tight: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.03em;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* ═══ SHADOWS: Freud multi-layer depth (SPEC V7 A1) ═══ */
  --shadow-card:
    0 1px 2px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 0 1px var(--border-glass);
  --shadow-card-hover:
    0 2px 4px rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(72, 187, 120, 0.08),
    0 0 0 1px var(--border-active);
  --shadow-elevated:
    0 4px 8px rgba(0, 0, 0, 0.12),
    0 12px 36px rgba(0, 0, 0, 0.28),
    0 0 0 1px var(--border-glass);

  /* ═══ EASING (Design Forge v3.4) ═══ */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-spring: cubic-bezier(0.22, 0.95, 0.34, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* DF easing tokens */
  --df-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --df-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --df-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --df-spring-default: cubic-bezier(0.22, 0.95, 0.34, 1);
  --df-spring-snappy: cubic-bezier(0.22, 0.95, 0.28, 1);
  --df-spring-bouncy: cubic-bezier(0.22, 0.95, 0.22, 1.02);

  /* Duration tokens */
  --df-duration-press: 160ms;
  --df-duration-tooltip: 150ms;
  --df-duration-dropdown: 200ms;
  --df-duration-modal: 350ms;
  --df-duration-drawer: 400ms;
  --df-duration-stagger: 50ms;

  /* Spatial tokens */
  --df-blur-material: 20px;
  --df-blur-heavy: 40px;
  --df-opacity-material: 0.6;
  --df-opacity-scrim: 0.4;

  /* Misc */
  --focus-ring: 0 0 0 2px var(--bg-root), 0 0 0 4px #48BB78;
  --focus-ring-gap: 6px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 72px;
}

/* ═══ UTILITY CLASSES — Phase 3a ═══ */
.text-xs-dim { font-size: 12px; color: var(--text-dim); }
.text-sm-dim { font-size: 13px; color: var(--text-dim); }
.text-2xs-dim { font-size: 11px; color: var(--text-dim); }
.text-2xs-accent { font-size: 11px; color: var(--accent); }
.text-xs-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; display: block; }
.text-center-padded { padding: 40px 20px; text-align: center; }
.card-section { padding: 14px; border-radius: 12px; background: var(--glass-bg); margin-bottom: 12px; }
.flex-end-gap { display: flex; gap: 8px; justify-content: flex-end; }
.empty-dim { color: var(--text-dim); text-align: center; padding: 40px; }
.text-dim { color: var(--text-dim); }
.text-label { font-weight: 600; font-size: 15px; }
.text-xs-mb { margin-bottom: 8px; font-size: 12px; }
.block-mb { display: block; margin-bottom: 12px; }
.section-label { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.text-sm-muted { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }

.text-3xs-dim { font-size: 10px; color: var(--text-dim); }
.mt6-xs { margin-top: 6px; font-size: 11px; }
.ml-auto-xs-dim { margin-left: auto; font-size: 11px; color: var(--text-dim); }
.text-center-dim { text-align: center; padding: 40px; color: var(--text-dim); }
.text-center-py { text-align: center; padding: 20px 0; }
.avatar-circle-xs { width: 24px; height: 24px; border-radius: 50%; }
.avatar-circle-sm { width: 28px; height: 28px; border-radius: 50%; }
.avatar-circle-md { width: 64px; height: 64px; border-radius: 50%; }
.avatar-circle-full { width: 100%; height: 100%; border-radius: 50%; }
.section-max-sm { max-width: 400px; padding: 20px; }
.section-max-md { max-width: 420px; padding: 20px; }
.icon-lg { font-size: 40px; margin-bottom: 12px; }
.icon-md { font-size: 32px; margin-bottom: 8px; }
.tag-sm { font-size: 12px; padding: 5px 10px; }

/* ===== Design Forge V3.1 — Scroll Reveal + Stagger ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 500ms var(--df-ease-out),
    transform 500ms var(--df-ease-out);
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal-blur {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(4px);
  transition:
    opacity 500ms var(--df-ease-out),
    transform 500ms var(--df-ease-out),
    filter 500ms var(--df-ease-out);
}
.scroll-reveal-blur.revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Stagger system — cards animate sequentially */
.stagger-container .stagger-item,
.stagger-fast .stagger-item {
  opacity: 0;
  transform: translateY(16px);
}
.stagger-container.stagger-active .stagger-item {
  animation: dfStaggerIn 400ms var(--df-ease-out) forwards;
}
.stagger-fast.stagger-active .stagger-item {
  animation: dfStaggerIn 300ms var(--df-ease-out) forwards;
}
@keyframes dfStaggerIn {
  to { opacity: 1; transform: translateY(0); }
}

/* nth-child delays — 50ms default */
.stagger-container.stagger-active .stagger-item:nth-child(1) { animation-delay: 0ms; }
.stagger-container.stagger-active .stagger-item:nth-child(2) { animation-delay: 50ms; }
.stagger-container.stagger-active .stagger-item:nth-child(3) { animation-delay: 100ms; }
.stagger-container.stagger-active .stagger-item:nth-child(4) { animation-delay: 150ms; }
.stagger-container.stagger-active .stagger-item:nth-child(5) { animation-delay: 200ms; }
.stagger-container.stagger-active .stagger-item:nth-child(6) { animation-delay: 250ms; }
.stagger-container.stagger-active .stagger-item:nth-child(7) { animation-delay: 300ms; }
.stagger-container.stagger-active .stagger-item:nth-child(8) { animation-delay: 350ms; }
.stagger-container.stagger-active .stagger-item:nth-child(9) { animation-delay: 400ms; }
.stagger-container.stagger-active .stagger-item:nth-child(10) { animation-delay: 450ms; }

/* Fast stagger — 30ms */
.stagger-fast.stagger-active .stagger-item:nth-child(1)  { animation-delay: 0ms; }
.stagger-fast.stagger-active .stagger-item:nth-child(2)  { animation-delay: 30ms; }
.stagger-fast.stagger-active .stagger-item:nth-child(3)  { animation-delay: 60ms; }
.stagger-fast.stagger-active .stagger-item:nth-child(4)  { animation-delay: 90ms; }
.stagger-fast.stagger-active .stagger-item:nth-child(5)  { animation-delay: 120ms; }
.stagger-fast.stagger-active .stagger-item:nth-child(6)  { animation-delay: 150ms; }
.stagger-fast.stagger-active .stagger-item:nth-child(7)  { animation-delay: 180ms; }
.stagger-fast.stagger-active .stagger-item:nth-child(8)  { animation-delay: 210ms; }
.stagger-fast.stagger-active .stagger-item:nth-child(9)  { animation-delay: 240ms; }
.stagger-fast.stagger-active .stagger-item:nth-child(10) { animation-delay: 270ms; }

/* Clip reveal — content uncovered from bottom */
.clip-reveal-bottom {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 600ms var(--df-ease-out);
}
.clip-reveal-bottom.revealed {
  clip-path: inset(0 0 0 0);
}

/* ===== Phase 2: Interactive Effects (Design Forge V3.1) ===== */

/* Press feedback — instant scale-down on all interactive elements */
.btn, button, .feed-toggle, .lang-chip, .toggle-pill,
.nav-item, .feed-card, .nav-item svg {
  transition:
    transform var(--df-duration-press) var(--df-ease-out),
    opacity var(--df-duration-press) var(--df-ease-out),
    box-shadow var(--df-duration-press) var(--df-ease-out);
}
.btn:active, button:active, .feed-toggle:active, .lang-chip:active,
.toggle-pill:active, .nav-item:active {
  transform: scale(0.95);
}

/* Card hover — spring physics lift */
.feed-card, .post-card {
  transition:
    transform 200ms var(--df-spring-snappy),
    box-shadow 250ms var(--df-ease-out);
}
.feed-card:hover, .post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* Active press on card */
.feed-card:active, .post-card:active {
  transform: scale(0.975);
  transition: transform 80ms var(--df-ease-out);
}

/* Pulse ring — CTA attention gravity (rare use) */
.pulse-ring {
  animation: dfPulseRing 2.5s var(--df-ease-out) infinite;
}
@keyframes dfPulseRing {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 14px rgba(212,163,115, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212,163,115, 0); }
}

/* Pulse ring — amber variant for CTA */
.pulse-ring-amber {
  animation: dfPulseRingAmber 2.5s var(--df-ease-out) infinite;
}
@keyframes dfPulseRingAmber {
  0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Nav item — enhanced press + active glow */
.nav-item {
  transition: all 160ms var(--df-spring-snappy);
}
.nav-item.active {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* Toggle pills — crisp snap */
.toggle-pill, .feed-toggle, .lang-chip {
  transition: all 160ms var(--df-spring-snappy);
}

/* V7 C1 — Light theme tokens (retheme: Cyber-Neon light = slightly brighter dark) */
:root.light {
  /* ═══ SURFACE: warm cream ═══ */
  --bg-root: #f5f0eb;
  --bg-surface: rgba(255, 250, 245, 0.96);
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(250, 245, 238, 0.96);
  --bg-input: rgba(0, 0, 0, 0.04);

  /* ═══ BORDER ═══ */
  --border-dim: rgba(212, 163, 115, 0.12);
  --border-subtle: rgba(212, 163, 115, 0.22);
  --border-glass: rgba(0, 0, 0, 0.07);
  --border-active: rgba(212, 163, 115, 0.55);

  /* ═══ TEXT ═══ */
  --text-primary: #2a2218;
  --text-secondary: #5a4d3a;
  --text-muted: #8a7a65;
  --text-dim: #b5a590;

  /* ═══ ACCENT: same gold, adjusted opacity ═══ */
  --accent: #c08a50;
  --accent-rgb: 192, 138, 80;
  --accent-glow: rgba(192, 138, 80, 0.2);
  --accent-glow-strong: rgba(192, 138, 80, 0.35);

  /* Shadows for light background (SPEC V7 A1) */
  --shadow-card:
    0 1px 3px rgba(0,0,0,0.06),
    0 4px 12px rgba(0,0,0,0.04),
    0 0 0 1px var(--border-glass);
  --shadow-card-hover:
    0 2px 8px rgba(0,0,0,0.08),
    0 8px 24px rgba(72, 187, 120, 0.06),
    0 0 0 1px var(--border-active);
  --shadow-elevated:
    0 4px 8px rgba(0,0,0,0.06),
    0 12px 36px rgba(0,0,0,0.08),
    0 0 0 1px var(--border-glass);

  color-scheme: light;
}

/* V7 C1 — Theme-aware smooth transitions on key surfaces */
body, .post-card, .stat-card, .agent-card, .btn-primary, header, .tab-nav, .stats-grid {
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  color-scheme: dark;
}

body {
  background: var(--bg-root);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
}

/* ═══ POLISH: Global interaction standards ═══ */
button, .btn, [role="button"], .clickable, .nav-item, .tab-btn,
.post-card, .agent-card, .relay-item, .node-row, .feed-item {
  transition: transform var(--dur-fast) var(--ease-out), 
              opacity var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-normal) var(--ease-out),
              border-color var(--dur-normal) var(--ease-out),
              background var(--dur-normal) var(--ease-out);
}
button:active, .btn:active, [role="button"]:active, .clickable:active,
.nav-item:active, .tab-btn:active {
  transform: scale(0.97);
}
/* Card press feedback */
.post-card:active, .agent-card:active, .feed-item:active {
  transform: scale(0.98);
}
/* Hover lift */
.post-card:hover, .agent-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
              0 0 12px var(--accent-glow);
  border-color: var(--border-active);
}
/* Tab content transition */
.tab-content {
  animation: tabFadeIn var(--dur-normal) var(--ease-out);
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Nav item hover glow */
.nav-item:hover { color: var(--accent-light); }
.nav-item.active { color: var(--accent); }

/* Cyber grid — always visible background matrix */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--accent-rgb),0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb),0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridPulse 8s ease-in-out infinite;
}
@keyframes gridPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* V9.7-A2 — Freud grain texture overlay (on html, not body — avoids aurora conflict) */
html::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  background-repeat: repeat;
}

/* ═══════════════════════════════════
   ANIMATED BACKGROUND — Aurora Mesh
   ═══════════════════════════════════ */

#bgCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Aurora gradient orbs */
body::before,
body::after,
.aurora-orb-3 {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

body::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle at 30% 30%, rgba(var(--accent-rgb), 0.22), transparent 70%);
  top: -250px; right: -200px;
  animation: auroraDrift1 20s ease-in-out infinite;
}

body::after {
  width: 500px; height: 500px;
  background: radial-gradient(circle at 60% 60%, rgba(99, 179, 237, 0.18), transparent 70%);
  bottom: -200px; left: -180px;
  animation: auroraDrift2 24s ease-in-out infinite;
}

/* Third orb injected via JS */
.aurora-orb-3-injected {
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  background: radial-gradient(circle at 40% 50%, rgba(var(--accent-rgb), 0.14), transparent 70%);
  top: 30%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
  animation: auroraDrift3 26s ease-in-out infinite;
}

@keyframes auroraDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-60px, 40px) scale(1.15); }
  50% { transform: translate(30px, -30px) scale(0.9); }
  75% { transform: translate(50px, 20px) scale(1.1); }
}

@keyframes auroraDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -20px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(0.95); }
}

@keyframes auroraDrift3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* Subtle grid overlay */
.grid-overlay {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ═══════════════════════════════════
   HEADER — Floating glass
   ═══════════════════════════════════ */

/* ═══ Design Forge: Cyber-Neon Header ═══ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
}

.header-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(8,4,20,0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(var(--accent-rgb),0.12);
  border-radius: 16px;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.5),
    0 0 0 1px rgba(var(--accent-rgb),0.03),
    inset 0 1px 0 rgba(255,255,255,0.02);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple), var(--neon-magenta), var(--neon-cyan));
  background-size: 300% 300%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px var(--neon-cyan-glow), 0 0 40px rgba(180,77,255,0.2);
  animation: logoGlow 3s ease-in-out infinite, logoGradientShift 6s ease-in-out infinite;
}
@keyframes logoGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.logo-icon svg {
  width: 20px; height: 20px;
  color: var(--white);
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.5));
}

@keyframes logoGlow {
  0%, 100% { box-shadow: 0 0 12px var(--neon-cyan-glow); }
  50% { box-shadow: 0 0 32px var(--neon-cyan-glow), 0 0 56px rgba(180,77,255,0.3); }
}

.logo-text {
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #f0f0ff 0%, var(--neon-cyan) 35%, var(--neon-purple) 70%, var(--neon-magenta) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 4s linear infinite;
}

@keyframes textShimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(var(--accent-rgb),0.07);
  border: 1px solid rgba(var(--accent-rgb),0.18);
  border-radius: 20px;
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green-glow);
  transition: all 0.3s var(--ease-smooth);
}

.status-dot.pulse {
  animation: dotPulse 2.5s ease-in-out infinite;
}

.status-dot.offline {
  background: var(--accent-rose);
  box-shadow: 0 0 8px rgba(244,114,102,0.4);
  animation: none;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 6px var(--accent-green-glow); transform: scale(1); }
  50% { box-shadow: 0 0 16px var(--accent-green-glow); transform: scale(1.5); }
}

.status-text {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* V8.42 — Scroll edge fade (blur gradient instead of hard divider) */
.scroll-edge-fade {
  position: relative;
}
.scroll-edge-fade::after {
  content: '';
  position: absolute;
  bottom: -24px;
  left: 0;
  right: 0;
  height: 24px;
  background: linear-gradient(
    to bottom,
    rgba(10, 22, 40, 1),
    rgba(10, 22, 40, 0)
  );
  z-index: 10;
  pointer-events: none;
}

/* V8.42 — Number counter / ticker (animated stats) */
.counter-ticker {
  font-variant-numeric: tabular-nums;
  transition: color 300ms var(--ease-smooth);
}
.counter-up {
  animation: counterPop 500ms var(--df-spring-bouncy);
}
@keyframes counterPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); color: var(--accent-mint); }
  100% { transform: scale(1); }
}

/* V8.42 — Apple material sheet (double blur + vibrancy) */
.material-sheet {
  background: rgba(18, 28, 48, 0.85);
  backdrop-filter: blur(var(--df-blur-heavy)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--df-blur-heavy)) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.08),
    0 8px 32px rgba(0, 0, 0, 0.3);
}

.material-vibrant {
  background: rgba(18, 28, 48, 0.55);
  backdrop-filter: blur(var(--df-blur-material)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--df-blur-material)) saturate(180%);
}

/* ===== Phase 4: Killer Graphics ===== */

/* Animated gradient border — rotating conic-gradient around cards */
.gradient-border-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
}
.gradient-border-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-md) + 2px);
  background: conic-gradient(
    from var(--gb-angle, 0deg),
    var(--accent-mint), var(--accent-sky), var(--accent-purple),
    var(--accent-warm), var(--accent-mint)
  );
  z-index: -1;
  animation: rotateBorder 6s linear infinite;
  opacity: 0.6;
  filter: blur(6px);
}
@property --gb-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes rotateBorder {
  0% { --gb-angle: 0deg; }
  100% { --gb-angle: 360deg; }
}
/* Fallback for browsers without @property */
@supports not (background: conic-gradient(from var(--gb-angle, 0deg), red, blue)) {
  .gradient-border-card::before {
    animation: rotateBorderFallback 6s linear infinite;
  }
}
@keyframes rotateBorderFallback {
  0%   { filter: blur(6px) hue-rotate(0deg); }
  100% { filter: blur(6px) hue-rotate(360deg); }
}

/* Star field — CSS-only twinkling particles */
.star-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.star-dot {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--white);
  animation: twinkle var(--twinkle-dur, 3s) ease-in-out infinite;
  animation-delay: var(--twinkle-delay, 0s);
  opacity: 0;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.1; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.8); }
}

/* Hero entrance — blur dissolve for profile/featured */
.hero-entrance {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px);
  animation: heroDissolve 700ms var(--df-ease-out) forwards;
}
@keyframes heroDissolve {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}
.hero-entrance-delay-1 { animation-delay: 100ms; }
.hero-entrance-delay-2 { animation-delay: 250ms; }
.hero-entrance-delay-3 { animation-delay: 400ms; }

/* Enhanced particle canvas — glow pulse */
#bgCanvas {
  opacity: 0.7;
  animation: canvasPulse 8s ease-in-out infinite;
}
@keyframes canvasPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.85; }
}

/* ═══════════════════════════════════
   TOGGLE BAR
   ═══════════════════════════════════ */

.toggle-bar {
  position: sticky;
  top: 90px;
  z-index: 99;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
}

.toggle-pill-group {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(14, 22, 40, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.toggle-pill {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s var(--ease-spring);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.toggle-pill svg { opacity: 0.5; transition: opacity 0.3s; color: inherit; }

.toggle-pill.active {
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.14), rgba(180,77,255,0.08));
  color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(var(--accent-rgb),0.1), 0 0 30px rgba(180,77,255,0.06), inset 0 1px 0 rgba(255,255,255,0.04);
}

.toggle-pill.active svg { opacity: 1; filter: drop-shadow(0 0 4px rgba(var(--accent-rgb),0.5)); }

/* ═══════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════ */

.main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 12px calc(var(--nav-height) + var(--safe-bottom) + 20px);
  position: relative;
  z-index: 1;
}

.tab-content {
  display: none;
  animation: tabEnter 0.4s var(--ease-out);
}

.tab-content.active { display: block; }

@keyframes tabEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════
   POST CARDS — Animated border glow
   ═══════════════════════════════════ */

/* ═══ Design Forge: Cyber-Neon Cards ═══ */
.post-card {
  position: relative;
  background: linear-gradient(170deg, rgba(16,10,32,0.94) 0%, rgba(8,4,20,0.88) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb),0.15);
  padding: 22px 20px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: all 0.25s var(--spring-snappy, cubic-bezier(0.22,0.95,0.28,1));
  box-shadow:
    0 2px 16px rgba(0,0,0,0.5),
    0 0 0 1px rgba(var(--accent-rgb),0.04),
    0 0 30px -6px rgba(var(--accent-rgb),0.04),
    inset 0 1px 0 rgba(255,255,255,0.02);
}

/* Top neon trace — always visible, pulsing */
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 4px; right: 4px;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent,
    var(--neon-cyan) 15%,
    var(--neon-magenta) 50%,
    var(--neon-purple) 85%,
    transparent
  );
  border-radius: 2px;
  z-index: 2;
  animation: neonTracePulse 3s ease-in-out infinite;
}
@keyframes neonTracePulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Bottom edge glow */
.post-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb),0.2), transparent);
  z-index: 1;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb),0.4);
  box-shadow: var(--shadow-card-hover);
}

.post-card:hover::before {
  opacity: 1;
  background: linear-gradient(90deg,
    transparent,
    var(--neon-cyan) 10%,
    var(--neon-magenta) 40%,
    var(--neon-purple) 60%,
    var(--neon-cyan) 90%,
    transparent
  );
}

@media (hover: none) {
  .post-card:hover, .feed-card:hover { transform: none; }
}

/* Card inner elements stacking */
.post-card > * { position: relative; z-index: 1; }

.post-card:active {
  transform: scale(0.98);
  transition: transform 0.1s ease-out;
}

/* ========= CHILD ELEMENTS ========= */

/* Animated gradient border ring (conic) */
.post-card .gpu-border {
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.07),
    rgba(255,255,255,0.03) 40%,
    rgba(var(--accent-rgb),0.1) 60%,
    rgba(255,255,255,0.05)
  );
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderFlow 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes borderFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Inner glow based on author hue — removed (replaced by corner-glow in card) */
.post-card .card-inner-glow {
  position: absolute;
  top: -50px; right: -50px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(var(--author-hue, 35), 80%, 60%, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
  display: none; /* disabled — conflicts with new ::after */
}

.post-card > * { position: relative; z-index: 1; }

.post-card:active {
  transform: scale(0.985);
  transition: transform 0.15s var(--ease-smooth);
}

/* ─── Post Header ─── */
.post-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.post-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-base); font-weight: var(--weight-bold);
  color: var(--white);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 0 2px rgba(255,255,255,0.06);
  position: relative;
  letter-spacing: 0.02em;
}

/* V7 C2 — Animated gradient border */
.post-avatar::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--neon-cyan), var(--neon-purple), var(--neon-magenta), var(--neon-amber), var(--neon-cyan));
  animation: avatarSpin 4s linear infinite;
  z-index: -1;
}

.post-avatar:hover::before {
  animation-duration: 1.5s;
}

@keyframes avatarSpin {
  to { transform: rotate(360deg); }
}

/* Glass ring around avatar */
.post-avatar::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 60%);
  -webkit-mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.post-meta { flex: 1; min-width: 0; }

.post-author {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: var(--leading-tight);
}

.post-author-bio {
  font-size: var(--text-xs);
  color: var(--text-dim);
  line-height: 1.3;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.7;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px; height: 17px;
  background: linear-gradient(135deg, var(--accent-mint), #00c8d4);
  border-radius: 50%;
  color: var(--white);
  box-shadow: 0 0 10px var(--accent-mint-glow);
}

.verified-badge svg {
  width: 10px; height: 10px;
}

/* ─── Trust Lens Badge ─── */
.trust-badge {
  display: inline-flex;
  align-items: center;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--trust-color);
  vertical-align: middle;
  margin-left: 4px;
  position: relative;
  top: -1px;
  cursor: help;
  transition: transform var(--ease-out) 200ms, box-shadow var(--ease-out) 200ms;
}

.trust-badge:hover {
  transform: scale(1.8);
}

.trust-badge.trust-high {
  box-shadow: 0 0 6px var(--trust-color), 0 0 12px var(--trust-color);
  width: 9px; height: 9px;
}

.trust-badge.trust-medium {
  box-shadow: 0 0 4px var(--trust-color);
}

.trust-badge.trust-low {
  box-shadow: 0 0 2px var(--trust-color);
  opacity: 0.8;
}

.trust-badge.trust-unknown {
  opacity: 0.25;
  background: var(--text-muted);
  box-shadow: none;
}

.trust-badge.trust-unknown:hover {
  opacity: 0.6;
  transform: scale(1.5);
}

.post-time {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kind-badge {
  font-size: var(--text-xs);
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb),0.1);
  color: var(--accent-mint);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  margin-left: 8px;
  vertical-align: middle;
}

/* ─── Post Content ─── */
.post-content {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  word-break: break-word;
  white-space: pre-wrap;
  margin-bottom: 16px;
  letter-spacing: 0.005em;
}

.post-content a {
  color: var(--accent-mint);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--accent-rgb),0.2);
}

/* ─── Post Footer ─── */
.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border-dim);
}

.post-id {
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  opacity: 0.6;
}

/* ═══════════════════════════════════
   SKELETON LOADING
   ═══════════════════════════════════ */

/* ═══════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 70px 24px;
  color: var(--text-muted);
}
.empty-state svg {
  display: block;
  margin: 0 auto 20px;
  color: var(--text-dim);
  opacity: 0.3;
}
.empty-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.empty-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 280px;
  margin: 0 auto;
  line-height: var(--leading-normal);
}

/* ═══════════════════════════════════
   STATS — Glass cards + charts
   ═══════════════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

@media (hover: none) {
  .stat-card:hover { transform: none; box-shadow: var(--shadow-card); }
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent 60%);
  -webkit-mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.stat-card:active { transform: scale(0.97); }

.stat-icon {
  margin-bottom: 12px;
  color: var(--text-muted);
  opacity: 0.5;
  transition: all 0.3s;
}

.stat-card:hover .stat-icon { opacity: 0.8; }

.stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #80c8e8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Chart Card ─── */
.chart-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.chart-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  margin-bottom: 18px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chart-bars { display: flex; flex-direction: column; gap: 12px; }

.chart-row {
  display: grid;
  grid-template-columns: 56px 1fr 52px;
  align-items: center;
  gap: 12px;
}

.chart-kind {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
}

.chart-count {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
  text-align: right;
}

.chart-bar-track {
  height: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 5px;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s var(--ease-spring);
  position: relative;
}

.chart-bar-fill.k1 {
  background: linear-gradient(90deg, #00c8f0, #00e0ff);
  box-shadow: 0 0 12px rgba(var(--accent-rgb),0.4);
}

.chart-bar-fill.k10002 {
  background: linear-gradient(90deg, #7c4dff, #b388ff);
  box-shadow: 0 0 12px rgba(139,92,246,0.4);
}

.chart-bar-fill.k9000 {
  background: linear-gradient(90deg, #00e676, #69f0ae);
  box-shadow: 0 0 12px rgba(0,230,118,0.4);
}

.chart-bar-fill.k39000 {
  background: linear-gradient(90deg, #f0a020, #ffc107);
  box-shadow: 0 0 12px rgba(240,160,32,0.4);
}

.chart-bar-fill.k1111 {
  background: linear-gradient(90deg, #f05078, #ff80a0);
  box-shadow: 0 0 12px rgba(240,80,120,0.4);
}

.chart-bar-fill.other {
  background: rgba(255,255,255,0.1);
}

.chart-bar-fill.k0 {
  background: linear-gradient(90deg, #ab47bc, #ce93d8);
  box-shadow: 0 0 12px rgba(171,71,188,0.3);
}
.chart-bar-fill.k19000 {
  background: linear-gradient(90deg, #26c6da, #80deea);
  box-shadow: 0 0 12px rgba(38,198,218,0.3);
}
.chart-bar-fill.k8010 {
  background: linear-gradient(90deg, #ef5350, #ef9a9a);
  box-shadow: 0 0 12px rgba(239,83,80,0.3);
}
.chart-bar-fill.k11 {
  background: linear-gradient(90deg, #8d6e63, #bcaaa4);
  box-shadow: 0 0 12px rgba(141,110,99,0.3);
}
.chart-bar-fill.k8012 {
  background: linear-gradient(90deg, #66bb6a, #a5d6a7);
  box-shadow: 0 0 12px rgba(102,187,106,0.3);
}
.chart-bar-fill.k1984 {
  background: linear-gradient(90deg, #ff7043, #ffab91);
  box-shadow: 0 0 12px rgba(255,112,67,0.3);
}

/* ═══════════════════════════════════
   AGENT CARDS
   ═══════════════════════════════════ */

.agents-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.agent-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  text-align: center;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  box-shadow: var(--shadow-card);
}

.agent-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.agent-card:active { transform: scale(0.97); }

@media (hover: none) {
  .agent-card:hover { transform: none; box-shadow: var(--shadow-card); }
}

.agent-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: var(--text-lg); font-weight: var(--weight-bold);
  color: var(--white);
  box-shadow: 0 6px 28px rgba(0,0,0,0.4), 0 0 0 3px rgba(255,255,255,0.05);
}

.agent-info { text-align: center; }

.agent-name {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: 3px;
}

.agent-about {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: var(--leading-normal);
}

.agent-pk {
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-family: var(--font-mono);
  word-break: break-all;
  opacity: 0.7;
}

/* ═══════════════════════════════════
   NODE / TIE SECTIONS
   ═══════════════════════════════════ */

.node-header, .tie-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.node-badge, .tie-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}

.node-badge.online, .tie-badge.ok {
  background: rgba(var(--accent-rgb),0.1);
  color: var(--accent-green);
  border: 1px solid rgba(var(--accent-rgb),0.2);
}

.node-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

.node-ver {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
}

.node-section {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}

.node-section h3 {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.node-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: var(--text-sm);
}

.node-row span { color: var(--text-secondary); display: flex; align-items: center; gap: 5px; }

.node-row code, .node-row strong {
  font-size: var(--text-xs);
  color: var(--accent-mint);
  font-family: var(--font-mono);
  background: rgba(var(--accent-rgb),0.06);
  padding: 3px 8px;
  border-radius: 5px;
}

.nip-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

.nip-tag {
  font-size: var(--text-xs);
  padding: 4px 10px;
  background: rgba(139,92,246,0.12);
  color: var(--accent-purple);
  border-radius: 10px;
  font-weight: var(--weight-bold);
  font-family: 'SF Mono', 'Fira Code', monospace;
  border: 1px solid rgba(139,92,246,0.15);
}

/* ═══════════════════════════════════
   COMPOSE
   ═══════════════════════════════════ */

.compose-panel {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.compose-header {
  font-size: var(--text-lg);
  font-weight: var(--weight-extrabold);
  margin-bottom: 22px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.compose-icon { color: var(--accent-mint); filter: drop-shadow(0 0 6px var(--accent-mint-glow)); }

.compose-field { margin-bottom: 18px; }

.compose-field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.compose-field select,
.compose-field input,
.compose-field textarea {
  width: 100%;
  padding: 11px 15px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: inherit;
  transition: all 0.25s var(--ease-smooth);
  outline: none;
}

.compose-field select:focus,
.compose-field input:focus,
.compose-field textarea:focus {
  border-color: rgba(var(--accent-rgb),0.4);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb),0.07), 0 0 20px rgba(var(--accent-rgb),0.05);
  background: rgba(255,255,255,0.05);
}

.compose-field textarea {
  min-height: 130px;
  resize: vertical;
}

.char-meter { margin-top: 8px; }

.char-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.char-bar {
  height: 3px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
}

.char-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent-green);
  transition: width 0.2s, background 0.2s;
}

.char-bar-fill.warning { background: var(--accent-gold); }

.char-bar-fill.danger { background: var(--accent-rose); }

.btn-primary {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.12), rgba(180,77,255,0.06));
  color: var(--neon-cyan);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  cursor: pointer;
  transition: all 0.25s var(--spring-snappy, cubic-bezier(0.22,0.95,0.28,1));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(var(--accent-rgb),0.2);
  letter-spacing: 0.01em;
  box-shadow: 0 0 16px rgba(var(--accent-rgb),0.06);
}

.btn-primary:not(:disabled):hover {
  transform: scale(1.02);
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.18), rgba(180,77,255,0.1));
  box-shadow: 0 0 24px rgba(var(--accent-rgb),0.12), 0 0 40px rgba(180,77,255,0.06);
  border-color: rgba(var(--accent-rgb),0.35);
}

.btn-primary:not(:disabled):active {
  transform: scale(0.97);
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.22), rgba(180,77,255,0.12));
}

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.compose-status {
  text-align: center;
  margin-top: 14px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  min-height: 20px;
}

.compose-status.success { color: var(--accent-green); }

.compose-status.error { color: var(--accent-rose); }

.compose-status.pending { color: var(--accent-gold); }

/* ═══════════════════════════════════
   BOTTOM NAVIGATION — Premium Glass
   ═══════════════════════════════════ */

/* ═══ Bottom Navigation — icon-only, all 11 fit ANY screen ═══ */
/* ═══ Design Forge: Cyber-Neon Bottom Nav ═══ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(6,3,16,0.9);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-top: 1px solid rgba(var(--accent-rgb),0.08);
  border-radius: 16px 16px 0 0;
  box-shadow:
    0 -8px 32px rgba(0,0,0,0.6),
    0 0 20px rgba(var(--accent-rgb),0.03),
    inset 0 1px 0 rgba(255,255,255,0.02);
  margin: 0 6px;
  padding-bottom: var(--safe-bottom);
}

.nav-scroll {
  display: flex;
  justify-content: flex-start;
  padding: 4px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 1px;
}
.nav-scroll::-webkit-scrollbar { display: none; }

/* V12.3 — Nav active indicator (animated pill) */
.nav-indicator {
  position: absolute;
  top: 4px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg,
    rgba(var(--accent-rgb), 0.18),
    rgba(var(--accent-rgb), 0.08),
    rgba(var(--accent-rgb), 0.04)
  );
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  box-shadow:
    0 0 16px rgba(var(--accent-rgb), 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: left 250ms var(--ease-out),
              width 250ms var(--ease-out),
              opacity 180ms var(--ease-out);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}
.nav-indicator.visible { opacity: 1; }

/* V12.3 — Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--accent),
    var(--accent-light),
    var(--accent)
  );
  z-index: 999;
  box-shadow: 0 0 8px var(--accent-glow),
              0 0 20px rgba(var(--accent-rgb), 0.3);
  transition: width 50ms linear;
  border-radius: 0 1px 1px 0;
}

/* V12.3 — Agent card glow on hover */
.agent-card {
  position: relative;
  overflow: hidden;
  transition: transform 180ms var(--ease-out),
              box-shadow 300ms var(--ease-out),
              border-color 300ms var(--ease-out);
}
.agent-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 200%; height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(var(--accent-rgb), 0.06),
    transparent
  );
  transition: left 400ms var(--ease-out);
  pointer-events: none;
}
.agent-card:hover::after { left: 100%; }
.agent-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(var(--accent-rgb), 0.18),
    0 0 60px rgba(var(--accent-rgb), 0.06);
  border-color: rgba(var(--accent-rgb), 0.3);
}

/* V12.3 — Stat card hover lift */
.stat-card {
  transition: transform 180ms var(--ease-out),
              box-shadow 300ms var(--ease-out),
              border-color 300ms var(--ease-out);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(var(--accent-rgb), 0.5),
    transparent
  );
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 16px rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.2);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px 8px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  transition: all 0.25s var(--spring-snappy, cubic-bezier(0.22,0.95,0.28,1));
  position: relative;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  box-sizing: border-box;
}

.nav-item .nav-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  line-height: 1;
  color: inherit;
  white-space: nowrap;
  opacity: 0.8;
}

.nav-item.active .nav-label {
  opacity: 1;
}

.nav-item svg {
  width: 18px; height: 18px;
  transition: transform 220ms var(--ease-spring),
              color 250ms var(--ease-out),
              filter 250ms var(--ease-out);
}
.nav-item.active svg {
  transform: scale(1.12);
  filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.5));
  color: var(--accent);
}

.nav-item:active svg {
  transform: scale(0.85);
  transition: transform 0.1s ease-out;
}

/* V12.4 — Compose button glow */
.nav-item[data-tab="compose"] {
  position: relative;
}
.nav-item[data-tab="compose"]::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light), var(--accent));
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
  z-index: -1;
}
.nav-item[data-tab="compose"]:hover::before { opacity: 0.5; }
.nav-item[data-tab="compose"].active::before { opacity: 0.7; }

/* V12.4 — Zap spark animation */
@keyframes zapSpark {
  0% { filter: drop-shadow(0 0 0px var(--accent)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 8px var(--accent)); transform: scale(1.3) rotate(-5deg); }
  100% { filter: drop-shadow(0 0 0px var(--accent)); transform: scale(1) rotate(0deg); }
}
.action-btn.zap-btn:active svg {
  animation: zapSpark 0.4s var(--ease-spring);
}
.action-btn.like-btn:active:not(.liked) svg {
  transform: scale(1.3);
  transition: transform 0.15s var(--ease-spring);
}

.nav-item.active {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  text-shadow: 0 0 12px var(--accent-glow);
}

.nav-item.active svg {
  color: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0; left: 30%; right: 30%;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}

* ═══ Notifications Tab ═══ */
.notify-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}
.notify-card:hover { border-color: var(--accent-mint); background: var(--bg-card-hover); }
.notify-icon { font-size: var(--text-xl); flex-shrink: 0; width: 36px; text-align: center; }
.notify-body { flex: 1; min-width: 0; }
.notify-from { font-weight: var(--weight-bold); font-size: var(--text-base); color: var(--text-primary); margin-bottom: 2px; }
.notify-text { font-size: var(--text-sm); color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notify-time { font-size: var(--text-xs); color: var(--text-dim); margin-top: 4px; }

/* ═══════════════════════════════════
   RIPPLE EFFECT
   ═══════════════════════════════════ */

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleEffect {
  to { transform: scale(4); opacity: 0; }
}

/* ═══════════════════════════════════
   RESPONSIVE — V8.58 Mobile Fix
   ═══════════════════════════════════ */

/* ─── BASE MOBILE (all screens) ─── */
@media (max-width: 639px) {
  /* Disable heavy canvas animations on mobile */
  #bgCanvas { display: none !important; }
  .aurora-orb, .star-field, .cyber-grid, .cyber-effects, .particle-layer { display: none !important; }

  /* Main container — prevent overflow */
  .main {
    max-width: 100vw !important;
    padding: 12px 8px 100px !important;
    overflow-x: hidden !important;
    margin: 0 !important;
  }

  /* Header — compact */
  .header {
    padding: 6px 8px !important;
  }
  .header-inner {
    padding: 8px 12px !important;
    max-width: 100% !important;
    border-radius: 12px !important;
  }
  .logo-text { font-size: var(--text-base) !important; }
  .logo-sub { display: none; }
  .header-right { gap: 2px !important; }
  .icon-btn { width: 32px !important; height: 32px !important; }
  .header-status { font-size: var(--text-xs) !important; }

  /* Bottom nav — compact */
  .bottom-nav {
    margin: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    height: 56px !important;
    overflow: visible !important;
  }
  .nav-scroll {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x !important;
    justify-content: flex-start !important;
    padding: 4px 4px !important;
    gap: 0px !important;
    scrollbar-width: none;
  }
  .nav-scroll::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 0 0 auto !important;
    min-width: 36px !important;
    padding: 6px 8px !important;
    font-size: var(--text-xs) !important;
  }
  .nav-item svg { width: 14px !important; height: 14px !important; }

  /* Feed cards — full width */
  #feedContainer {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .post-card {
    padding: 12px !important;
    border-radius: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .post-card:first-child { grid-column: auto !important; }

  /* Fix card content overflow */
  .post-card * { max-width: 100% !important; word-wrap: break-word !important; overflow-wrap: break-word !important; }
  .post-card img, .post-card video { max-width: 100% !important; height: auto !important; }
  .post-card pre, .post-card code { max-width: 100% !important; overflow-x: auto !important; white-space: pre-wrap !important; }

  /* Toggle bar — compact */
  .toggle-bar { padding: 4px 8px !important; }
  .toggle-pill-group { gap: 4px !important; }
  .toggle-pill { padding: 6px 12px !important; font-size: var(--text-sm) !important; }

  /* Feed toggle bar — scrollable */
  .feed-toggle-bar {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0 !important;
  }
  .feed-toggle-bar::-webkit-scrollbar { display: none; }
  .feed-toggle { flex: 0 0 auto !important; white-space: nowrap !important; }

  /* Stats grid — 2 columns */
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .stat-value { font-size: var(--text-xl) !important; }
  .stat-card { padding: 10px !important; }

  /* Agents grid — 2 columns */
  .agents-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }

  /* Search bar */
  .search-bar { padding: 8px !important; }
  .search-inner { padding: 6px 10px !important; }
  .search-filters { gap: 4px !important; flex-wrap: wrap !important; }
  .filter-select { min-width: auto !important; font-size: var(--text-xs) !important; padding: 4px 6px !important; }

  /* Compose */
  .compose-panel { padding: 14px !important; }
  .compose-field select, .compose-field input, .compose-field textarea { font-size: var(--text-base) !important; }

  /* Profile */
  .profile-header { flex-direction: column !important; align-items: center !important; text-align: center !important; }
  .profile-avatar { width: 64px !important; height: 64px !important; }

  /* Notifications panel */
  .notify-panel { width: 100vw !important; max-width: 100vw !important; right: 0 !important; }

  /* Tabs content */
  .tab-content { padding: 0 4px !important; }
  .tab-content.active { display: block !important; }

  /* Modal */
  .modal-content { max-width: 95vw !important; margin: 10px !important; padding: 16px !important; }

  /* Thread / detail view */
  .thread-post { padding: 12px !important; }

  /* DM / messages */
  .dm-list { padding: 4px !important; }
  .dm-item { padding: 10px !important; }

  /* Lightbox */
  .lightbox-image { max-width: 95vw !important; max-height: 80vh !important; }

  /* Reduce animation complexity */
  .post-card::before, .post-card::after { animation: none !important; }
  .glow-pulse { animation: none !important; }

  /* Prevent iOS rubber band on body */
  body {
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
}

/* ─── Phase 6 Components — Communities, Badges, Highlights ─── */
.community-card, .badge-card, .highlight-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}
.community-card:hover, .badge-card:hover, .highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
  border-color: var(--accent);
}
.community-card .card-icon, .badge-card .card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xl);
  flex-shrink: 0;
}
.community-detail { padding: 16px; }
.community-detail .detail-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.community-detail .detail-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-2xl);
}
.badge-detail .badge-icon-large {
  width: 96px; height: 96px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent-warm), var(--accent-purple));
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-3xl);
}
.highlight-card { border-left-width: 4px; border-left-style: solid; }
.highlight-card.hl-story  { border-left-color: var(--accent-mint); }
.highlight-card.hl-thread { border-left-color: var(--accent-warm); }
.highlight-card.hl-note   { border-left-color: var(--accent-purple); }
.highlight-card.hl-milestone { border-left-color: var(--accent); }

/* Mobile adjustments for Phase 6 components */
@media (max-width: 639px) {
  .community-detail .detail-icon { width: 56px; height: 56px; border-radius: 14px; font-size: var(--text-xl); }
  .community-detail { padding: 8px; }
  .badge-detail .badge-icon-large { width: 72px; height: 72px; border-radius: 18px; font-size: var(--text-2xl); }
  .community-card, .badge-card, .highlight-card { padding: 10px !important; margin: 4px 0 !important; }
  .community-card .card-icon, .badge-card .card-icon { width: 40px; height: 40px; border-radius: 10px; font-size: var(--text-base); }
}

/* ─── Page Transitions ─── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.tab-content.active {
  animation: fadeSlideIn 0.25s ease-out;
}
.modal-overlay.active .modal-content {
  animation: fadeInScale 0.2s ease-out;
}
.post-card {
  animation: fadeSlideIn 0.3s ease-out both;
}
.post-card:nth-child(1) { animation-delay: 0ms; }
.post-card:nth-child(2) { animation-delay: 40ms; }
.post-card:nth-child(3) { animation-delay: 80ms; }
.post-card:nth-child(4) { animation-delay: 120ms; }
.post-card:nth-child(5) { animation-delay: 160ms; }

/* Very small phones (iPhone SE, etc) ─── */

@media (max-width: 374px) {
  .nav-item { min-width: 28px !important; padding: 4px 6px !important; }
  .nav-item svg { width: 12px !important; height: 12px !important; }
  .post-card { padding: 10px !important; }
  .logo-text { font-size: var(--text-base) !important; }
}

/* ─── Feed grid: single column base ─── */
#feedContainer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
#feedContainer > * {
  min-width: 0;
  overflow: hidden;
}

#feedContainer .post-card {
  margin-bottom: 0;
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
  #feedContainer {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  #feedContainer .post-card:first-child {
    grid-column: 1 / -1;
  }
}

/* Desktop: 2 columns masonry-like */
@media (min-width: 1024px) {
  #feedContainer {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    grid-auto-rows: dense;
  }
  .main {
    max-width: 960px;
    margin: 0 auto;
  }
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .agents-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

/* V7 D2 — Stats adaptive */
@media (min-width: 640px) and (max-width: 1023px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .main { padding: 24px 16px calc(var(--nav-height) + var(--safe-bottom) + 20px); }
  .post-card { padding: 22px; }
  .stats-grid { gap: 16px; }
  .agents-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════
   PHASE 2 — Profiles, Threads, Search, Reactions
   ═══════════════════════════════════════════════ */

/* ─── Header Right (search + status) ─── */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}

.icon-btn:active {
  background: rgba(255,255,255,0.1);
  transform: scale(0.9);
}

/* ─── Search Bar ─── */
.search-bar {
  position: sticky;
  top: 88px;
  z-index: 98;
  padding: 0 16px 10px;
}

.search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  padding: 10px 16px;
  background: rgba(14, 22, 40, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.5;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: inherit;
  outline: none;
}

.search-input::placeholder { color: var(--text-dim); }

.search-close { flex-shrink: 0; }

.search-results {
  max-width: 640px;
  margin: 10px auto 0;
  max-height: 60vh;
  overflow-y: auto;
  border-radius: var(--radius-md);
}

.search-result-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.search-result-card:active { transform: scale(0.98); }

.search-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-hover);
}
.search-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.search-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--bg-hover);
}
.search-result-body { flex: 1; min-width: 0; }

.search-result-author {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--accent-mint);
  margin-bottom: 4px;
}

.search-result-preview {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.search-results-empty {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Search tabs */
.search-tabs {
  display: flex;
  gap: 4px;
  max-width: 640px;
  margin: 8px auto 0;
  padding: 0 2px;
}
.search-tab {
  flex: 1;
  background: var(--bg-card);
  color: var(--text-dim);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: var(--text-sm);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.search-tab.active {
  color: var(--text-primary);
  border-color: var(--accent-mint);
  background: rgba(100, 255, 218, 0.05);
}
.search-tab-count {
  font-size: var(--text-xs);
  color: var(--text-dim);
  margin-left: 4px;
}

/* Search loading */
.search-loading {
  display: flex;
  justify-content: center;
  padding: 20px;
}
.spinner-sm {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--accent-mint);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Search NIP-05 and npub */
.search-nip05 {
  color: var(--text-dim);
  font-weight: var(--weight-normal);
  font-size: var(--text-xs);
  margin-left: 6px;
}
.search-result-npub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: monospace;
  margin-top: 2px;
}

/* ─── Search Tab (V13) ─── */
.search-tab-header {
  padding: 0 0 12px;
}

.search-tab-header .search-inner {
  margin: 0;
}

.search-clear {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  flex-shrink: 0;
}

.search-highlight {
  background: rgba(var(--accent-rgb), 0.25);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 2px;
}

.search-kind-badge {
  font-size: 10px;
  background: var(--glass-bg);
  color: var(--text-dim);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 500;
  vertical-align: middle;
}

/* Trending Tags */
.search-trending {
  padding: 16px 0;
}

.search-trending-title {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 10px;
}

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

.search-trending-chip {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.search-trending-chip:hover {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.trending-count {
  color: var(--text-dim);
  font-size: 11px;
}

.search-trending-empty {
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 0;
}

/* Recent Searches */
.search-recent {
  padding: 12px 0;
}

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

.search-recent-title {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.search-recent-clear {
  font-size: 12px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.search-recent-clear:hover {
  color: var(--danger);
}

.search-recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  margin: 0 6px 6px 0;
  transition: background 0.2s;
}

.search-recent-chip:hover {
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--text);
}

/* Empty state */
.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}

.search-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 12px;
}

.search-empty-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Relevance score */
.search-result-score {
  font-size: 10px;
  color: var(--accent-mint);
  margin-top: 4px;
}

/* ─── Author clickable ─── */
.post-author { cursor: pointer; }
.post-author:active { opacity: 0.7; }

/* ─── Post Actions Bar ─── */
.post-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--border-dim);
}

.action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  padding: 4px 0;
  transition: all 0.2s var(--ease-smooth);
  font-family: inherit;
}
.action-btn:hover {
  color: var(--text-secondary);
}
.action-btn svg { transition: transform 0.2s var(--ease-spring); }
.action-btn:active svg { transform: scale(0.85); }
.action-btn:active { color: var(--text-primary); }

.action-btn.liked { color: var(--accent-rose); }

.action-btn .count {
  font-family: 'Urbanist', sans-serif;
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}

/* Liked state with heart burst animation */
@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.action-btn.like-btn.liked svg {
  animation: heartPop 0.35s var(--ease-spring);
  color: var(--danger);
}
.like-btn.liked { color: var(--danger); opacity: 1; }

/* Repost button */
.repost-btn:hover { color: var(--success); opacity: 1; }
.repost-btn.reposted { color: var(--success); }
.repost-btn .count { font-size: var(--text-xs); font-weight: var(--weight-semibold); }

/* Bookmark button */
.bookmark-btn.bookmarked { opacity: 0.9; color: var(--accent); }
.bookmark-btn:hover { opacity: 0.7; }

.post-id {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

/* ─── Modal Overlay ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.25s var(--ease-out);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  background: var(--bg-root);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.35s var(--ease-spring);
  box-shadow: 0 -16px 64px rgba(0,0,0,0.6);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle {
  width: 40px; height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  margin: 12px auto 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
}

.modal-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-extrabold);
  color: var(--text-primary);
}

.modal-body { padding: 0 16px 40px; }

/* ─── Profile Sheet ─── */
.profile-hero {
  text-align: center;
  padding: 16px 0 20px;
  position: relative;
}

.profile-avatar-lg {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: var(--text-xl); font-weight: var(--weight-extrabold);
  color: var(--white);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 3px rgba(255,255,255,0.06);
  letter-spacing: 0.02em;
}

.profile-avatar-lg::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 50%);
  -webkit-mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.profile-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: var(--tracking-tight);
}

.profile-pk {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
  word-break: break-all;
  max-width: 240px;
  margin: 0 auto 10px;
  opacity: 0.7;
}

.profile-about {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  max-width: 320px;
  margin: 0 auto 10px;
}

.profile-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 8px 0;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--accent-mint);
  text-decoration: none;
  font-weight: var(--weight-semibold);
}

/* ─── Profile Stats ─── */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.profile-stat {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dim);
}

.profile-stat-value {
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

.profile-stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* ─── Thread Detail (V8.18) ─── */
.thread-card-root {
  background: var(--glass-bg);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 8px;
}
.thread-author-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.thread-author-info { display: flex; flex-direction: column; gap: 2px; }
.thread-author-name {
  font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--text-primary); cursor: pointer;
}
.thread-author-npub {
  font-size: var(--text-xs); color: var(--text-dim); font-family: monospace;
}
.thread-content {
  font-size: var(--text-base); line-height: 1.55; color: var(--text-primary);
  margin-bottom: 12px; white-space: pre-wrap; word-break: break-word;
}
.thread-time-row {
  margin-bottom: 14px;
}
.thread-time {
  font-size: var(--text-sm); color: var(--text-dim);
}
.thread-actions-row {
  display: flex; gap: 8px; padding-top: 12px;
  border-top: 1px solid var(--border-dim);
}
.thread-action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.03); color: var(--text-dim);
  font-size: var(--text-sm); cursor: pointer; transition: all 0.15s;
  font-family: 'Urbanist', sans-serif;
}
.thread-action-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.thread-action-btn.liked { color: var(--danger); border-color: var(--danger); }
.thread-action-btn .count { font-size: var(--text-sm); font-weight: var(--weight-semibold); }

/* Reply actions (small) */
.thread-action-btn-sm {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 5px 10px; border-radius: 16px; border: none;
  background: transparent; color: var(--text-dim);
  font-size: var(--text-sm); cursor: pointer; transition: all 0.15s;
}
.thread-action-btn-sm:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }

/* Section label with line */
.thread-section-label {
  display: flex; align-items: center; gap: 10px; margin: 20px 0 14px;
}
.thread-section-line {
  flex: 1; height: 1px; background: var(--border-dim);
}
.thread-section-text {
  font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}

/* Reply cards */
.thread-replies-list { margin-top: 4px; }
.thread-reply {
  position: relative; padding-left: 24px; margin-bottom: 2px;
}
.thread-reply-last { margin-bottom: 0; }
.thread-reply-line {
  position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px; background: var(--border-dim);
}
.thread-reply-last .thread-reply-line {
  bottom: 50%;
}
.thread-reply-card {
  padding: 10px 0 14px;
}
.thread-reply-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.thread-reply-meta {
  display: flex; flex-direction: column; gap: 1px;
}
.thread-reply-author {
  font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); cursor: pointer;
}
.thread-reply-time {
  font-size: var(--text-xs); color: var(--text-dim);
}
.thread-reply-content {
  font-size: var(--text-sm); line-height: 1.5; color: var(--text-primary);
  margin-bottom: 8px; white-space: pre-wrap; word-break: break-word;
}
.thread-reply-actions {
  display: flex; gap: 4px;
}

/* Reply input box */
.thread-reply-box {
  display: none; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--border-glass);
  background: var(--bg-base);
  position: sticky; bottom: 0;
}
.thread-reply-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--white); flex-shrink: 0;
}
.thread-reply-box textarea {
  flex: 1; background: rgba(255,255,255,0.05); border: 1px solid var(--border-glass);
  border-radius: 12px; padding: 10px; color: var(--text-primary);
  font-size: var(--text-sm); resize: none; font-family: 'Urbanist', sans-serif;
}
.thread-reply-box textarea:focus { outline: none; border-color: var(--accent); }
.btn-send-reply {
  padding: 8px 18px; border-radius: 20px; border: none;
  background: var(--accent); color: var(--white); font-weight: var(--weight-semibold);
  font-size: var(--text-sm); cursor: pointer; flex-shrink: 0;
  font-family: 'Urbanist', sans-serif;
}

/* Empty */
.thread-empty {
  text-align: center; padding: 40px 20px; color: var(--text-dim);
}

/* ─── Thread Root Post (legacy, now replaced) ─── */

/* ─── Verified Badge (in profile) ─── */
.verified-badge-sm {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 15px; height: 15px;
  background: linear-gradient(135deg, var(--accent-mint), #00c8d4);
  border-radius: 50%;
  vertical-align: -2px;
  margin-left: 3px;
  box-shadow: 0 0 8px var(--accent-mint-glow);
}

.verified-badge-sm svg { width: 9px; height: 9px; color: var(--white); }

/* ══════════════════════════════════════════
   PHASE 5 — Zaps + Notifications
   ══════════════════════════════════════════ */

/* Zap button */
.zap-btn { color: var(--zap); }
.zap-btn:hover { color: #ffd700; background: rgba(243,198,35,0.08); }
.zap-btn svg { color: var(--zap); }

/* Notification badge */
.notify-badge {
  position: absolute;
  top: -4px; right: -6px;
  display: flex;
  align-items: center; justify-content: center;
  min-width: 16px; height: 16px;
  background: var(--accent-rose);
  color: var(--white);
  font-size: var(--text-xs); font-weight: var(--weight-bold);
  border-radius: 8px;
  padding: 0 5px;
  line-height: 1;
}

/* Notification panel */
.notify-panel {
  position: fixed; z-index: 1200;
  top: 0; right: 0;
  width: 360px; max-width: 90vw; height: 100vh;
  background: var(--bg-primary);
  border-left: 1px solid rgba(255,255,255,0.06);
  box-shadow: -8px 0 32px rgba(0,0,0,0.5);
  overflow-y: auto;
}

.notify-header {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 20px;
  font-size: var(--text-base); font-weight: var(--weight-semibold);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 0;
  background: var(--bg-primary);
  z-index: 1;
}
.notify-close { margin-left: auto; }

.notify-list {
  padding: 8px;
}

.notify-item {
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
}
.notify-item:hover { background: var(--glass-bg); }

.notify-type {
  font-size: var(--text-base);
  grid-row: 1 / 3;
}
.notify-from {
  font-weight: var(--weight-semibold); font-size: var(--text-sm);
  color: var(--text-primary);
}
.notify-content {
  font-size: var(--text-sm); color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 200px;
}
.notify-time {
  font-size: var(--text-xs); color: var(--text-dim);
  grid-row: 1 / 3;
}

/* Lightning address highlight */
.lightning-addr {
  transition: background 0.2s;
}
.lightning-addr:hover {
  background: rgba(255,215,0,0.1) !important;
}

/* ═══ V9.7 B1 — Focus-visible (mint) ═══ */
*:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: inherit;
}
button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-icon:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  border-radius: 6px;
}

/* ═══ V9.7 B2 — Toast notifications (mint/sky/rose per spec) ═══ */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-elevated);
  animation: toastSlideIn 0.4s var(--ease-out);
  max-width: 320px;
  border: 1px solid var(--border-glass);
}

.toast-success {
  background: rgba(72,187,120,0.12);
  color: #48BB78;
  border-color: rgba(72,187,120,0.25);
}
.toast-error {
  background: rgba(225,29,72,0.12);
  color: var(--accent-rose, #E11D48);
  border-color: rgba(225,29,72,0.25);
}
.toast-info {
  background: rgba(14,165,233,0.10);
  color: #0EA5E9;
  border-color: rgba(14,165,233,0.20);
}

.toast-dismiss {
  animation: toastSlideOut 0.3s var(--ease-out) forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ═══════════════════════════════════
   V7 B3 — Skeleton loaders
   ═══════════════════════════════════ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card-hover) 25%,
    rgba(255,255,255,0.03) 50%,
    var(--bg-card-hover) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 2s var(--ease-in-out) infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-card {
  height: 160px;
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}

.skeleton-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
}

.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 7px;
}

.skeleton-line-sm { width: 60%; }
.skeleton-line-md { width: 80%; }
.skeleton-line-lg { width: 95%; }
.skeleton-stat {
  height: 110px;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}

/* ═══════════════════════════════════
   V7 C3 — Custom scrollbar (Freud)
   ═══════════════════════════════════ */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(122,142,160,0.3) transparent;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(122,142,160,0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(122,142,160,0.6);
}

/* ═══════════════════════════════════
   V7.1 — Avatar images, post images, read-more
   ═══════════════════════════════════ */

/* Avatar with real image */
.post-avatar.avatar-img {
  overflow: hidden;
  background: var(--bg-card-hover) !important;
}
.post-avatar.avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.post-avatar.avatar-img.avatar-broken img {
  display: none;
}

/* Post images */
.post-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.post-images img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}
.post-images img:hover { transform: scale(1.02); }
.post-images img:only-child { grid-column: 1 / -1; max-height: 360px; }

/* Read more button */
.btn-read-more {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 16px;
  border: 1px solid rgba(var(--accent-rgb),0.3);
  border-radius: 12px;
  background: rgba(var(--accent-rgb),0.08);
  color: var(--accent-mint);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all 0.25s;
}
.btn-read-more:hover {
  background: rgba(var(--accent-rgb),0.15);
  border-color: rgba(var(--accent-rgb),0.6);
  color: #5ee8a0;
}
.btn-read-more:active {
  transform: scale(0.96);
}

/* Truncated text marker */
.post-truncated {
  color: var(--text-muted);
  font-weight: var(--weight-semibold);
}

/* ═══════════════════════════════════
   V7.5 — Relay status + new events badge
   ═══════════════════════════════════ */

/* LIVE indicator */
.status-dot.live {
  background: var(--accent-mint);
  box-shadow: 0 0 6px var(--accent-mint);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 4px var(--accent-mint); }
  50% { box-shadow: 0 0 12px var(--accent-mint), 0 0 24px rgba(var(--accent-rgb),0.3); }
}

/* New events badge */
.new-events-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--accent-mint);
  color: var(--bg-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 0 6px;
  margin-left: 8px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
  animation: badgePop 0.3s ease-out;
}
.new-events-badge:hover { transform: scale(1.1); }
@keyframes badgePop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Relay reconnecting pulse */
.status-dot.reconnecting {
  background: #f59e0b;
  animation: pulse 1s ease-in-out infinite;
}

/* ═══════════════════════════════════
   V7.6 — Hashtags, Search Filters, Account
   ═══════════════════════════════════ */

/* Hashtag links */
.hashtag-link {
  color: var(--accent-mint);
  cursor: pointer;
  text-decoration: none;
  font-weight: var(--weight-medium);
  transition: color 0.2s;
}
.hashtag-link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

/* Hashtag header in filtered feed */
.hashtag-header {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  padding: 12px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hashtag-count {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: var(--weight-normal);
}
.btn-clear-tag {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: var(--text-sm);
  transition: all 0.2s;
}
.btn-clear-tag:hover { background: var(--hover-bg); color: var(--text-primary); }

/* Search filters */
.search-filters {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.filter-select, .filter-input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: var(--text-sm);
  font-family: inherit;
  flex-shrink: 0;
}
.filter-select { min-width: 100px; }
.filter-input { min-width: 120px; }
.filter-select:focus, .filter-input:focus {
  outline: none;
  border-color: var(--accent-mint);
}

/* Account tab */
.account-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 16px;
  gap: 12px;
}
.account-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent-mint);
  box-shadow: 0 0 20px rgba(var(--accent-rgb),0.2);
}
.account-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
  z-index: 2;
}
.account-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--white);
}
.account-pk {
  font-family: 'Fira Code', monospace;
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--glass-bg);
  padding: 4px 12px;
  border-radius: var(--radius);
}
.btn-edit-profile {
  background: none;
  border: 1px solid var(--accent-mint);
  color: var(--accent-mint);
  padding: 6px 16px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-edit-profile:hover { background: rgba(var(--accent-rgb),0.1); }

/* Account fields (display mode) */
.account-fields {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 16px;
}
.account-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-primary);
  gap: 12px;
}
.account-field-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.account-field-value {
  font-size: var(--text-base);
  color: var(--text-primary);
  text-align: right;
  word-break: break-word;
}
.account-field-value.link { color: var(--accent-mint); text-decoration: none; }
.account-field-value.mono { font-family: monospace; font-size: var(--text-sm); }
.empty-state-sm {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-base);
}

/* Edit profile form */
.account-edit-fields {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.edit-field { display: flex; flex-direction: column; gap: 4px; }
.edit-field label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.edit-input, .edit-textarea {
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: var(--text-base);
  font-family: inherit;
}
.edit-textarea { resize: vertical; }
.edit-input:focus, .edit-textarea:focus {
  outline: none;
  border-color: var(--accent-mint);
}
.avatar-preview-sm {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  margin-top: 4px;
}
.avatar-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.btn-save-profile {
  flex: 1;
  background: linear-gradient(135deg, var(--accent), #b08060);
  color: var(--white);
  border: none;
  padding: 10px;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  cursor: pointer;
}
.btn-cancel-edit {
  flex: 0;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: var(--text-base);
  cursor: pointer;
}

/* Account stats row */
.account-stats-row {
  display: flex;
  gap: 1px;
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 12px 16px;
}
.account-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  background: var(--bg-primary);
  gap: 4px;
}
.account-stat-val {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}
.account-stat-lbl {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* V7.7 — Relay list */
.relay-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
}
.relay-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--glass-bg);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}
.relay-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}
.relay-dot.live { background: #22c55e; }
.relay-url {
  font-family: monospace;
  font-size: var(--text-sm);
  color: var(--text-primary);
  word-break: break-all;
  flex: 1;
}
.relay-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

/* V7.8 — Follow button */
.follow-btn {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 20px;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.follow-btn:hover {
  background: var(--accent);
  color: var(--white);
}
.follow-btn.following {
  background: var(--glass-bg);
  border-color: var(--border);
  color: var(--text-primary);
}
.follow-btn.following:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--white);
}
.follow-btn.following:hover::after {
  content: ' (unfollow?)';
  font-size: var(--text-xs);
  opacity: 0.9;
}

/* ═══ V7.9 — DMs (NIP-04/17/44) ═══ */

.dm-container {
  display: flex;
  height: calc(100vh - 180px);
  min-height: 400px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass-bg);
}

.dm-sidebar {
  width: 320px;
  min-width: 280px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
}

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

.dm-sidebar-header h3 {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--text-primary);
}

.dm-search-box {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.dm-search-box input {
  flex: 1;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: monospace;
}

.dm-search-box input::placeholder {
  color: var(--text-muted);
  font-family: inherit;
}

.dm-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
}

.dm-conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  margin: 2px 0;
}

.dm-conv-item:hover {
  background: var(--hover-bg);
}

.dm-conv-item.active {
  background: var(--accent);
  color: var(--white);
}

.dm-conv-item.active .dm-conv-meta {
  color: rgba(255,255,255,0.7);
}

.dm-conv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  flex-shrink: 0;
}

.dm-conv-info {
  flex: 1;
  min-width: 0;
}

.dm-conv-name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-conv-item.active .dm-conv-name {
  color: var(--white);
}

.dm-conv-meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Chat area */
.dm-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dm-chat-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 12px;
  text-align: center;
  opacity: 0.6;
}

.dm-chat-placeholder svg {
  opacity: 0.4;
}

.dm-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.dm-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-primary);
}

.dm-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  word-break: break-word;
  animation: msgIn 0.25s var(--ease-out);
  margin: 4px 0;
  font-size: var(--text-base);
  line-height: 1.5;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dm-bubble.dm-in {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 6px;
  margin-right: auto;
}

.dm-bubble.dm-out {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.28), rgba(var(--accent-rgb), 0.12));
  border: 1px solid var(--border-active);
  border-bottom-right-radius: 6px;
  margin-left: auto;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dm-bubble-header {
  font-size: var(--text-xs);
  opacity: 0.65;
  margin-bottom: 3px;
  font-weight: var(--weight-semibold);
}

.dm-bubble-content {
  font-size: var(--text-base);
  line-height: 1.5;
  cursor: default;
}

.dm-compose {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--glass-bg);
  align-items: flex-end;
}

.dm-compose textarea {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: var(--text-base);
  resize: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.dm-compose textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.dm-compose textarea::placeholder {
  color: var(--text-muted);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ═══ V7.10 — Media Upload ═══ */

.compose-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.media-preview-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  aspect-ratio: 1;
  animation: fadeInUp 0.25s ease-out;
}

.media-preview-item.uploading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.media-upload-spinner {
  font-size: var(--text-xl);
  animation: spin 0.8s linear infinite;
}

.media-preview-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.media-preview-wrapper img,
.media-preview-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.7);
  color: var(--white);
  font-size: var(--text-base);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.media-preview-item:hover .media-remove-btn {
  opacity: 1;
}

.media-caption {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ═══ Settings Panel ═══ */
.settings-panel { padding:16px; max-width:600px; margin:0 auto; padding-bottom:100px }
.settings-section { margin-bottom:28px }
.settings-heading { font-size: var(--text-sm); text-transform:uppercase; letter-spacing:1.5px; color:var(--text-dim); margin-bottom:10px; padding-bottom:6px; border-bottom:1px solid var(--border) }
.settings-option { display:flex; align-items:center; justify-content:space-between; padding:12px 0; font-size: var(--text-base); cursor:default; border-bottom:1px solid var(--border-dim) }
.settings-option:last-child { border-bottom:none }
.settings-option span { color:var(--text) }
.settings-option select { background:var(--bg-card); color:var(--text); border:1px solid var(--border); border-radius:8px; padding:6px 12px; font-size: var(--text-sm) }

/* Toggle switch */
.settings-toggle { position:relative; display:inline-block; width:44px; height:24px }
.settings-toggle input { opacity:0; width:0; height:0 }
.toggle-slider { position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0; background:var(--border); border-radius:24px; transition:0.2s }
.toggle-slider:before { content:''; position:absolute; height:18px; width:18px; left:3px; bottom:3px; background: var(--white); border-radius:50%; transition:0.2s }
.settings-toggle input:checked + .toggle-slider { background:var(--accent) }
.settings-toggle input:checked + .toggle-slider:before { transform:translateX(20px) }

/* Relay list */
.settings-relay-list { background:var(--bg-card); border-radius:12px; padding:6px 10px; margin-bottom:8px }
.settings-relay-row { display:flex; align-items:center; gap:8px; padding:7px 0; font-size: var(--text-sm); font-family:monospace; border-bottom:1px solid var(--border-dim) }
.settings-relay-row:last-child { border-bottom:none }
.relay-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0 }
.relay-url { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text) }
.relay-remove-btn { background:none; border:none; color:var(--text-dim); cursor:pointer; padding:2px; flex-shrink:0; transition:color 0.15s; display:flex; align-items:center }
.relay-remove-btn:hover { color: var(--danger) }
.settings-empty-relays { font-size: var(--text-sm); color:var(--text-dim); padding:12px 10px; text-align:center }
.settings-relay-add { display:flex; gap:8px; margin-top:8px }
.settings-relay-add .edit-input { background:var(--bg-card); color:var(--text); border:1px solid var(--border); border-radius:8px; padding:8px 12px; font-size: var(--text-sm); flex:1 }

/* Info rows */
.settings-info-row { display:flex; justify-content:space-between; padding:10px 0; font-size: var(--text-sm); border-bottom:1px solid var(--border-dim) }
.settings-info-row:last-child { border-bottom:none }
.settings-info-value { color:var(--text-dim) }

/* ═══ Mini Follow Button ═══ */
.btn-follow-mini {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--accent); background: transparent;
  color: var(--accent); font-size: var(--text-base); font-weight: var(--weight-bold);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-left: auto; padding: 0; line-height: 1;
  transition: all 0.2s;
}
.btn-follow-mini:hover { background: var(--accent); color: var(--white); }
.btn-follow-mini.following { background: var(--accent); color: var(--white); }
.post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.post-author { display: flex; align-items: center; gap: 4px; }

/* ══════════════════════════════════════════
   V7.20 — NSEC LOGIN + PREMIUM DESIGN
   ══════════════════════════════════════════ */

/* ─── Nsec Login Panel ─── */
.nsec-login-panel {
  max-width: 400px; margin: 0 auto; padding: 32px 20px;
  text-align: center;
}
.nsec-header { margin-bottom: 24px; }
.nsec-header svg { color: var(--accent); margin-bottom: 12px; opacity: 0.7; }
.nsec-header h2 {
  font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--text-primary);
  margin: 0 0 8px;
}
.nsec-desc {
  font-size: var(--text-sm); color: var(--text-muted); line-height: 1.5;
  max-width: 300px; margin: 0 auto;
}
.nsec-input-group {
  position: relative; margin-bottom: 16px;
}
.nsec-input {
  width: 100%; padding: 14px 48px 14px 16px;
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: 12px; color: var(--text-primary);
  font-size: var(--text-base); font-family: 'Urbanist', monospace;
  outline: none; transition: border 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.nsec-input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.1);
}
.nsec-input::placeholder { color: var(--text-dim); font-family: 'Urbanist', sans-serif; }
.nsec-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 4px;
}
.nsec-login-btn {
  width: 100%; padding: 14px; background: linear-gradient(135deg, var(--accent), #b08060);
  color: var(--white); border: none; border-radius: 12px;
  font-size: var(--text-base); font-weight: var(--weight-bold); cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  font-family: 'Urbanist', sans-serif;
}
.nsec-login-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(var(--accent-rgb),0.3); }
.nsec-login-btn:active { transform: translateY(1px); }
.nsec-helper {
  margin-top: 12px; font-size: var(--text-xs); color: var(--text-dim);
  line-height: 1.4;
}
.nsec-warning {
  margin-top: 16px; padding: 10px 14px;
  background: rgba(255,80,50,0.08); border: 1px solid rgba(255,80,50,0.2);
  border-radius: 8px; font-size: var(--text-xs); color: #ff8050;
  line-height: 1.4;
}

/* ─── Damus-style Profile Page V8.16 ─── */
.damus-profile {
  width: 100%; padding-bottom: 100px;
}
.profile-header-bar {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 12px; position: sticky; top: 0; z-index: 10;
  background: rgba(10,10,18,0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-glass);
}
.btn-icon {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.03); color: var(--text-dim);
  font-size: var(--text-sm); cursor: pointer; font-family: 'Urbanist', sans-serif;
  font-weight: var(--weight-semibold); transition: all 0.2s;
}
.btn-icon:hover { background: rgba(255,255,255,0.08); }
.btn-icon:active { transform: scale(0.96); }

.profile-banner {
  width: 100%; height: 120px;
  background: linear-gradient(135deg, #0a0a1a 0%, var(--accent-gradient, #d4a37388) 50%, #0a0a3a 100%);
  position: relative;
}
.profile-banner::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.profile-avatar-xl {
  width: 80px; height: 80px; margin: -40px auto 0;
  border-radius: 50%; border: 4px solid var(--bg-base, #0a0a14);
  overflow: hidden; background: var(--accent);
  position: relative; z-index: 5;
}
.profile-avatar-xl img {
  width: 100%; height: 100%; object-fit: cover;
}

.profile-name-xl {
  margin-top: 10px; font-size: var(--text-xl); font-weight: var(--weight-extrabold); color: var(--text-primary);
  text-align: center; letter-spacing: -0.3px;
}
.profile-npub-row {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 3px;
}
.profile-npub-row span {
  font-size: var(--text-xs); color: var(--text-dim); font-family: monospace;
}
.btn-copy {
  background: none; border: none; font-size: var(--text-base); cursor: pointer;
  padding: 2px 4px; opacity: 0.6; transition: opacity 0.2s;
}
.btn-copy:hover { opacity: 1; }

.profile-bio-damus {
  text-align: center; margin: 10px 20px 0;
  font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5;
  word-break: break-word;
}

.profile-stats-damus {
  display: flex; justify-content: center; gap: 36px;
  margin: 16px 0; padding: 14px 0;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}
.stat-item {
  text-align: center; cursor: pointer; transition: opacity 0.2s;
}
.stat-item:hover { opacity: 0.7; }
.stat-val { font-size: var(--text-xl); font-weight: var(--weight-extrabold); color: var(--text-primary); display: block; }
.stat-label { font-size: var(--text-xs); color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

.profile-section-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px 6px;
  font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--text-primary);
  border-top: 4px solid var(--border-glass);
}
.profile-section-count {
  font-size: var(--text-xs); color: var(--text-dim); font-weight: var(--weight-normal);
}

/* Keep old classes for backward compat */
.logged-in-profile { width: 100%; }
.profile-card { display: none; }

/* Feed mode toggle (All / Following) */
.feed-toggle-bar {
  display: flex; gap: 8px; padding: 12px 16px 8px;
  position: sticky; top: 0; z-index: 5;
  background: var(--bg-base, #0a0a14);
}
.feed-toggle {
  padding: 8px 18px; border-radius: 20px; border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.03); color: var(--text-dim);
  font-size: var(--text-sm); font-weight: var(--weight-semibold); cursor: pointer;
  font-family: 'Urbanist', sans-serif; transition: all 0.2s;
}
.feed-toggle.active {
  background: var(--accent); color: var(--white); border-color: var(--accent);
}
.feed-toggle:hover:not(.active) { background: rgba(255,255,255,0.08); }

/* Pull-to-refresh indicator */
.pull-indicator {
  display: none; text-align: center; padding: 12px;
  color: var(--text-dim); font-size: var(--text-sm); font-weight: var(--weight-semibold);
  font-family: 'Urbanist', sans-serif;
}
.spinning { animation: spin 0.8s linear infinite; display: inline-block; }

/* ─── Premium Card Polish ─── */
.feed-card {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: 12px; padding: 14px; margin-bottom: 8px;
  cursor: pointer; transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.feed-card:hover {
  background: var(--bg-card-hover); border-color: var(--border-active);
  transform: translateY(-1px); box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.feed-card:active { transform: scale(0.99); }

/* ══════════════════════════════════════════════════════════════
   V8.0 PREMIUM DESIGN SYSTEM — Glassmorphism + Micro-animations
   ══════════════════════════════════════════════════════════════ */

/* ─── Depth Gradients ─── */
:root {
  --glass-bg: rgba(212, 163, 115, 0.03);
  --glass-border: rgba(212, 163, 115, 0.08);
  --glass-hover: rgba(212, 163, 115, 0.06);
  --glow-gold: 0 0 20px rgba(212, 163, 115, 0.12), 0 0 60px rgba(212, 163, 115, 0.04);
  --glow-cyan: 0 0 20px rgba(138, 175, 200, 0.12), 0 0 60px rgba(138, 175, 200, 0.04);
  --glow-purple: 0 0 20px rgba(155, 142, 196, 0.12), 0 0 60px rgba(155, 142, 196, 0.04);
  --glow-amber: 0 0 20px rgba(232, 168, 80, 0.12);
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition-smooth: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ─── Glass Card Base ─── */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.04) 0%, transparent 50%, rgba(139,92,246,0.04) 100%);
  pointer-events: none;
  z-index: 0;
}
.glass-card:hover {
  background: var(--glass-hover);
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}

/* ─── Premium Post Card ─── */
.feed-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  margin: 0 12px 10px;
  padding: 14px 14px 12px;
  transition: all 0.25s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.feed-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb),0.3), rgba(139,92,246,0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.feed-card:active {
  transform: scale(0.985);
  background: var(--bg-card-hover);
}
.feed-card:hover::after {
  opacity: 1;
}
.feed-card .feed-avatar {
  border: 2px solid rgba(var(--accent-rgb),0.2);
  border-radius: 50%;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.feed-card:hover .feed-avatar {
  border-color: rgba(var(--accent-rgb),0.5);
  box-shadow: 0 0 12px rgba(var(--accent-rgb),0.15);
}
.feed-card img[src] {
  border-radius: 12px;
  margin-top: 8px;
  max-height: 280px;
  object-fit: cover;
  width: 100%;
}

/* ─── Tab Content Transition ─── */
.tab-content {
  animation: tabFadeIn 0.25s var(--transition-smooth);
  will-change: opacity, transform;
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--transition-smooth), transform 0.5s var(--transition-smooth);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Ripple Effect ─── */
.ripple {
  position: relative;
}
.ripple > * { position: relative; z-index: 1; }
.ripple::after {
  content: '';
  position: absolute;
  width: 100%; padding-bottom: 100%;
  border-radius: 50%;
  background: rgba(var(--accent-rgb),0.15);
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
  top: 50%; left: 50%;
  transform-origin: center;
  z-index: 0;
}
.ripple:active::after {
  animation: ripple 0.6s ease-out;
}
@keyframes ripple {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* ─── Pulse Indicator ─── */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb),0.4); }
  50% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb),0); }
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulse-glow 2s infinite;
}

/* ─── Gradiented Borders ─── */
.glow-border {
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
}
.glow-border::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), #8B5CF6, var(--accent));
  background-size: 200% 200%;
  animation: borderFlow 3s ease infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}
.glow-border:hover::before { opacity: 1; }

/* ─── Premium Stats Cards (Agents / Stats tabs) ─── */
.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  backdrop-filter: blur(16px);
  transition: all 0.3s var(--transition-smooth);
}
.stat-card:hover {
  background: var(--glass-hover);
  border-color: rgba(255,255,255,0.12);
  box-shadow: var(--glow-purple);
}
.stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  background: linear-gradient(135deg, var(--accent), #8B5CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ─── Agent Card (Agents tab) ─── */
.agent-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 10px;
  backdrop-filter: blur(16px);
  transition: all 0.3s var(--transition-smooth);
  cursor: pointer;
}
.agent-card:hover {
  background: var(--glass-hover);
  box-shadow: var(--glow-purple);
  transform: translateY(-2px);
}
.agent-card .agent-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(139,92,246,0.3);
  transition: all 0.3s;
}
.agent-card:hover .agent-avatar {
  border-color: rgba(139,92,246,0.7);
  box-shadow: 0 0 16px rgba(139,92,246,0.25);
}
.agent-status-dot {
  position: absolute; bottom: -2px; right: -2px;
}
.agent-online-dot {
  display: block; width: 10px; height: 10px;
  border-radius: 50%; background: #4ade80;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px rgba(74,222,128,0.5);
}
.agent-idle-dot {
  display: block; width: 10px; height: 10px;
  border-radius: 50%; background: #f5a623;
  border: 2px solid var(--bg-card);
}
.agent-offline-dot {
  display: block; width: 10px; height: 10px;
  border-radius: 50%; background: #666;
  border: 2px solid var(--bg-card);
}
.agent-stats-row {
  display: flex; gap: 16px; margin: 8px 0; font-size: 12px; color: var(--text-dim);
  flex-wrap: wrap;
}
.agent-stats-row span strong,
.agent-stat strong { color: var(--accent); }
.agent-stat { 
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.04); 
  border-radius: 6px; 
  padding: 3px 8px; 
}
.agent-badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; vertical-align: middle;
}
.agent-badge.status-active { background: rgba(0,255,100,0.15); color: #00ff64; }
.agent-badge.status-unknown { background: rgba(150,150,150,0.15); color: #999; }
.agent-badge.status-offline { background: rgba(255,100,100,0.15); color: #ff6464; }
.agent-status {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--text-xs);
}
.agent-status.online { color: #00f0ff; }
.agent-status.offline { color: var(--text-dim); }

/* ─── Phase 4a: Agents Marketplace ─── */
.agents-toolbar {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
}
.agents-search-wrap {
  position: relative; flex: 1; min-width: 200px;
}
.agents-search-input {
  width: 100%; padding: 10px 14px 10px 38px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass-bg);
  color: var(--text);
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}
.agents-search-input:focus {
  border-color: var(--accent);
}
.agents-sort-select {
  padding: 10px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass-bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.agent-title-text {
  font-size: 11px; color: var(--accent);
  margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.agent-meta {
  display: flex; justify-content: center; gap: 8px; align-items: center;
  font-size: 11px; color: var(--text-dim); margin-top: 6px;
}
.agent-pk {
  font-family: monospace; font-size: 10px;
  color: var(--accent); opacity: 0.6;
}
.agents-pagination {
  display: flex; justify-content: center; align-items: center; gap: 14px;
  margin-top: 16px; padding: 12px 0;
}
.agents-page-btn {
  padding: 8px 18px; border: 1px solid var(--glass-border);
  border-radius: 10px; background: var(--glass-bg); color: var(--text);
  cursor: pointer; font-size: 13px; transition: all 0.2s;
}
.agents-page-btn:hover { background: var(--glass-hover); border-color: var(--accent); }
.agents-page-info { font-size: 13px; color: var(--text-dim); }

/* Agent Detail Modal */
.agent-detail { padding: 4px 0; }
.agent-detail-header {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.agent-avatar-lg {
  width: 64px; height: 64px; min-width: 64px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.agent-detail-info { flex: 1; }
.agent-detail-name { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.agent-detail-about { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-bottom: 8px; }
.agent-detail-meta { font-size: 11px; color: var(--text-dim); }
.agent-detail-meta code { font-size: 10px; color: var(--accent); opacity: 0.7; }
.agent-detail-posts { margin: 16px 0; }
.agent-detail-posts h4 { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.agent-post-item {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 6px; cursor: pointer; transition: all 0.2s;
}
.agent-post-item:hover { background: var(--glass-hover); border-color: var(--accent); }
.agent-post-content { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.agent-post-time { font-size: 11px; color: var(--text-dim); }
.agent-detail-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* ─── Phase 4b: DAO Governance ─── */
.dao-tab-btn {
  flex: 1; padding: 8px;
  border: none; background: var(--glass-bg); color: var(--text-dim);
  cursor: pointer; font-size: 13px; transition: all 0.2s;
}
.dao-tab-btn.active { background: var(--accent); color: #000; font-weight: 600; }
.dao-tab-btn:hover:not(.active) { color: var(--text); }
.dao-card {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 16px; margin-bottom: 10px;
  cursor: pointer; transition: all 0.2s;
}
.dao-card:hover { border-color: var(--accent); background: var(--glass-hover); }
.dao-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dao-card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.dao-card-status { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.dao-card-desc { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; line-height: 1.4; }
.dao-card-meta { font-size: 11px; color: var(--text-dim); display: flex; gap: 8px; }
.dao-progress-bar {
  height: 4px; border-radius: 2px; background: rgba(239,68,68,0.2);
  margin-top: 8px; display: flex; overflow: hidden;
}
.dao-progress-yes { background: #4ade80; height: 100%; }
.dao-progress-no { background: #ef4444; height: 100%; }
.dao-detail h3 { font-size: 18px; margin: 0 0 4px; color: var(--text); }
.dao-detail-meta { font-size: 11px; color: var(--text-dim); display: flex; gap: 8px; margin-bottom: 8px; }
.dao-vote-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px;
}
.dao-vote-bar-bg {
  flex: 1; height: 24px; border-radius: 6px; background: rgba(255,255,255,0.05);
  overflow: hidden;
}
.dao-vote-bar {
  height: 100%; border-radius: 6px; display: flex; align-items: center;
  padding: 0 8px; font-size: 12px; font-weight: 600; color: #000; min-width: 40px;
}
.dao-vote-yes { background: #4ade80; }
.dao-vote-no { background: #ef4444; }
.btn-vote-yes, .btn-vote-no, .btn-vote-abstain {
  flex: 1; padding: 10px; border: none; border-radius: 8px;
  cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.2s;
}
.btn-vote-yes { background: rgba(74,222,128,0.15); color: #4ade80; }
.btn-vote-no { background: rgba(239,68,68,0.15); color: #ef4444; }
.btn-vote-abstain { background: rgba(245,166,35,0.15); color: #f5a623; }
.btn-vote-yes:hover { background: rgba(74,222,128,0.3); }
.btn-vote-no:hover { background: rgba(239,68,68,0.3); }
.btn-vote-abstain:hover { background: rgba(245,166,35,0.3); }
.dao-voters { margin-top: 16px; }
.dao-voters h4 { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.dao-voter-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 13px;
}
.dao-voter-name { color: var(--text); }
.dao-voter-vote { font-size: 14px; }
.dao-create h3 { margin: 0 0 16px; color: var(--text); }

/* ─── Skeleton Loading ─── */
/* ─── Improved Profile Card ─── */
.profile-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: all 0.3s var(--transition-smooth);
}
.profile-cover {
  height: 80px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.2), rgba(139,92,246,0.2), rgba(var(--accent-rgb),0.1));
}
.profile-avatar-lg {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(var(--accent-rgb),0.3);
  margin: -36px auto 0;
  transition: all 0.3s;
}
.profile-card:hover .profile-avatar-lg {
  border-color: rgba(var(--accent-rgb),0.6);
  box-shadow: 0 0 24px rgba(var(--accent-rgb),0.2);
}

/* ─── Button Glow ─── */
.btn-glow {
  background: linear-gradient(135deg, var(--accent), #b08060);
  border: none;
  color: var(--white);
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.btn-glow:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}
.btn-glow:active {
  transform: scale(0.97);
}

/* ─── Nsec Login Panel ─── */
.nsec-login-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  margin: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nsec-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 40px 12px 14px;
  color: var(--text-primary);
  font-size: var(--text-base);
  width: 100%;
  transition: all 0.3s;
  font-family: 'JetBrains Mono', monospace;
}
.nsec-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.1);
}
.nsec-login-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #b08060);
  border: none;
  color: var(--white);
  border-radius: 12px;
  padding: 12px;
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 12px;
}
.nsec-login-btn:hover {
  box-shadow: var(--glow-cyan);
}
.logout-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #EF4444;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.3s;
}
.logout-btn:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* ─── Improved Notification Card ─── */
.notify-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin: 8px 12px;
  display: flex; gap: 12px;
  align-items: center;
  transition: all 0.2s var(--transition-smooth);
}
.notify-card:active {
  background: var(--glass-hover);
  transform: scale(0.98);
}

/* ─── Hashtag Badge ─── */
.hashtag-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: var(--weight-medium);
  transition: all 0.2s;
}
.hashtag-link:hover {
  color: var(--white);
  text-shadow: 0 0 8px rgba(var(--accent-rgb),0.5);
}

/* ─── Empty State ─── */

/* ─── Mobile Optimizations ─── */
@media (max-width: 380px) {
  .feed-card { margin: 0 6px 8px; padding: 12px; }
  .stat-value { font-size: var(--text-xl); }
  .agent-card { padding: 12px; }
}

/* ─── Discover Section ─── */
.discover-header {
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.08), rgba(139,92,246,0.06));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  margin: 16px;
  backdrop-filter: blur(16px);
}

/* ═══ V8.8 LIGHTBOX ═══ */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
}
.lightbox-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}
.lightbox-image {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.lightbox-overlay.active .lightbox-image {
  transform: scale(1);
}
.lightbox-close {
  position: fixed; top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: var(--text-xl);
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

/* ═══ V8.8 POST CARD ANIMATIONS ═══ */
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.post-card {
  animation: cardEnter 0.35s ease both;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:nth-child(1) { animation-delay: 0.02s; }
.post-card:nth-child(2) { animation-delay: 0.05s; }
.post-card:nth-child(3) { animation-delay: 0.08s; }
.post-card:nth-child(4) { animation-delay: 0.11s; }
.post-card:nth-child(5) { animation-delay: 0.14s; }
.post-card:nth-child(6) { animation-delay: 0.17s; }
.post-card:nth-child(7) { animation-delay: 0.20s; }
.post-card:nth-child(8) { animation-delay: 0.23s; }
.post-card:nth-child(9) { animation-delay: 0.26s; }
.post-card:nth-child(10) { animation-delay: 0.29s; }
.post-card:active {
  transform: scale(0.985);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.post-images img {
  cursor: pointer;
  transition: filter 0.2s;
}
.post-images img:hover {
  filter: brightness(1.1);
}
.post-images img:active {
  filter: brightness(0.9);
}

/* V8.8 Better image error fallback */
.post-images img[data-failed] {
  display: none;
}

/* ═══ V8.9 COMPOSE LOGIN PROMPT ═══ */
.compose-login-prompt {
  display: none;
  text-align: center;
  padding: 40px 24px;
  animation: cardEnter 0.3s ease both;
}
.compose-login-prompt.active {
  display: block;
}
.compose-login-prompt .prompt-icon {
  font-size: var(--text-display);
  margin-bottom: 12px;
}
.compose-login-prompt h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin: 0 0 8px;
  color: var(--text);
}
.compose-login-prompt p {
  font-size: var(--text-sm);
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 20px;
}
.compose-login-prompt .btn-primary {
  display: inline-block;
  padding: 10px 24px;
  font-size: var(--text-base);
}
.compose-panel.logged-out {
  display: none;
}

/* Muted banner */
.muted-banner {
  text-align: center;
  padding: 8px 16px;
  font-size: var(--text-sm);
  color: var(--text-dim);
  background: var(--glass-bg);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* Bookmark button */
.bookmark-btn { font-size: var(--text-base); opacity: 0.4; transition: opacity 0.2s; }
.bookmark-btn.bookmarked { opacity: 1; }
.bookmark-btn:hover { opacity: 0.8; }

/* Zap modal */
.zap-amount-btn { transition: all 0.15s; }
.zap-amount-btn:hover { border-color: var(--warning); color: var(--warning); }
.zap-amount-btn:active { transform: scale(0.95); }

/* Onboarding */
.onboard-item { transition: background 0.15s; }
.onboard-item:hover { background: rgba(var(--accent-rgb), 0.08); }

/* Hashtag subscriptions */
.btn-sub-hashtag {
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--glass-bg); color: var(--text-dim); cursor: pointer;
  font-size: var(--text-sm); transition: all 0.15s;
}
.btn-sub-hashtag:hover { border-color: var(--accent); color: var(--accent); }
.sub-tag-badge {
  display: inline-block; padding: 3px 8px; border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.12); color: var(--accent); cursor: pointer;
  font-size: var(--text-sm); font-weight: var(--weight-medium);
}
.sub-tag-badge:hover { background: rgba(var(--accent-rgb), 0.22); }

/* NIP-07 login button */
.nip07-login-btn {
  display: block; width: 100%; padding: 10px 20px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--glass-bg); color: var(--text);
  cursor: pointer; font-size: var(--text-base); font-weight: var(--weight-semibold);
  transition: all 0.15s;
}
.nip07-login-btn:hover { border-color: var(--accent); background: rgba(var(--accent-rgb),0.07); }

/* Lists */
.list-card { transition: background 0.15s; }
.list-card:hover { background: rgba(var(--accent-rgb), 0.06); }

/* Communities */
.community-card { transition: background 0.15s; }
.community-card:hover { background: rgba(0, 255, 128, 0.06); }

/* Badges */
.badge-card { transition: background 0.15s; }
.badge-card:hover { background: rgba(240, 165, 0, 0.08); }

/* V8.32 — Push toggle switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.15); transition: 0.3s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; transition: 0.3s; border-radius: 50%; }
input:checked + .slider { background: var(--accent, #00ff80); }
input:checked + .slider:before { transform: translateX(20px); }

/* V8.33 — Analytics bars */
#analyticsContainer [title] { background: linear-gradient(180deg, var(--accent, #00ff80), rgba(0,255,128,0.3)); border-radius: 3px 3px 0 0; min-height: 4px; }
#analyticsContainer .stat-card { transition: background 0.15s; }
#analyticsContainer .stat-card:hover { background: rgba(0, 255, 128, 0.08); }

/* V8.34 — Language chips */
.lang-chip { font-size: var(--text-sm); padding: 5px 10px; white-space: nowrap; }
#langToggleBar { scrollbar-width: none; }
#langToggleBar::-webkit-scrollbar { display: none; }

/* V8.35 — Polls */
.poll-card { cursor: default; }
.poll-question { font-size: var(--text-base); font-weight: var(--weight-semibold); margin-bottom: 10px; padding: 0 2px; }
.poll-options { display: flex; flex-direction: column; gap: 6px; }
.poll-option {
  padding: 8px 10px; border-radius: 8px; background: var(--glass-bg); cursor: pointer;
  transition: background 0.15s; border: 1px solid transparent;
}
.poll-option:hover { background: rgba(0,255,128,0.08); border-color: var(--accent); }
.poll-option-text {
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--text-sm); margin-bottom: 4px;
}
.poll-option-votes { font-size: var(--text-xs); color: var(--text-dim); font-weight: var(--weight-medium); }
.poll-bar {
  height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.poll-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), hsl(160, 100%, 60%));
  transition: width 0.4s ease;
}
.poll-meta { font-size: var(--text-xs); color: var(--text-dim); margin-top: 8px; text-align: right; }
.poll-opt-input::placeholder { color: var(--text-dim); opacity: 0.5; }

/* V8.36 — Trending Feed */
.feed-card-stats { padding: 0 2px; }
.feed-card-stats span { display: inline-flex; align-items: center; gap: 3px; }
.trending-medal { font-size: var(--text-lg); }

/* V8.45 — Visible card enhancements (always-on effects) */
.feed-card, .post-card {
  position: relative;
  overflow: hidden;
}
/* Subtle shimmer line across card */
.feed-card::after, .post-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--accent-rgb), 0.04),
    transparent
  );
  animation: cardShimmer 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cardShimmer {
  0% { left: -100%; }
  50% { left: 120%; }
  100% { left: 120%; }
}
/* Top accent line pulse */
.feed-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb),0.3), transparent);
  animation: accentPulse 3s ease-in-out infinite;
}
@keyframes accentPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.6; }
}

/* ═══════════════════════════════════════════════
   DESIGN FORGE: Phase 2 — VISIBLE ANIMATIONS
   Always-on, no scroll required
   ═══════════════════════════════════════════════ */

/* ── 1. Card Shimmer Sweep (moving light across card) ── */
.post-card .shimmer-sweep {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(var(--accent-rgb),0.03) 45%,
    rgba(180,77,255,0.06) 50%,
    rgba(var(--accent-rgb),0.03) 55%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: shimmerSweep 4s ease-in-out infinite;
  opacity: 0.5;
}

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

/* ── 2. Logo Glitch Effect ── */
.logo-text {
  position: relative;
}
.logo-text::after {
  content: attr(data-text);
  position: absolute;
  left: 2px;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f0ff 0%, var(--neon-cyan) 35%, var(--neon-purple) 70%, var(--neon-magenta) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 4s linear infinite, logoGlitch 6s steps(1) infinite;
  clip-path: inset(0 0 0 0);
  opacity: 0;
}
@keyframes logoGlitch {
  0%, 94%, 96%, 98%, 100% { opacity: 0; clip-path: inset(0 0 0 0); }
  95% { opacity: 0.8; clip-path: inset(20% 0 60% 0); }
  97% { opacity: 0.6; clip-path: inset(60% 0 20% 0); }
}

/* ── 3. Active Nav Breathing Glow ── */
.nav-item.active {
  animation: navBreathe 2.5s ease-in-out infinite;
}
@keyframes navBreathe {
  0%, 100% { box-shadow: 0 0 8px rgba(var(--accent-rgb),0.15); }
  50% { box-shadow: 0 0 20px rgba(var(--accent-rgb),0.3), 0 0 40px rgba(180,77,255,0.1); }
}

/* ── 4. Card Border Rotation (conic gradient sweep) ── */
@keyframes borderRotate {
  0% { --border-angle: 0deg; }
  100% { --border-angle: 360deg; }
}
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.post-card.gpu-border {
  position: relative;
}
.post-card.gpu-border::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 0%,
    var(--neon-cyan) 15%,
    var(--neon-purple) 35%,
    var(--neon-magenta) 55%,
    var(--neon-cyan) 75%,
    transparent 100%
  );
  animation: borderRotate 8s linear infinite;
  z-index: -1;
  opacity: 0.25;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

/* ── 5. Pulse Ring on Feed Toggle Active ── */
.feed-toggle.active::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid var(--neon-cyan);
  animation: pulseRingOut 2s ease-out infinite;
  pointer-events: none;
  opacity: 0;
}
@keyframes pulseRingOut {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* ── 6. Compose Textarea Focus Glow ── */
#composeContent:focus {
  animation: composeGlow 1.5s ease-in-out infinite alternate;
}
@keyframes composeGlow {
  0% { box-shadow: 0 0 8px rgba(var(--accent-rgb),0.15); }
  100% { box-shadow: 0 0 24px rgba(var(--accent-rgb),0.25), 0 0 48px rgba(180,77,255,0.1); }
}

/* ── 7. Tab Content Entrance ── */
.tab-content.visible {
  animation: tabSlideIn 0.4s var(--spring-snappy) both;
}
@keyframes tabSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 8. Profile Avatar Magnetic Glow ── */
.avatar-ring {
  animation: avatarGlow 3s ease-in-out infinite;
}
@keyframes avatarGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(var(--accent-rgb),0.2); }
  50% { box-shadow: 0 0 28px rgba(var(--accent-rgb),0.4), 0 0 48px rgba(180,77,255,0.2); }
}

/* ── 9. Notification Badge Bounce ── */
.notification-badge:not(:empty) {
  animation: badgeBounce 0.6s var(--spring-bouncy) both;
}
@keyframes badgeBounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════
   PHASE 3: Scanlines + Cyber Grid + CRT Glow
   V8.50 — always visible cyberpunk effects
   ═══════════════════════════════════════════════ */

/* Scanline overlay — subtle horizontal lines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(var(--accent-rgb), 0.008) 2px,
    rgba(var(--accent-rgb), 0.008) 3px
  );
  opacity: 0.5;
}

/* Vignette — darker edges, brighter center */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(4,2,10,0.6) 100%);
}

/* Grid lines glow */
.grid-overlay {
  opacity: 0.35; /* more visible */
}

/* Animated data stream on edges */
.data-stream-left,
.data-stream-right {
  position: fixed;
  top: 0;
  width: 1px;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--neon-cyan) 20%,
    var(--neon-purple) 50%,
    var(--neon-cyan) 80%,
    transparent 100%
  );
  animation: dataStreamSlide 6s linear infinite;
  opacity: 0.3;
}
.data-stream-left { left: 5%; animation-delay: 0s; }
.data-stream-right { right: 8%; animation-delay: -3s; height: 70%; top: 15%; }

@keyframes dataStreamSlide {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* Pulsating cyber ring on edges */
.cyber-corner {
  position: fixed;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(var(--accent-rgb),0.15);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  animation: cornerPulse 4s ease-in-out infinite;
}
.cyber-corner:nth-child(1) { top: -40px; left: -40px; animation-delay: 0s; }
.cyber-corner:nth-child(2) { top: -40px; right: -40px; animation-delay: -2s; }
.cyber-corner:nth-child(3) { bottom: -40px; left: -40px; animation-delay: -1s; }
.cyber-corner:nth-child(4) { bottom: -40px; right: -40px; animation-delay: -3s; }

@keyframes cornerPulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* ═══════════════════════════════════════════════
   PHASE 4: In-Your-Face Card Effects
   V8.52 — visible, dramatic, impossible to miss
   ═══════════════════════════════════════════════ */

/* 1. NEON BORDER TRAIL — bright animated border running around cards */
.post-card {
  position: relative;
  overflow: visible;
}
.post-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  padding: 2px;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 0%,
    var(--neon-cyan) 15%,
    var(--neon-purple) 50%,
    var(--neon-cyan) 85%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderTrail 4s linear infinite;
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes borderTrail {
  to { --border-angle: 360deg; }
}

/* 2. CARD GLOW — outer neon glow pulsing */
.post-card {
  box-shadow:
    0 0 15px rgba(var(--accent-rgb), 0.15),
    0 0 40px rgba(180, 0, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.4s var(--df-ease-out), transform 0.15s var(--df-ease-out);
}
.post-card:hover,
.post-card:active {
  box-shadow:
    0 0 25px rgba(var(--accent-rgb), 0.35),
    0 0 60px rgba(180, 0, 255, 0.2),
    0 0 100px rgba(var(--accent-rgb), 0.1),
    0 12px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(-3px) scale(1.01);
}

/* 3. AVATAR GLOW — profile pictures with neon ring */
.post-avatar {
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.5), 0 0 25px rgba(180, 0, 255, 0.2) !important;
  border: 2px solid rgba(var(--accent-rgb), 0.4) !important;
  transition: all 0.3s ease;
}
.post-card:hover .post-avatar {
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.8), 0 0 40px rgba(180, 0, 255, 0.4) !important;
  border-color: rgba(var(--accent-rgb), 0.8) !important;
}

/* 4. CARD CONTENT GLOW — neon accent on text/icons */
.post-card .post-icon svg,
.post-card .post-metric svg {
  filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.6));
}
.post-card .post-username {
  text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.3);
}

/* 5. NAV ITEMS — brighter active state */
.nav-item.active {
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.5), 0 4px 12px rgba(var(--accent-rgb), 0.2) !important;
  text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6) !important;
}

/* 6. CLICK BURST PARTICLES */
.click-burst {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
}
.click-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: burstFade 0.8s ease-out forwards;
}
@keyframes burstFade {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--bx), var(--by)) scale(0); opacity: 0; }
}

/* 7. DATA STREAMS — thicker + brighter */
.data-stream-left,
.data-stream-right {
  opacity: 0.45;
  width: 2px;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5), 0 0 20px rgba(180, 0, 255, 0.3) !important;
}

/* 8. CYBER CORNERS — bigger + brighter */
.cyber-corner {
  width: 180px;
  height: 180px;
  border-width: 2px;
  border-color: rgba(var(--accent-rgb), 0.25) !important;
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.15) !important;
}

/* 9. SCANLINES — more visible */
body::before {
  opacity: 0.7;
}

/* 10. Card stagger reveal animation */
.post-card {
  animation: cardReveal 0.5s var(--df-ease-out) both;
  animation-delay: calc(var(--stagger-index, 0) * 50ms);
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(20px) scale(0.95); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* 11. Animated gradient accent bar inside cards */
.post-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    var(--neon-cyan),
    var(--neon-purple),
    var(--neon-cyan),
    transparent
  );
  background-size: 200% 100%;
  animation: accentSlide 3s linear infinite;
  z-index: 1;
  opacity: 0.8;
  border-radius: 0 0 2px 2px;
}
@keyframes accentSlide {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══ V8.59 B1 — Multi-Account ═══ */
.account-indicator {
  padding: 2px 6px;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.account-indicator:hover {
  border-color: var(--accent);
}

.acct-switcher-dropdown {
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.acct-switcher-item:hover {
  background: rgba(255,255,255,0.03);
}
.acct-switcher-item.active {
  background: rgba(var(--accent-rgb, 0, 212, 255), 0.1);
}

/* Mobile: account indicator compact */
@media (max-width: 639px) {
  .account-indicator span { display: none; }
  .acct-switcher-dropdown { width: 220px !important; }
}

/* V8.80 NIP-46 Remote Signer */
.nip46-connect-btn {
  display: block; width: 100%; padding: 12px; border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.1); color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.25); cursor: pointer;
  font-size: var(--text-base); font-weight: var(--weight-semibold); transition: all 0.2s;
}
.nip46-connect-btn:hover { background: rgba(var(--accent-rgb), 0.2); }
#nip46BunkerInput { text-align: center; }
#nip46BunkerInput::selection { background: var(--accent); color: var(--white); }

/* ─── V8.79 Long-form Articles ─── */
.article-card { flex-direction: column; overflow: hidden; padding: 0 !important; }
.article-hero { width: 100%; max-height: 240px; overflow: hidden; }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-body { padding: 16px 18px 12px; }
.article-title { font-size: var(--text-lg); font-weight: var(--weight-bold); line-height: 1.3; margin: 0 0 10px; color: var(--text); }
.article-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: var(--text-sm); color: var(--text-dim); }
.article-meta .post-avatar { width: 20px; height: 20px; font-size: var(--text-xs); }
.article-author { font-weight: var(--weight-semibold); cursor: pointer; color: var(--text); }
.article-author:hover { color: var(--accent); }
.article-time { opacity: 0.7; }
.article-kind-badge { font-size: var(--text-xs); padding: 2px 8px; border-radius: 12px; background: rgba(var(--accent-rgb), 0.12); color: var(--accent); margin-left: auto; }
.article-summary { font-size: var(--text-sm); line-height: 1.6; color: var(--text-dim); margin: 0 0 8px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.article-tag { font-size: var(--text-xs); padding: 2px 10px; border-radius: 14px; background: var(--glass-bg); color: var(--accent); cursor: pointer; transition: all 0.2s; }
.article-tag:hover { background: rgba(var(--accent-rgb), 0.2); }

/* Article full view modal */
.article-full-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 10000; overflow-y: auto; padding: 20px; }
.article-full-sheet { max-width: 800px; margin: 40px auto; background: var(--bg); border-radius: 16px; overflow: hidden; }
.article-full-hero { width: 100%; max-height: 400px; overflow: hidden; }
.article-full-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-full-content { padding: 28px 32px; }
.article-full-title { font-size: var(--text-2xl); font-weight: var(--weight-extrabold); line-height: 1.2; margin: 0 0 16px; }
.article-full-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; font-size: var(--text-sm); color: var(--text-dim); padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.article-full-body { font-size: var(--text-base); line-height: 1.8; color: var(--text); word-break: break-word; }
.article-full-body h1,.article-full-body h2,.article-full-body h3 { margin: 24px 0 12px; }
.article-full-body p { margin: 0 0 12px; }
.article-full-body img { max-width: 100%; border-radius: 10px; margin: 12px 0; }
.article-full-body code { background: var(--glass-bg); padding: 2px 6px; border-radius: 4px; font-size: var(--text-sm); }
.article-full-body pre { background: var(--glass-bg); padding: 16px; border-radius: 10px; overflow-x: auto; font-size: var(--text-sm); line-height: 1.5; }
.article-full-close { position: fixed; top: 16px; right: 24px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.6); border: none; color: var(--white); font-size: var(--text-xl); cursor: pointer; z-index: 10001; display: flex; align-items: center; justify-content: center; }

@media (max-width: 639px) {
  .article-full-sheet { margin: 10px auto; border-radius: 12px; }
  .article-full-content { padding: 18px; }
  .article-full-title { font-size: var(--text-xl); }
  .article-hero { max-height: 160px; }
  .article-title { font-size: var(--text-base); }
}

/* ═══ ONBOARDING STEPS V8.85 ═══ */
.onboard-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  transition: all 0.3s;
}
.onboard-dot.active { background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb),0.4); }
.onboard-dot.done { background: #4caf50; }
.onboard-step { transition: opacity 0.2s; }

/* ═══════════════════════════════════════════════
   SNIN Client — SVG Icon System v1.0
   Replaces all emoji icons with crisp SVG
   ═══════════════════════════════════════════════ */

.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: -0.25em;
  flex-shrink: 0;
}

.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* ─── Navigation & Feed ─── */
.icon-globe    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E"); }
.icon-users    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.icon-bell     { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E"); }

/* ─── Actions ─── */
.icon-lock     { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.icon-chart    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E"); }
.icon-list     { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E"); }
.icon-badge    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='7'/%3E%3Cpolyline points='8.21 13.89 7 23 12 20 17 23 15.79 13.88'/%3E%3C/svg%3E"); }
.icon-settings { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 1v2m0 18v2M4.22 4.22l1.42 1.42m12.72 12.72 1.42 1.42M1 12h2m18 0h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3E%3C/svg%3E"); }
.icon-bookmark { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.icon-mute    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cline x1='23' y1='9' x2='17' y2='15'/%3E%3Cline x1='17' y1='9' x2='23' y2='15'/%3E%3C/svg%3E"); }
.icon-community { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.icon-refresh  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpath d='M20.49 15a9 9 0 1 1-2.12-9.36L23 10'/%3E%3C/svg%3E"); }
.icon-flame   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2c-1.5 3-4 5-4 8a4 4 0 008 0c0-3-2.5-5-4-8z' fill='%23d4a373' fill-opacity='0.3'/%3E%3Cpath d='M12 22c-3.3 0-6-2.7-6-6 0-2 1-3.5 2.5-5'/%3E%3Cpath d='M12 22c3.3 0 6-2.7 6-6 0-2-1-3.5-2.5-5'/%3E%3C/svg%3E"); }
.icon-copy     { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E"); }
.icon-user     { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); }
.icon-palette  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a10 10 0 0 1 0 20'/%3E%3Cpath d='M12 2a10 10 0 0 0 0 20'/%3E%3Ccircle cx='12' cy='12' r='4' fill='%23d4a373'/%3E%3C/svg%3E"); }
.icon-block    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='4.93' y1='4.93' x2='19.07' y2='19.07'/%3E%3C/svg%3E"); }
.icon-relay    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 18 12 15 21 9 3 6 12 2 12'/%3E%3C/svg%3E"); }

/* ─── Compose ─── */
.icon-plus     { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E"); }
.icon-attach   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E"); }
.icon-article  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E"); }
.icon-poll     { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E"); }
.icon-star     { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d4a373' stroke='%23d4a373' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E"); }

/* ─── Fox (Nostr Extension) ─── */
.icon-fox      { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8a850' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E"); }

/* ─── Pulse animation for icons ─── */
@keyframes iconPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.icon-pulse { animation: iconPulse 2s ease-in-out infinite; }
/* ═══════════════════════════════════════════════
   SNIN Client — Premium UI Enhancements v2.0
   Typography · Cards · Micro-interactions · Polish
   ═══════════════════════════════════════════════ */

/* ─── TYPOGRAPHY UPGRADE ─── */
.tab-heading {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tab-heading .icon { width: 24px; height: 24px; }

/* ─── CARD DEPTH UPGRADE ─── */
.card-premium {
  background: rgba(18, 18, 34, 0.65);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(212, 163, 115, 0.08);
  border-radius: 16px;
  padding: 18px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.card-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(212, 163, 115, 0.15), transparent 40%, transparent 70%, rgba(212, 163, 115, 0.08));
  -webkit-mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
  mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card-premium:hover {
  transform: translateY(-2px);
  background: rgba(22, 22, 40, 0.75);
  border-color: rgba(212, 163, 115, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(212, 163, 115, 0.08);
}
.card-premium:active {
  transform: translateY(0);
  transition: all 0.1s ease;
}

/* ─── METRIC CARD ENHANCEMENT ─── */
.metric-card {
  background: rgba(18, 18, 34, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 163, 115, 0.06);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.metric-card:hover {
  background: rgba(24, 24, 44, 0.7);
  border-color: rgba(212, 163, 115, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.metric-card:hover::after { opacity: 1; }
.metric-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.metric-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ─── STAT BAR CHART ENHANCEMENT ─── */
.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 12px;
  transition: all 0.2s ease;
}
.stat-bar-row:hover {
  transform: translateX(2px);
}
.stat-bar-label {
  width: 110px;
  text-align: right;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.stat-bar-track {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: rgba(255,255,255,0.04);
  overflow: hidden;
  position: relative;
}
.stat-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.stat-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
  border-radius: 5px 5px 0 0;
}
.stat-bar-value {
  width: 52px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ─── SECTION CARDS ─── */
.section-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(18, 18, 32, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 163, 115, 0.06);
  margin-bottom: 12px;
  transition: all 0.3s ease;
}
.section-card:hover {
  border-color: rgba(212, 163, 115, 0.12);
  background: rgba(22, 22, 40, 0.65);
}
.section-card-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

/* ─── EMPTY STATE ENHANCEMENT ─── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
  filter: grayscale(0.3);
}
.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.empty-state-sub {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ─── MICRO-INTERACTIONS ─── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-line {
  background: linear-gradient(90deg, transparent 0%, rgba(212, 163, 115, 0.08) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  height: 1px;
  margin: 8px 0;
}

/* ─── TAG / CHIP ENHANCEMENT ─── */
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(212, 163, 115, 0.08);
  color: var(--accent-light);
  border: 1px solid rgba(212, 163, 115, 0.12);
  transition: all 0.2s ease;
  cursor: pointer;
}
.tag-chip:hover {
  background: rgba(212, 163, 115, 0.15);
  border-color: rgba(212, 163, 115, 0.25);
}
.tag-chip.active {
  background: rgba(212, 163, 115, 0.18);
  border-color: rgba(212, 163, 115, 0.35);
  color: var(--accent);
}

/* ─── BUTTON ENHANCEMENT ─── */
.btn-premium {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(212, 163, 115, 0.2);
  background: rgba(212, 163, 115, 0.08);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-premium:hover {
  background: rgba(212, 163, 115, 0.16);
  border-color: rgba(212, 163, 115, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 163, 115, 0.1);
}
.btn-premium:active {
  transform: translateY(0);
}

/* ─── DIVIDER ─── */
.divider-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 163, 115, 0.15), transparent);
  margin: 16px 0;
  border: none;
}

/* ─── GRADIENT TEXT ─── */
.text-gradient {
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── INPUT ENHANCEMENT ─── */
.input-premium {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(212, 163, 115, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.25s ease;
  outline: none;
}
.input-premium:focus {
  border-color: rgba(212, 163, 115, 0.35);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.06);
}
.input-premium::placeholder {
  color: var(--text-dim);
}

/* ─── TOOLTIP ─── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(20, 20, 36, 0.95);
  border: 1px solid rgba(212, 163, 115, 0.15);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 100;
  backdrop-filter: blur(12px);
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── LINK ENHANCEMENT ─── */
.link-premium {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}
.link-premium:hover {
  color: var(--accent-light);
  border-bottom-color: rgba(212, 163, 115, 0.3);
}

/* ─── SKELETON UPGRADE ─── */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ─── RESPONSIVE POLISH ─── */
@media (max-width: 768px) {
  .metric-value { font-size: 24px; }
  .metric-card { padding: 12px 10px; }
  .tab-heading { font-size: 20px; }
  .card-premium { padding: 14px; border-radius: 14px; }
  .stat-bar-label { width: 80px; font-size: 10px; }
  .empty-state { padding: 36px 20px; }
}

/* ─── SCROLLBAR POLISH ─── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(212, 163, 115, 0.2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212, 163, 115, 0.35); }
/* ═══════════════════════════════════════════════
   SNIN Client — Deep Design Polish v3.0
   Nav · Cards · Interactivity · Typography
   ═══════════════════════════════════════════════ */

/* ─── NAVIGATION: Gold accent + interactive polish ─── */
.bottom-nav {
  background: rgba(8, 8, 16, 0.94) !important;
  border-top: 1px solid rgba(212, 163, 115, 0.1) !important;
  box-shadow:
    0 -8px 32px rgba(0,0,0,0.7),
    0 0 20px rgba(212, 163, 115, 0.02),
    inset 0 1px 0 rgba(255,255,255,0.015) !important;
}

.nav-item {
  color: var(--text-dim);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.22, 0.95, 0.28, 1);
}

.nav-item:hover {
  color: var(--text-secondary);
  background: rgba(212, 163, 115, 0.05);
}

.nav-item.active {
  color: var(--accent) !important;
  background: rgba(212, 163, 115, 0.1) !important;
  text-shadow: 0 0 10px rgba(212, 163, 115, 0.4) !important;
  box-shadow: 0 0 16px rgba(212, 163, 115, 0.08) !important;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0; left: 30%; right: 30%;
  height: 2.5px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 0 10px var(--accent-glow), 0 2px 4px var(--accent-glow);
}

.nav-item.active svg {
  filter: drop-shadow(0 0 6px rgba(212, 163, 115, 0.5));
  transform: scale(1.1);
}

.nav-item .nav-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.nav-item.active .nav-label {
  font-weight: 600;
}

/* Nav badge — gold dot */
.nav-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 14px; height: 14px;
  border-radius: 7px;
  background: var(--accent);
  color: #08080f;
  font-size: 8px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ─── FEED CARDS: Typography & interactivity ─── */
.post-card {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover {
  transform: translateY(-1px);
}

.post-author {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-primary);
}

.post-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  word-break: break-word;
}

.post-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Post action buttons — interactive */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(212, 163, 115, 0.08);
  color: var(--accent-light);
}

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

.action-btn.zap-btn:hover {
  background: rgba(232, 168, 80, 0.12);
  color: var(--accent-warm);
}

.action-btn.mute-btn:hover {
  background: rgba(201, 122, 106, 0.12);
  color: var(--accent-rose);
}

.action-btn.bookmark-btn:hover {
  background: rgba(212, 163, 115, 0.12);
  color: var(--accent);
}

.action-btn.bookmarked {
  color: var(--accent) !important;
}

/* ─── AUTHOR AVATAR GLOW ─── */
.post-avatar {
  transition: all 0.3s ease;
}
.post-avatar:hover {
  box-shadow: 0 0 12px var(--accent-glow);
  transform: scale(1.05);
}

/* ─── POST HEADER POLISH ─── */
.post-header {
  gap: 10px;
}
.post-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── THREAD REPLY CARDS ─── */
.thread-reply {
  border-left: 2px solid rgba(212, 163, 115, 0.15);
  padding-left: 12px;
  margin-bottom: 10px;
  transition: border-color 0.3s ease;
}
.thread-reply:hover {
  border-left-color: rgba(212, 163, 115, 0.35);
}

/* ─── STATS/ANALYTICS CARDS — smooth hover ─── */
.metric-card {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── SETTINGS CARDS — premium polish ─── */
.settings-heading {
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(212, 163, 115, 0.06);
  margin-bottom: 14px !important;
}
.settings-heading .icon {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

/* ─── EMPTY STATES — beautiful with icons ─── */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-state .icon-xl {
  width: 48px;
  height: 48px;
  opacity: 0.25;
  margin-bottom: 4px;
}

.empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
}

.empty-sub {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 280px;
  line-height: 1.5;
}

/* ─── BUTTON UPGRADES ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: rgba(212, 163, 115, 0.13);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover {
  background: rgba(212, 163, 115, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 163, 115, 0.12);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(212, 163, 115, 0.12);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-secondary:hover {
  border-color: rgba(212, 163, 115, 0.3);
  color: var(--text-secondary);
}

/* ─── COMPOSE FORM — softer edges ─── */
.compose-form {
  background: rgba(18, 18, 34, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 163, 115, 0.08);
  border-radius: 16px;
  padding: 18px;
}

.compose-form textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 163, 115, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  padding: 14px;
  width: 100%;
  min-height: 100px;
  resize: vertical;
  outline: none;
  transition: all 0.25s ease;
}
.compose-form textarea:focus {
  border-color: rgba(212, 163, 115, 0.3);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.05);
}

/* ─── SEARCH FIELD POLISH ─── */
.search-field {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(212, 163, 115, 0.1) !important;
  border-radius: 12px !important;
  color: var(--text-primary) !important;
  padding: 10px 16px !important;
  font-size: 13px !important;
  outline: none;
  transition: all 0.25s ease;
}
.search-field:focus {
  border-color: rgba(212, 163, 115, 0.3) !important;
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.05) !important;
}

/* ─── MODAL POLISH ─── */
.modal-content {
  background: rgba(14, 14, 30, 0.96) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  border: 1px solid rgba(212, 163, 115, 0.12) !important;
  border-radius: 20px !important;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── DIVIDER LINE ─── */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 163, 115, 0.1), transparent);
  margin: 16px 0;
}

/* ─── RESPONSIVE POLISH ─── */
@media (max-width: 768px) {
  .nav-item {
    min-width: 36px;
    padding: 5px 5px;
  }
  .nav-item .nav-label {
    font-size: 8px;
  }
  .post-content {
    font-size: 14px;
    line-height: 1.5;
  }
  .empty-state {
    padding: 36px 20px;
  }
}

/* ─── FEED TOGGLE PILLS — gold theme ─── */
.feed-toggle {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(212, 163, 115, 0.1);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
}
.feed-toggle:hover {
  border-color: rgba(212, 163, 115, 0.25);
  color: var(--text-secondary);
}
.feed-toggle.active {
  background: rgba(212, 163, 115, 0.12);
  border-color: rgba(212, 163, 115, 0.3);
  color: var(--accent);
}

/* Language chips */
.lang-chip {
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(212, 163, 115, 0.08);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-chip:hover {
  border-color: rgba(212, 163, 115, 0.2);
  color: var(--text-secondary);
}
.lang-chip.active {
  background: rgba(212, 163, 115, 0.12);
  border-color: rgba(212, 163, 115, 0.3);
  color: var(--accent);
}

/* ═══ V7.11 — Discover Feed ═══ */

.discover-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.discover-header svg {
  color: var(--accent);
}

.discover-header span:first-of-type {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.discover-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: auto;
}

.feed-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}

.feed-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.feed-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.feed-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feed-author-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.feed-author-id {
  font-size: 11px;
  color: var(--text-dim);
  font-family: monospace;
}

.feed-card-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-list {
  padding-bottom: 80px;
}

/* ═══ V7.12 — Profile Card V8 ═══ */

.profile-card-v8 {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  margin: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.profile-banner {
  height: 100px;
  position: relative;
}

.profile-avatar-section {
  display: flex;
  justify-content: center;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.profile-avatar-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  animation: avatar-spin 6s linear infinite;
}

@keyframes avatar-spin {
  100% { filter: hue-rotate(360deg); }
}

.profile-avatar-ring img,
.profile-avatar-fallback {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  object-fit: cover;
}

.profile-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 22px;
}

.profile-info {
  text-align: center;
  padding: 8px 16px 12px;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.profile-nip05 {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 4px;
}

.profile-pk {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.profile-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto 12px;
}

.profile-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.profile-link-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.profile-link-btn:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
}

.profile-link-btn.share {
  cursor: pointer;
  border-color: var(--accent);
  color: var(--accent);
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.profile-stat {
  text-align: center;
}

.stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-actions {
  padding: 12px 16px;
  text-align: center;
}

.btn-edit-profile-v8 {
  padding: 8px 24px;
  border-radius: 20px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit-profile-v8:hover {
  background: var(--accent);
  color: var(--white);
}

.edit-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
}

.edit-field {
  margin-bottom: 12px;
}

.edit-field label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.edit-input,
.edit-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.edit-textarea {
  resize: vertical;
  min-height: 80px;
}

.edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-save-profile {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel-edit {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}
/* ============================================================
   Design Forge v3.1 — Полная интеграция emilkowalski/skills
   Источники: все 6 скиллов + AUDIT.md + STANDARDS.md + apple-design
   ============================================================ */

/* ============================================================
   1. CUSTOM EASING TOKENS (emil-design-eng §3)
   ============================================================ */
:root {
  /* Strong ease-out — для enter/exit UI */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* Strong ease-in-out — для on-screen движения */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* iOS-like drawer (Ionic Framework) */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* Spring equivalents for CSS (apple-design §4) */
  --spring-default: cubic-bezier(0.22, 0.95, 0.34, 1);     /* damping 1.0, response 0.4 */
  --spring-snappy: cubic-bezier(0.22, 0.95, 0.28, 1);      /* damping 1.0, response 0.3 */
  --spring-bouncy: cubic-bezier(0.22, 0.95, 0.22, 1.02);   /* damping 0.8, response 0.4 */

  /* Duration tokens */
  --duration-press: 160ms;
  --duration-tooltip: 150ms;
  --duration-dropdown: 200ms;
  --duration-modal: 350ms;
  --duration-drawer: 400ms;
  --duration-stagger: 50ms;

  /* Spatial tokens (apple-design §12) */
  --blur-material: 20px;
  --blur-heavy: 40px;
  --opacity-material: 0.6;
  --opacity-scrim: 0.4;
}

/* ============================================================
   2. ANIMATION DECISION FRAMEWORK (emil-design-eng §1-4)
   Frequency-based: high-frequency = no animation,
   occasional = standard, rare = delight allowed.
   These classes encode the decisions.
   ============================================================ */

/* HIGH FREQUENCY (100+/day) — no animation, instant */
.no-animate,
.command-palette,
.keyboard-shortcut {
  transition: none !important;
  animation: none !important;
}

/* TENS/DAY — drastically reduced */
.reduced-animate {
  transition-duration: 80ms;
}
.reduced-animate:active {
  transform: scale(0.98);
}

/* STANDARD (occasional) — defaults below */
/* RARE/DELIGHT — longer, bouncier allowed */
.delight-animate {
  --ease-out: var(--spring-bouncy);
}

/* ============================================================
   3. BUTTONS & PRESS FEEDBACK (emil-design-eng §Buttons)
   ============================================================ */

/* Base button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  user-select: none;

  /* Only animate transform+opacity (performance rule) */
  transition:
    transform var(--duration-press) var(--ease-out),
    opacity var(--duration-press) var(--ease-out),
    box-shadow var(--duration-press) var(--ease-out);

  /* Press feedback: instant on pointer-down (apple-design §1) */
  &:active {
    transform: scale(0.97);
  }

  /* Disabled */
  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    &:active { transform: none; }
  }
}

.btn-primary {
  background: var(--accent, #2563eb);
  color: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);

  &:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
}

.btn-outline {
  background: transparent;
  border: 1.5px solid currentColor;
  color: var(--accent, #2563eb);

  &:hover {
    background: rgba(37, 99, 235, 0.06);
  }
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(var(--blur-material));
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: inherit;

  &:hover {
    background: rgba(255, 255, 255, 0.2);
  }
}

.btn-ghost {
  background: transparent;
  color: inherit;

  &:hover {
    background: rgba(128, 128, 128, 0.1);
  }
}

/* Hold-to-confirm (emil-design-eng §clip-path) */
.btn-hold {
  position: relative;
  overflow: hidden;

  &::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    clip-path: inset(0 100% 0 0);
    transition: clip-path 200ms var(--ease-out);
  }

  &:active::after {
    clip-path: inset(0 0 0 0);
    transition: clip-path 2s linear;  /* slow deliberate press */
  }
}

/* Sizes */
.btn-lg { padding: 14px 32px; font-size: 1.1rem; }
.btn-xl { padding: 18px 40px; font-size: 1.25rem; }

/* CTA pulse ring — attention draw (rare use only) */
.pulse-ring {
  animation: pulseRing 2s var(--ease-out) infinite;
}
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* ============================================================
   4. CARDS (emil-design-eng §Physicality)
   ============================================================ */

.card {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition:
    transform 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-glass {
  background: rgba(255, 255, 255, var(--opacity-material));
  backdrop-filter: blur(var(--blur-material));
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 24px;
  transition:
    transform 200ms var(--ease-out),
    background 200ms var(--ease-out);
}

.card-glass:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

/* Card press — entire card is pressable */
.card-pressable:active {
  transform: scale(0.98);
  transition: transform 100ms var(--ease-out);
}

/* ============================================================
   5. HERO ANIMATIONS (stagger + blur entrance)
   ============================================================ */

.hero-title {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(4px);
  animation: heroReveal 600ms var(--ease-out) 100ms forwards;
}

.hero-subtitle {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(2px);
  animation: heroReveal 500ms var(--ease-out) 250ms forwards;
}

.hero-cta {
  opacity: 0;
  transform: translateY(4px);
  animation: heroReveal 400ms var(--ease-out) 400ms forwards;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ============================================================
   6. STAGGER SYSTEM (emil-design-eng §Stagger)
   30-80ms delays, decorative only, never blocks interaction
   ============================================================ */

/* Base: all items hidden */
.stagger-visible .stagger-item,
.stagger-fast .stagger-item {
  opacity: 0;
  transform: translateY(12px);
}

/* When visible → cascade */
.stagger-visible .stagger-item {
  animation: staggerIn 400ms var(--ease-out) forwards;
}
.stagger-fast .stagger-item {
  animation: staggerIn 300ms var(--ease-out) forwards;
}

/* nth-child delays — 50ms spacing */
.stagger-visible .stagger-item:nth-child(1)  { animation-delay: 0ms; }
.stagger-visible .stagger-item:nth-child(2)  { animation-delay: 50ms; }
.stagger-visible .stagger-item:nth-child(3)  { animation-delay: 100ms; }
.stagger-visible .stagger-item:nth-child(4)  { animation-delay: 150ms; }
.stagger-visible .stagger-item:nth-child(5)  { animation-delay: 200ms; }
.stagger-visible .stagger-item:nth-child(6)  { animation-delay: 250ms; }
.stagger-visible .stagger-item:nth-child(7)  { animation-delay: 300ms; }
.stagger-visible .stagger-item:nth-child(8)  { animation-delay: 350ms; }
.stagger-visible .stagger-item:nth-child(9)  { animation-delay: 400ms; }
.stagger-visible .stagger-item:nth-child(10) { animation-delay: 450ms; }

/* Fast stagger — 30ms spacing */
.stagger-fast .stagger-item:nth-child(1)  { animation-delay: 0ms; }
.stagger-fast .stagger-item:nth-child(2)  { animation-delay: 30ms; }
.stagger-fast .stagger-item:nth-child(3)  { animation-delay: 60ms; }
.stagger-fast .stagger-item:nth-child(4)  { animation-delay: 90ms; }
.stagger-fast .stagger-item:nth-child(5)  { animation-delay: 120ms; }
.stagger-fast .stagger-item:nth-child(6)  { animation-delay: 150ms; }
.stagger-fast .stagger-item:nth-child(7)  { animation-delay: 180ms; }
.stagger-fast .stagger-item:nth-child(8)  { animation-delay: 210ms; }
.stagger-fast .stagger-item:nth-child(9)  { animation-delay: 240ms; }
.stagger-fast .stagger-item:nth-child(10) { animation-delay: 270ms; }

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   7. SCROLL REVEAL (native IntersectionObserver via JS)
   CSS handles the visible state; JS adds .revealed
   ============================================================ */

.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 500ms var(--ease-out),
    transform 500ms var(--ease-out);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll reveal with blur (emil-design-eng §blur) */
.scroll-reveal-blur {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(4px);
  transition:
    opacity 500ms var(--ease-out),
    transform 500ms var(--ease-out),
    filter 500ms var(--ease-out);
}
.scroll-reveal-blur.revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ============================================================
   8. POPOVERS, DROPDOWNS, TOOLTIPS
   Origin-aware + interruptible (emil-design-eng §Popovers)
   ============================================================ */

/* Base popover — scale from trigger, not center */
.popover {
  transform-origin: var(--radix-popover-content-transform-origin, top);
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity var(--duration-dropdown) var(--ease-out),
    transform var(--duration-dropdown) var(--ease-out);
}

.popover[data-state="open"] {
  opacity: 1;
  transform: scale(1);
}

/* Dropdown / Select */
.dropdown {
  transform-origin: var(--radix-dropdown-menu-content-transform-origin, top);
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity var(--duration-dropdown) var(--ease-out),
    transform var(--duration-dropdown) var(--ease-out);
}

.dropdown[data-state="open"] {
  opacity: 1;
  transform: scale(1);
}

/* Tooltip (emil-design-eng §Tooltips) */
.tooltip {
  transform-origin: var(--transform-origin, center);
  opacity: 0;
  transform: scale(0.97);
  transition:
    opacity var(--duration-tooltip) var(--ease-out),
    transform var(--duration-tooltip) var(--ease-out);
}

.tooltip[data-state="instant-open"] {
  opacity: 1;
  transform: scale(1);
}

/* Skip delay on subsequent tooltips (responsive toolbar) */
.tooltip[data-instant] {
  transition-duration: 0ms;
}

/* ============================================================
   9. MODALS & DRAWERS (emil-design-eng + apple-design)
   ============================================================ */

/* Modal — transform-origin: center (correct!) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, var(--opacity-scrim));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.25s var(--ease-out);
}

.modal-content {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;

  /* Center origin + scale entrance */
  transform-origin: center;
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity var(--duration-modal) var(--ease-out),
    transform var(--duration-modal) var(--ease-out);

  /* Push background back (apple-design §12) */
  &[data-state="open"] {
    opacity: 1;
    transform: scale(1);
  }
}

/* Sheet / Drawer (apple-design + emil-design-eng) */
.drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 90vh;
  background: var(--card-bg, #fff);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);

  /* Drawer-specific easing */
  transform: translateY(100%);
  transition: transform var(--duration-drawer) var(--ease-drawer);
}

.drawer[data-state="open"] {
  transform: translateY(0);
}

/* Glass drawer variant (apple-design §12) */
.drawer-glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(var(--blur-heavy)) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}

/* ============================================================
   10. TOAST / NOTIFICATION (interruptible transitions!)
   ============================================================ */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--card-bg, #1e293b);
  color: var(--white);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);

  /* TRANSITIONS — interruptible, retargets from current state */
  opacity: 0;
  transform: translateY(100%) scale(0.97);

  /* @starting-style for entry without JS (modern browsers) */
  @starting-style {
    opacity: 0;
    transform: translateY(100%) scale(0.97);
  }

  transition:
    opacity 400ms var(--ease-out),
    transform 400ms var(--ease-out);
}

.toast-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Legacy support: data-mounted pattern */
.toast[data-mounted="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Toast exit — same direction, faster */
.toast-exit {
  opacity: 0;
  transform: translateY(100%) scale(0.97);
  transition-duration: 200ms; /* exit faster than enter */
}

/* ============================================================
   11. NAVIGATION LINKS (underline on hover)
   ============================================================ */

.nav-link {
  position: relative;
  text-decoration: none;
  color: inherit;
  padding: 4px 0;

  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: width 200ms var(--ease-out);
  }

  &:hover::after {
    width: 100%;
  }
}

/* ============================================================
   12. CLIP-PATH RECIPES (emil-design-eng §clip-path)
   ============================================================ */

/* Reveal from bottom → top */
.clip-reveal-bottom {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 600ms var(--ease-out);
}
.clip-reveal-bottom.revealed {
  clip-path: inset(0 0 0 0);
}

/* Reveal from left → right */
.clip-reveal-left {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 500ms var(--ease-out);
}
.clip-reveal-left.revealed {
  clip-path: inset(0 0 0 0);
}

/* Before/After comparison slider */
.comparison-slider {
  position: relative;
  overflow: hidden;
}
.comparison-after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
}

/* ============================================================
   13. SKELETON LOADING
   ============================================================ */

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(128, 128, 128, 0.06) 25%,
    rgba(128, 128, 128, 0.15) 50%,
    rgba(128, 128, 128, 0.06) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}

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

/* Skeleton shapes */
.skeleton-text { height: 1em; margin-bottom: 0.5em; }
.skeleton-title { height: 1.5em; width: 60%; margin-bottom: 1em; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-card { height: 200px; }

/* ============================================================
   14. 3D TRANSFORMS (emil-design-eng §3D)
   ============================================================ */

.preserve-3d {
  transform-style: preserve-3d;
}

.perspective-near {
  perspective: 600px;
}

.perspective-far {
  perspective: 1200px;
}

/* Orbiting animation */
@keyframes orbit {
  from { transform: translate(-50%, -50%) rotateY(0deg) translateZ(72px) rotateY(0deg); }
  to   { transform: translate(-50%, -50%) rotateY(360deg) translateZ(72px) rotateY(-360deg); }
}

.orbit {
  animation: orbit 8s linear infinite;
}

/* Card flip */
.card-flip {
  transition: transform 400ms var(--ease-in-out);
  transform-style: preserve-3d;
}
.card-flip.flipped {
  transform: rotateY(180deg);
}

/* ============================================================
   15. STATE TRANSITIONS (blur-masked crossfade)
   ============================================================ */

/* Blur bridge for imperfect crossfades (emil-design-eng §blur) */
.state-transition {
  transition:
    filter 250ms var(--ease-out),
    opacity 250ms var(--ease-out);
}

.state-transition.transitioning {
  filter: blur(2px);
  opacity: 0.7;
}

/* ============================================================
   16. LOADING & EMPTY STATES
   ============================================================ */

/* Pulsing indicator */
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent, #2563eb);
  animation: pulse 1.5s var(--ease-out) infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.6; }
}

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(128, 128, 128, 0.4);
  animation: typingBounce 1.4s var(--ease-out) infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

/* ============================================================
   17. APPLE MATERIALS (apple-design §12)
   ============================================================ */

/* Toolbar / Nav — translucent layer */
.material-toolbar {
  background: rgba(255, 255, 255, var(--opacity-material));
  backdrop-filter: blur(var(--blur-material)) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Heavy material — sidebar/chrome */
.material-heavy {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(var(--blur-heavy)) saturate(180%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* Sheet material */
.material-sheet {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(var(--blur-heavy)) saturate(180%);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Vibrancy — readable text over blur (apple-design §12) */
.material-vibrant {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(var(--blur-material)) saturate(180%);
}
.material-vibrant .vibrant-text {
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(0, 0, 0, 0.85);
}

/* Scroll edge gradient instead of hard divider (apple-design §12) */
.scroll-edge-fade {
  position: sticky;
  top: 0;
  z-index: 10;

  &::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 1),
      rgba(255, 255, 255, 0)
    );
  }
}

/* ============================================================
   18. APPLE TYPOGRAPHY (apple-design §15)
   ============================================================ */

:root {
  font: 100%/1.5 system-ui, -apple-system, sans-serif;
}

.display-text {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;        /* tight leading for large text */
  letter-spacing: -0.02em;  /* negative tracking as size grows */
  font-optical-sizing: auto;
}

.heading-xl { font-size: 2.5rem; line-height: 1.1; letter-spacing: -0.015em; }
.heading-lg { font-size: 2rem;   line-height: 1.15; letter-spacing: -0.01em; }
.heading-md { font-size: 1.5rem; line-height: 1.2; }
.heading-sm { font-size: 1.25rem; line-height: 1.3; }

.body-lg { font-size: 1.125rem; line-height: 1.6; }
.body-md { font-size: 1rem;     line-height: 1.5; }
.body-sm { font-size: 0.875rem; line-height: 1.45; }
.caption  { font-size: 0.75rem; line-height: 1.4; letter-spacing: 0.01em; }

/* Tabular numbers — for counters/timers that change */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   19. INTERRUPTIBLE LISTS (add/remove items)
   ============================================================ */

.list-enter {
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition:
    opacity 300ms var(--ease-out),
    transform 300ms var(--ease-out);
}

.list-enter-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.list-exit {
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  transition-duration: 200ms;  /* exit faster (asymmetric timing) */
}

/* ============================================================
   20. NUMBER COUNTER / TICKER
   ============================================================ */

@keyframes countUp {
  from { opacity: 0; transform: translateY(1em); }
  to   { opacity: 1; transform: translateY(0); }
}

.counter-digit {
  display: inline-block;
  animation: countUp 400ms var(--spring-snappy) forwards;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   21. IMAGE REVEAL ON SCROLL
   ============================================================ */

.img-reveal {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 800ms var(--ease-out);
}

.img-reveal.revealed {
  clip-path: inset(0 0 0 0);
}

/* ============================================================
   22. GESTURE HINTS (visual affordances)
   ============================================================ */

.gesture-hint-swipe {
  animation: hintSwipe 2s var(--ease-in-out) infinite;
}

@keyframes hintSwipe {
  0%, 100% { transform: translateX(0); }
  30%      { transform: translateX(-12px); }
  60%      { transform: translateX(0); }
}

/* ============================================================
   23. ACCESSIBILITY (emil-design-eng + apple-design §14)
   ============================================================ */

/* Reduced motion: gentler, NOT zero */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-title,
  .hero-subtitle,
  .hero-cta {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
  }

  /* Keep opacity/color for comprehension, drop movement */
  .btn:active {
    transform: none;
  }

  .card:hover {
    transform: none;
  }

  .stagger-item {
    opacity: 1;
    transform: none;
    animation: none;
  }

  /* Keep essential feedback */
  .btn-hold::after {
    transition: opacity 200ms ease;
  }

  .pulse-dot {
    animation: pulseOpacity 1.5s ease infinite;
  }

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

/* Touch devices — gate hover animations (apple-design §14) */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  }

  .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
}

/* No hover animations for touch */
@media (hover: none), (pointer: coarse) {
  .card:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }
}

/* Reduced transparency (apple-design §14) */
@media (prefers-reduced-transparency: reduce) {
  .material-toolbar,
  .material-heavy,
  .material-sheet,
  .material-vibrant {
    background: var(--card-bg, #fff);
    backdrop-filter: none;
  }

  .card-glass {
    background: var(--card-bg, #fff);
    backdrop-filter: none;
  }
}

/* Increased contrast (apple-design §14) */
@media (prefers-contrast: more) {
  .material-toolbar,
  .material-heavy,
  .material-sheet {
    background: var(--card-bg, #fff);
    border: 1px solid rgba(0, 0, 0, 0.3);
  }
}

/* ============================================================
   24. DARK MODE materials
   ============================================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: #1a1a2e;
  }

  .material-toolbar {
    background: rgba(30, 30, 50, var(--opacity-material));
    backdrop-filter: blur(var(--blur-material)) saturate(120%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .material-heavy {
    background: rgba(20, 20, 40, 0.85);
  }

  .material-sheet {
    background: rgba(30, 30, 50, 0.85);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 8px 32px rgba(0, 0, 0, 0.3);
  }

  .card-glass {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .card-glass:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* ============================================================
   25. UTILITY: Instant transitions (for JS-driven toggles)
   ============================================================ */

.transition-none {
  transition: none !important;
}

/* Debug: slow everything down 5x */
.debug-slow * {
  animation-duration: 5s !important;
  transition-duration: 2s !important;
}
/* ═══════════════════════════════════════════════
   Design Forge V3 — LUXURY PRESETS
   Warm gold + charcoal palette (theme-luxury)
   Emil Kowalski animation standards
   All presets adapted for SNIN Client
   ═══════════════════════════════════════════════ */

/* ═══ GLASS PANEL — strong backdrop blur ═══ */
.glass-panel {
  background: rgba(12, 12, 22, 0.82) !important;
  backdrop-filter: blur(24px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(140%) !important;
  border: 1px solid rgba(212, 163, 115, 0.10) !important;
  box-shadow:
    0 8px 36px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(212, 163, 115, 0.03) !important;
}

/* ═══ HOLO CARD — luxury card ═══ */
.holo-card {
  border: 1px solid rgba(212, 163, 115, 0.12);
  border-radius: 14px;
  box-shadow:
    0 2px 16px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(212, 163, 115, 0.03);
  transition:
    transform 250ms var(--df-spring-snappy),
    border-color 250ms var(--df-ease-out),
    box-shadow 250ms var(--df-ease-out);
}

.holo-card:hover {
  border-color: rgba(212, 163, 115, 0.35);
  transform: translateY(-2px);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(212, 163, 115, 0.10);
}

/* ═══ PLASMA TEXT — warm gold gradient ═══ */
.plasma-text {
  background: linear-gradient(135deg, var(--accent) 0%, #e8a850 35%, #c9976a 65%, var(--accent) 100%) !important;
  background-size: 200% 200% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: plasmaShift 6s ease-in-out infinite;
}

@keyframes plasmaShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ═══ NEON GLOW — remapped to gold ═══ */
.neon-glow, .glow-cyan {
  box-shadow: 0 0 16px var(--accent-glow), 0 0 40px var(--accent-glow) !important;
}

.glow-purple {
  box-shadow: 0 0 16px var(--accent-purple-glow), 0 0 40px var(--accent-purple-glow) !important;
}

.glow-amber {
  box-shadow: 0 0 16px var(--accent-warm-glow), 0 0 40px var(--accent-warm-glow) !important;
}

/* ═══ SCANLINE — subtle texture ═══ */
.scanline {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(212, 163, 115, 0.015) 2px,
    rgba(212, 163, 115, 0.015) 4px
  );
  pointer-events: none;
}

/* ═══ CYBER GRID — gold grid ═══ */
.cyber-grid {
  background-image:
    linear-gradient(rgba(212, 163, 115, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 163, 115, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ═══ ACCENT BORDER PULSE ═══ */
.accent-border-pulse {
  border: 1px solid var(--accent);
  animation: accentPulse 3s ease-in-out infinite;
}

@keyframes accentPulse {
  0%, 100% { border-color: rgba(212, 163, 115, 0.2); }
  50% { border-color: rgba(212, 163, 115, 0.5); }
}

/* ═══ GLOW BUTTON — CTA with warmth ═══ */
.glow-button {
  background: linear-gradient(135deg, var(--accent), #c9976a) !important;
  color: var(--bg-root) !important;
  border: none !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  transition:
    transform 160ms var(--df-spring-snappy),
    box-shadow 160ms var(--df-ease-out) !important;
}

.glow-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow) !important;
}

.glow-button:active {
  transform: scale(0.97);
}

/* ═══ PULSE RING — CTA animation ═══ */
.pulse-ring {
  position: relative;
}

.pulse-ring::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.15); }
}

/* ═══ PRESS FEEDBACK (Emil Kowalski) ═══ */
:active.pressable,
.pressable:active {
  transform: scale(0.97) !important;
  transition: transform 100ms var(--df-ease-out) !important;
}

/* ═══ REDUCED MOTION ═══ */
@media (prefers-reduced-motion: reduce) {
  .plasma-text { animation: none !important; }
  .accent-border-pulse { animation: none !important; }
  .pulse-ring::after { animation: none !important; opacity: 0 !important; }
  .holo-card { transition: none !important; }
}
/* ═══ V12.0 — SNIN Phase 3: Trust + nav-sep ═══ */

.nav-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}

.pill-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.pill-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pill-btn:hover:not(.active) {
  background: var(--glass-bg);
  color: var(--text);
}

.trust-card {
  transition: background 0.2s, transform 0.15s;
}

.trust-card:hover {
  background: rgba(var(--accent-rgb), 0.08) !important;
  transform: translateX(2px);
}

.btn-back {
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-back:hover {
  opacity: 0.7;
}

/* ─── Trust Lens Overlay ─── */
.trust-lens-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: trustLensFadeIn 200ms var(--ease-out);
}

@keyframes trustLensFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.trust-lens-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  margin: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: trustLensSlideIn 250ms var(--ease-out);
}

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

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

.trust-lens-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.trust-lens-close {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.trust-lens-close:hover {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text);
}

.trust-lens-body {
  padding: 20px;
}

.trust-lens-score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.trust-lens-score-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: trustDotPulse 2s infinite;
}

@keyframes trustDotPulse {
  0%, 100% { box-shadow: 0 0 8px currentColor; }
  50% { box-shadow: 0 0 18px currentColor; }
}

.trust-lens-score-info {
  flex: 1;
  min-width: 0;
}

.trust-lens-level {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 2px;
}

.trust-lens-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.trust-lens-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  font-weight: 600;
}

.trust-lens-trusters {
  margin-bottom: 12px;
}

.trust-lens-truster {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--glass-bg);
  margin-bottom: 4px;
  font-size: 13px;
}

.trust-lens-truster-name {
  color: var(--text);
  font-weight: 500;
}

.trust-lens-truster-score {
  font-weight: 700;
  font-size: 14px;
}

.trust-lens-empty {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  padding: 20px;
}

.trust-lens-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.trust-lens-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: #000;
  transition: transform var(--ease-out) 150ms, opacity var(--ease-out) 150ms;
}

.trust-lens-btn:active {
  transform: scale(0.97);
}

.trust-lens-btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.trust-lens-error {
  font-size: 13px;
  color: #ef4444;
  text-align: center;
  padding: 20px;
}

.empty-dim {
  color: var(--text-dim);
  font-style: italic;
}

/* ═══ V12.0 — Phase 3: ZK Proofs ═══ */

.stat-mini {
  flex: 1;
  min-width: 100px;
  padding: 12px;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-mini-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  font-family: monospace;
}

.stat-mini-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.zk-card {
  transition: background 0.2s, transform 0.15s;
}

.zk-card:hover {
  background: rgba(var(--accent-rgb), 0.08) !important;
  transform: translateX(2px);
}

/* ─── ZK Badge Styles (V13) ─── */
.zk-indicator {
  font-size: 13px;
  vertical-align: middle;
  filter: drop-shadow(0 0 3px var(--zk-green-glow));
}

.zk-badge-mini {
  font-size: 9px;
  font-weight: 700;
  color: var(--zk-green);
  background: rgba(var(--zk-green-rgb), 0.12);
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.zk-shield {
  font-size: 20px;
  line-height: 1;
}

.zk-info-box {
  animation: zkPulse 3s ease-in-out infinite;
}

@keyframes zkPulse {
  0%, 100% { border-color: rgba(var(--zk-green-rgb), 0.2); }
  50% { border-color: rgba(var(--zk-green-rgb), 0.35); }
}

.zk-challenge-preview {
  animation: fadeIn 0.3s var(--ease-out);
}

.zk-result-ok {
  color: var(--zk-green);
  font-weight: 600;
}

.zk-result-err {
  color: var(--danger);
  font-weight: 500;
}

/* ─── Social Graph Explorer (V14) ─── */
.graph-header {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.graph-type-tabs {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 2px;
}

.graph-type-tab {
  padding: 4px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.graph-type-tab.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.graph-type-tab:hover:not(.active) {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.graph-status {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
}

.graph-container {
  position: relative;
  height: calc(100vh - 200px);
  min-height: 400px;
  background: #0a0a14;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 8px;
}

#graphCanvas {
  cursor: grab;
  display: block;
}

#graphCanvas:active {
  cursor: grabbing;
}

.graph-detail-panel {
  position: absolute;
  bottom: 60px;
  right: 16px;
  width: 240px;
  max-width: calc(100% - 32px);
  background: rgba(10,10,20,0.95);
  border: 1px solid rgba(240,165,0,0.3);
  border-radius: 12px;
  padding: 12px;
  backdrop-filter: blur(10px);
  z-index: 10;
  animation: graphPanelIn 0.2s var(--ease-out);
}

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

.graph-hint {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  padding: 6px;
}
