@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════════
   THEME TOKENS
   :root  → layout / sizing (theme-agnostic)  + default DARK colors
   [data-theme="light"] → light overrides
   切换由 web/src/store/theme.ts 写到 <html data-theme="dark|light">
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Layout / sizing (theme-agnostic) ── */
  --radius-card: 12px;
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 64px;
  --radius-input-bar: 20px;
  --radius-btn: 8px;
  --radius-send-btn: 50%;
  --radius-thumbnail: 8px;
  --radius-dropdown: 12px;
  --input-bar-max-width: 950px;
  --send-btn-size: 36px;
  --thumbnail-size: 80px;
  --toolbar-height: 44px;
  --toolbar-btn-height: 32px;

  /* ══════════════════════════════════════════════
     DEFAULT = DARK THEME COLORS
     ══════════════════════════════════════════════ */
  --color-bg-page: #07070f;
  --color-bg-input-bar: rgba(255, 255, 255, 0.06);
  --color-border-input-bar: rgba(255, 255, 255, 0.10);
  --color-primary: #6c63ff;
  --color-text-primary: #f1f0ff;
  --color-text-secondary: #8b8ea8;
  --color-text-disabled: #4c4f6b;
  --color-bg-hover: rgba(255, 255, 255, 0.08);
  --color-bg-dropdown: rgba(13, 13, 26, 0.92);
  --color-bg-upload: rgba(255, 255, 255, 0.04);
  --color-border-upload: rgba(255, 255, 255, 0.08);
  --color-btn-send-disabled: #3a3a4a;
  --color-btn-send-active: #6c63ff;
  --color-sidebar-bg: rgba(7, 7, 15, 0.80);

  --color-bg-sidebar: rgba(7, 7, 15, 0.80);
  --color-sidebar-active: rgba(255, 255, 255, 0.08);
  --color-sidebar-hover: rgba(255, 255, 255, 0.04);
  --color-bg-card: rgba(255, 255, 255, 0.06);
  --color-border-card: rgba(255, 255, 255, 0.10);
  --color-success: #00b894;
  --color-danger: #e74c3c;
  --color-warning: #f39c12;

  /* Modal & overlay */
  --color-modal-overlay: rgba(0, 0, 0, 0.6);
  --color-overlay-strong: rgba(0, 0, 0, 0.7);
  --color-bg-modal: #111118;
  --color-bg-modal-elevated: #16161e;
  --color-bg-modal-glass: rgba(22, 22, 30, 0.92);
  --color-bg-elevated: #0a0a0f;
  --color-bg-placeholder: #1a1a2e;
  --color-bg-dropdown-elevated: #1a1a24;
  --color-bg-video: #000;
  --color-border-modal: #2a2a38;
  --color-border-modal-soft: rgba(255, 255, 255, 0.08);
  --color-border-soft: rgba(255, 255, 255, 0.06);
  --color-border-row: rgba(255, 255, 255, 0.04);
  --color-shadow-modal: rgba(0, 0, 0, 0.6);
  --color-shadow-dropdown: rgba(0, 0, 0, 0.4);

  /* Text variants */
  --color-text-tertiary: #888;
  --color-text-quaternary: #555;
  --color-text-light: #e2e2ea;
  --color-text-monochrome: #ccc;
  --color-text-on-glass: rgba(255, 255, 255, 0.7);
  --color-text-on-glass-soft: rgba(255, 255, 255, 0.5);
  --color-text-on-glass-faint: rgba(255, 255, 255, 0.4);

  /* Status accents */
  --color-info: #00b8e6;
  --color-purple-accent: #a78bfa;
  --color-danger-text: #ef4444;
  --color-success-bg: rgba(0, 184, 148, 0.15);
  --color-success-bg-hover: rgba(0, 184, 148, 0.10);
  --color-info-bg: rgba(0, 184, 230, 0.15);
  --color-info-bg-hover: rgba(0, 184, 230, 0.10);
  --color-info-bg-soft: rgba(0, 184, 230, 0.12);
  --color-danger-bg: rgba(231, 76, 60, 0.15);
  --color-danger-bg-hover: rgba(231, 76, 60, 0.10);
  --color-danger-bg-soft: rgba(231, 76, 60, 0.08);
  --color-danger-border: rgba(231, 76, 60, 0.20);
  --color-purple-bg: rgba(167, 139, 250, 0.15);
  --color-purple-bg-hover: rgba(167, 139, 250, 0.10);

  /* Charts */
  --color-tooltip-bg: rgba(13, 13, 26, 0.95);
  --color-tooltip-border: rgba(255, 255, 255, 0.10);
  --color-chart-axis: rgba(255, 255, 255, 0.08);
  --color-chart-grid: rgba(255, 255, 255, 0.06);
  --color-chart-area-from: rgba(108, 99, 255, 0.25);
  --color-chart-area-to: rgba(108, 99, 255, 0.02);
  --color-accent-2: #06d6a0;
  --color-primary-2: #8b5cf6;

  /* Misc */
  --color-progress-track: rgba(255, 255, 255, 0.2);
  --color-on-primary: #fff;
  --color-on-overlay: #fff;

  /* Brand mint accent (Auth modals) */
  --color-mint-accent: #7edcc8;
  --color-mint-accent-bg: rgba(120, 220, 200, 0.12);
  --color-mint-accent-bg-hover: rgba(120, 220, 200, 0.22);
  --color-mint-accent-border: rgba(120, 220, 200, 0.30);
  --color-mint-accent-glow: rgba(120, 220, 200, 0.15);

  /* Warning bg variants */
  --color-warning-bg: rgba(243, 156, 18, 0.12);
  --color-warning-bg-hover: rgba(243, 156, 18, 0.18);
  --color-warning-border: rgba(243, 156, 18, 0.30);

  /* Primary alpha hover */
  --color-primary-bg: rgba(108, 99, 255, 0.04);
  --color-primary-bg-hover: rgba(108, 99, 255, 0.08);

  /* Generic overlay tiers */
  --color-overlay-soft: rgba(0, 0, 0, 0.5);
  --color-overlay-medium: rgba(0, 0, 0, 0.3);
  --color-overlay-faint: rgba(0, 0, 0, 0.15);

  /* Modal/upload trigger hover surfaces */
  --color-border-modal-hover: #5a5a6a;
  --color-bg-modal-hover: #1e1e2a;

  /* Inset highlight (glass surfaces) */
  --color-inset-highlight: rgba(255, 255, 255, 0.05);
  --color-inset-highlight-strong: rgba(255, 255, 255, 0.12);

  /* @ Mention pill */
  --color-mention-bg: rgba(108, 99, 255, 0.12);
  --color-mention-bg-hover: rgba(108, 99, 255, 0.22);
  --color-mention-bg-active: rgba(108, 99, 255, 0.15);
  --color-mention-text: rgba(108, 99, 255, 0.7);
  --color-mention-text-hover: rgba(108, 99, 255, 0.9);

  /* Shimmer */
  --color-shimmer-purple-soft: rgba(108, 99, 255, 0.03);
  --color-shimmer-purple-mid: rgba(108, 99, 255, 0.08);
  --color-shimmer-purple-2-mid: rgba(139, 92, 246, 0.12);

  /* Brighter danger */
  --color-danger-hover: #ff6b6b;
  --color-danger-hover-bg: rgba(255, 107, 107, 0.08);
  --color-danger-hover-bg-strong: rgba(255, 107, 107, 0.10);
  --color-danger-hover-border: rgba(255, 107, 107, 0.30);

  /* Info hover (brighter cyan) */
  --color-info-hover: #00ccff;
  --color-info-hover-2: #33ccf0;
  --color-info-shadow-soft: rgba(0, 184, 230, 0.30);
  --color-info-shadow-strong: rgba(0, 184, 230, 0.50);

  /* Lightbox / extra-deep overlay */
  --color-overlay-deep: rgba(0, 0, 0, 0.85);

  /* White alpha utility */
  --color-bg-on-media: rgba(255, 255, 255, 0.15);
  --color-bg-on-media-hover: rgba(255, 255, 255, 0.25);

  /* Toast warning */
  --color-warning-toast: #e8952e;

  /* Scrollbar thumb */
  --color-scrollbar-thumb: rgba(255, 255, 255, 0.10);
  --color-scrollbar-thumb-hover: rgba(255, 255, 255, 0.20);

  /* Aurora / decorative bg layers */
  --color-aurora-1: rgba(108, 99, 255, 0.6);
  --color-aurora-2: rgba(59, 130, 246, 0.5);
  --color-aurora-3: rgba(139, 92, 246, 0.35);
  --color-aurora-peach: rgba(255, 130, 100, 0.20);
  --color-cursor-glow: rgba(108, 99, 255, 0.06);
  --color-grid-line: rgba(255, 255, 255, 0.02);

  /* ─── V2 新增 tokens (2026-05-11) ─── */
  /* GLASS 类（透明白 + blur，用于 sidebar/banner/modal overlay/dropdown） */
  --color-bg-glass: rgba(255, 255, 255, 0.06);
  --color-bg-glass-strong: rgba(255, 255, 255, 0.10);
  --color-border-glass-edge: rgba(255, 255, 255, 0.12);

  /* 行 hover（实体卡内表格 hover；与 --color-bg-hover 区分） */
  --color-bg-row-hover: rgba(255, 255, 255, 0.02);

  /* Multi-layer shadows — Vercel/GitBook 风格 */
  --shadow-card-light: 0 1px 2px rgba(0, 0, 0, 0.30),
                       0 4px 16px rgba(0, 0, 0, 0.40);
  --shadow-glass-light: 0 8px 32px rgba(0, 0, 0, 0.30),
                        0 1px 2px rgba(0, 0, 0, 0.40),
                        inset 0 1px 0 rgba(255, 255, 255, 0.08);

  /* 暖调 chip (公告/Trial/"新版上线") */
  --color-chip-warm-bg: rgba(255, 200, 130, 0.10);
  --color-chip-warm-border: rgba(255, 200, 130, 0.25);
  --color-chip-warm-text: #f1f0ff;
  --color-chip-warm-badge-bg: rgba(255, 150, 100, 0.20);
  --color-chip-warm-badge-text: #ffb589;

  /* V2-fix: 主题感知的 hover/border (替换 V1 漏改的白透 alpha) */
  --color-bg-glass-hover: rgba(255, 255, 255, 0.12);
  --color-border-glass-hover: rgba(255, 255, 255, 0.15);
  --color-bg-thumbnail: rgba(0, 0, 0, 0.30);          /* 视频缩略图 bg (dark) */
  --color-bg-thumbnail-hover: rgba(0, 0, 0, 0.15);    /* 缩略图 hover overlay */
  --color-shadow-thumb: rgba(0, 0, 0, 0.30);          /* 缩略图阴影 */

  /* Backdrop-filter 标准五档 */
  --bf-glass-sm: blur(12px) saturate(140%);
  --bf-glass-md: blur(16px) saturate(160%);
  --bf-glass-lg: blur(24px) saturate(180%);
  --bf-glass-xl: blur(40px) saturate(180%);
}

/* ══════════════════════════════════════════════
   LIGHT THEME OVERRIDES — V2
   规范:Vercel Geist 灰阶 + GitBook/Framer 玻璃 + Linear pastel aurora
   关键变化:
     - 玻璃面用 _白透明_ rgba(255,255,255,0.65) — V1 是黑透明,方向反了
     - aurora 不再 display:none,保留 pastel 紫蓝桃给玻璃穿透色源
     - 实体卡 bg = #ffffff 纯白 + multi-layer shadow + 1px shadow-border
     - LandingPage 不再强制 dark,跟随主题切换
     - 玻璃顶边 inset highlight 白高光是 frosted glass 视觉标志
   主色加深 18% 满足 WCAG AA
   ══════════════════════════════════════════════ */
[data-theme="light"] {
  /* ── Page surfaces ── */
  --color-bg-page: #fafafa;
  --color-bg-input-bar: rgba(255, 255, 255, 0.85);  /* 玻璃输入条 */
  --color-bg-dropdown: rgba(255, 255, 255, 0.85);   /* 玻璃下拉 */
  --color-bg-upload: #ffffff;                       /* 实体上传区 */
  --color-bg-card: #ffffff;                         /* ★ V2 核心:实体白卡,不是黑透明 */
  --color-bg-hover: rgba(0, 0, 0, 0.04);            /* 行 hover 黑透明保留(不是玻璃) */
  --color-bg-row-hover: rgba(0, 0, 0, 0.03);

  /* ── GLASS surfaces (sidebar / banner / modal overlay) ── */
  --color-bg-glass: rgba(255, 255, 255, 0.65);      /* ★ V2 核心:玻璃透白 */
  --color-bg-glass-strong: rgba(255, 255, 255, 0.85);
  --color-sidebar-bg: rgba(255, 255, 255, 0.70);    /* 真正玻璃 */
  --color-bg-sidebar: rgba(255, 255, 255, 0.70);
  --color-sidebar-active: rgba(0, 0, 0, 0.06);
  --color-sidebar-hover: rgba(0, 0, 0, 0.04);

  /* ── Borders — Vercel shadow-border 风格 0.08 ── */
  --color-border-input-bar: rgba(0, 0, 0, 0.10);
  --color-border-card: rgba(0, 0, 0, 0.08);
  --color-border-upload: rgba(0, 0, 0, 0.06);
  --color-border-modal: rgba(0, 0, 0, 0.06);
  --color-border-modal-soft: rgba(0, 0, 0, 0.05);
  --color-border-modal-hover: #9ca3af;
  --color-border-soft: rgba(0, 0, 0, 0.05);
  --color-border-row: rgba(0, 0, 0, 0.06);
  --color-border-glass-edge: rgba(255, 255, 255, 0.70); /* 玻璃外边白高光 */

  /* ── Text — Vercel 黑白灰严格灰阶 ── */
  --color-text-primary: #171717;          /* Vercel Black 纯近黑,去紫调 */
  --color-text-secondary: #525252;        /* Gray 600 */
  --color-text-tertiary: #888888;         /* Gray 500 */
  --color-text-quaternary: #a3a3a3;       /* Gray 400 */
  --color-text-disabled: #a3a3a3;
  --color-text-light: #374151;
  --color-text-monochrome: #4b5563;
  --color-text-on-glass: rgba(23, 23, 23, 0.85);
  --color-text-on-glass-soft: rgba(23, 23, 23, 0.55);
  --color-text-on-glass-faint: rgba(23, 23, 23, 0.40);

  /* Brand — 主色加深 18% (#6c63ff → #5048cc) */
  --color-primary: #5048cc;
  --color-primary-2: #7c3aed;
  --color-primary-bg: rgba(80, 72, 204, 0.06);
  --color-primary-bg-hover: rgba(80, 72, 204, 0.10);
  --color-btn-send-active: #5048cc;
  --color-btn-send-disabled: #d1d5db;

  /* Status — 全部加深保持 AA 对比度 */
  --color-success: #00a37e;
  --color-danger: #d63a2a;
  --color-warning: #d4860a;
  --color-info: #0099cc;
  --color-purple-accent: #7c3aed;

  --color-success-bg: rgba(0, 163, 126, 0.10);
  --color-success-bg-hover: rgba(0, 163, 126, 0.06);
  --color-info-bg: rgba(0, 153, 204, 0.10);
  --color-info-bg-hover: rgba(0, 153, 204, 0.06);
  --color-info-bg-soft: rgba(0, 153, 204, 0.08);
  --color-danger-bg: rgba(214, 58, 42, 0.10);
  --color-danger-bg-hover: rgba(214, 58, 42, 0.06);
  --color-danger-bg-soft: rgba(214, 58, 42, 0.05);
  --color-danger-border: rgba(214, 58, 42, 0.18);
  --color-danger-text: #dc2626;
  --color-warning-bg: rgba(212, 134, 10, 0.10);
  --color-warning-bg-hover: rgba(212, 134, 10, 0.06);
  --color-warning-border: rgba(212, 134, 10, 0.25);
  --color-warning-toast: #c97a1c;
  --color-purple-bg: rgba(124, 58, 237, 0.10);
  --color-purple-bg-hover: rgba(124, 58, 237, 0.06);

  /* ── Modal & overlay — 浅色下整体减弱 ── */
  --color-modal-overlay: rgba(0, 0, 0, 0.20);
  --color-overlay-strong: rgba(0, 0, 0, 0.30);
  --color-overlay-soft: rgba(0, 0, 0, 0.18);
  --color-overlay-medium: rgba(0, 0, 0, 0.12);
  --color-overlay-faint: rgba(0, 0, 0, 0.08);
  --color-overlay-deep: rgba(0, 0, 0, 0.45);
  --color-bg-modal: #ffffff;
  --color-bg-modal-elevated: #ffffff;
  --color-bg-modal-glass: rgba(255, 255, 255, 0.85);  /* 略透气 */
  --color-bg-modal-hover: #f5f5f5;
  --color-bg-elevated: #f3f4f5;
  --color-bg-placeholder: #ebebeb;
  --color-bg-dropdown-elevated: rgba(255, 255, 255, 0.95);
  --color-bg-video: #000;
  --color-shadow-modal: rgba(0, 0, 0, 0.08);
  --color-shadow-dropdown: rgba(0, 0, 0, 0.10);

  /* ── V2 multi-layer shadows ── */
  --shadow-card-light: 0 1px 2px rgba(0, 0, 0, 0.04),
                       0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-glass-light: 0 8px 32px rgba(0, 0, 0, 0.06),
                        0 1px 2px rgba(0, 0, 0, 0.08),
                        inset 0 1px 0 rgba(255, 255, 255, 0.60);

  /* Charts — 浅色 tooltip 用白底 */
  --color-tooltip-bg: rgba(255, 255, 255, 0.98);
  --color-tooltip-border: rgba(0, 0, 0, 0.10);
  --color-chart-axis: rgba(0, 0, 0, 0.10);
  --color-chart-grid: rgba(0, 0, 0, 0.06);
  --color-chart-area-from: rgba(80, 72, 204, 0.20);
  --color-chart-area-to: rgba(80, 72, 204, 0.02);
  --color-accent-2: #059669;

  /* Misc */
  --color-progress-track: rgba(0, 0, 0, 0.10);
  --color-on-primary: #ffffff;
  --color-on-overlay: #ffffff;

  /* Brand mint accent (Auth modals) — deepen to teal in light */
  --color-mint-accent: #0d9488;
  --color-mint-accent-bg: rgba(13, 148, 136, 0.08);
  --color-mint-accent-bg-hover: rgba(13, 148, 136, 0.14);
  --color-mint-accent-border: rgba(13, 148, 136, 0.30);
  --color-mint-accent-glow: rgba(13, 148, 136, 0.18);

  /* Inset highlight — V2 改为白高光,玻璃顶边视觉标志 */
  --color-inset-highlight: rgba(255, 255, 255, 0.50);
  --color-inset-highlight-strong: rgba(255, 255, 255, 0.70);

  /* 暖调 chip — GitBook 风格 */
  --color-chip-warm-bg: #fff5eb;
  --color-chip-warm-border: rgba(255, 180, 130, 0.40);
  --color-chip-warm-text: #1a1a1a;
  --color-chip-warm-badge-bg: rgba(255, 100, 50, 0.12);
  --color-chip-warm-badge-text: #c2410c;

  /* V2-fix: 主题感知 hover/border 浅色变黑透明 */
  --color-bg-glass-hover: rgba(0, 0, 0, 0.06);
  --color-border-glass-hover: rgba(0, 0, 0, 0.12);
  --color-bg-thumbnail: rgba(0, 0, 0, 0.05);           /* 浅色下浅淡 */
  --color-bg-thumbnail-hover: rgba(0, 0, 0, 0.04);
  --color-shadow-thumb: rgba(0, 0, 0, 0.10);

  /* Mention pill */
  --color-mention-bg: rgba(80, 72, 204, 0.10);
  --color-mention-bg-hover: rgba(80, 72, 204, 0.16);
  --color-mention-bg-active: rgba(80, 72, 204, 0.12);
  --color-mention-text: #5048cc;
  --color-mention-text-hover: #3a3380;

  /* Shimmer */
  --color-shimmer-purple-soft: rgba(80, 72, 204, 0.03);
  --color-shimmer-purple-mid: rgba(80, 72, 204, 0.06);
  --color-shimmer-purple-2-mid: rgba(124, 58, 237, 0.08);

  /* Danger hover (brighter red) */
  --color-danger-hover: #ef4444;
  --color-danger-hover-bg: rgba(239, 68, 68, 0.06);
  --color-danger-hover-bg-strong: rgba(239, 68, 68, 0.08);
  --color-danger-hover-border: rgba(239, 68, 68, 0.20);

  /* Info hover */
  --color-info-hover: #0088b8;
  --color-info-hover-2: #1aa9d4;
  --color-info-shadow-soft: rgba(0, 153, 204, 0.20);
  --color-info-shadow-strong: rgba(0, 153, 204, 0.35);

  /* Video 上的悬浮按钮(下载/收藏)— 必须任意视频帧背景下都可读 ⇒
     沿用行业惯例:深半透底 + 白图标(参考 YouTube/抖音/小红书的视频控件)。
     v0.20.0 改成 rgba(255,255,255,0.90) 是错的 — 白底 + --color-on-overlay 白 icon = 看不见。 */
  --color-bg-on-media: rgba(0, 0, 0, 0.55);
  --color-bg-on-media-hover: rgba(0, 0, 0, 0.72);

  /* Scrollbar */
  --color-scrollbar-thumb: rgba(0, 0, 0, 0.15);
  --color-scrollbar-thumb-hover: rgba(0, 0, 0, 0.30);

  /* Aurora — V2 保留 pastel 紫蓝桃,给玻璃面提供穿透色源（V1 错点:display:none） */
  --color-aurora-1: rgba(180, 167, 255, 0.30);   /* pastel 紫 */
  --color-aurora-2: rgba(167, 200, 255, 0.28);   /* pastel 蓝青 */
  --color-aurora-3: rgba(220, 167, 255, 0.22);   /* pastel 粉紫 */
  --color-aurora-peach: rgba(255, 180, 130, 0.25); /* pastel 桃 */
  --color-cursor-glow: rgba(80, 72, 204, 0.06);
  --color-grid-line: rgba(0, 0, 0, 0.025);
}

/* V2 删除原 [data-theme="light"] .aurora-bg { display: none } —
   极光在浅色下保留 pastel,给玻璃面 backdrop-filter 提供穿透色源 */

/* ═══════════════════════════════════════════
   Reset / globals
   ═══════════════════════════════════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #root {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar: Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
*:hover {
  scrollbar-color: var(--color-scrollbar-thumb) transparent;
}

/* Scrollbar: Webkit — hidden by default, visible on hover */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s;
}
*:hover::-webkit-scrollbar-thumb {
  background: var(--color-scrollbar-thumb);
}
*:hover::-webkit-scrollbar-thumb:hover {
  background: var(--color-scrollbar-thumb-hover);
}

/* ═══════════════════════════════════════════
   LAYER 1: Aurora Gradient Background
   ═══════════════════════════════════════════ */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora-bg::before,
.aurora-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.4;
  will-change: transform;
}

.aurora-bg::before {
  width: 600px;
  height: 600px;
  top: -10%;
  right: -5%;
  background: radial-gradient(circle, var(--color-aurora-1) 0%, transparent 70%);
  animation: aurora-drift-1 20s ease-in-out infinite alternate;
}

.aurora-bg::after {
  width: 500px;
  height: 500px;
  bottom: -5%;
  left: -5%;
  background: radial-gradient(circle, var(--color-aurora-2) 0%, transparent 70%);
  animation: aurora-drift-2 25s ease-in-out infinite alternate;
}

@keyframes aurora-drift-1 {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-15vw, 10vh) scale(1.1); }
  66% { transform: translate(-5vw, 25vh) scale(0.95); }
  100% { transform: translate(-20vw, 15vh) scale(1.05); }
}

@keyframes aurora-drift-2 {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(10vw, -15vh) scale(1.15); }
  66% { transform: translate(20vw, -5vh) scale(0.9); }
  100% { transform: translate(15vw, -20vh) scale(1.1); }
}

.aurora-blob-3 {
  position: absolute;
  width: 400px;
  height: 400px;
  top: 40%;
  left: 50%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-aurora-3) 0%, transparent 70%);
  filter: blur(100px);
  opacity: 0.3;
  will-change: transform;
  animation: aurora-drift-3 30s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes aurora-drift-3 {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-30%, -60%) scale(1.2); }
  100% { transform: translate(-70%, -40%) scale(0.85); }
}

/* ═══════════════════════════════════════════
   LAYER 2: Noise Texture Overlay
   ═══════════════════════════════════════════ */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ═══════════════════════════════════════════
   LAYER 3: Mouse-tracking Glow
   ═══════════════════════════════════════════ */
.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--color-cursor-glow) 0%,
    transparent 60%
  );
  transition: opacity 0.3s ease;
}

/* ═══════════════════════════════════════════
   LAYER 4: Subtle grid pattern
   ═══════════════════════════════════════════ */
.grid-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--color-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 100%);
}

/* ═══════════════════════════════════════════
   Reduced motion
   ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .aurora-bg::before,
  .aurora-bg::after,
  .aurora-blob-3 {
    animation: none !important;
    opacity: 0.2 !important;
  }
}
