:root {
  /* === 基础语义色：默认值（被 [data-theme] 覆盖） === */
  --bg-base: #07070a;
  --bg-primary: #0b0b10;
  --bg-secondary: #101018;
  --bg-surface: #14141d;
  --bg-elevated: #1a1a25;
  --bg-deep: #0d0d14;
  --bg-sunken: #08080d;
  --bg-hover: #232333;
  --border-primary: #232333;
  --border-secondary: #3a3a52;
  --border-subtle: #161620;
  --text-primary: #f7f7fa;
  --text-secondary: #d4d4dc;
  --text-tertiary: #9d9db0;
  --text-muted: #6c6c80;
  --scrollbar-track: transparent;
  --scrollbar-thumb: #2c2c40;
  --scrollbar-thumb-hover: #4a4a66;
  --glass-bg: rgba(20, 20, 30, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --nav-active-bg: rgba(167, 139, 250, 0.10);
  --nav-hover-bg: rgba(255, 255, 255, 0.04);
  --btn-primary-bg: #ffffff;
  --btn-primary-text: #0b0b10;
  --btn-primary-hover: #ececf2;
  --btn-primary-shadow: rgba(255, 255, 255, 0.05);
  --btn-selected-bg: #f4f4f5;
  --btn-selected-border: #f4f4f5;
  --overlay-heavy: rgba(0, 0, 0, 0.46);
  --overlay-medium: rgba(0, 0, 0, 0.32);
  --overlay-light: rgba(0, 0, 0, 0.18);
  --overlay-full: rgba(0, 0, 0, 0.62);
  --overlay-border: rgba(255, 255, 255, 0.1);
  --selection-bg: rgba(167, 139, 250, 0.25);
  --accent: #a78bfa;
  --accent-hover: #8b6df0;
  --accent-muted: #6366f1;
  --accent-bg: rgba(167, 139, 250, 0.14);
  --accent-bg-hover: rgba(167, 139, 250, 0.22);
  --accent-border: rgba(167, 139, 250, 0.35);
  --accent-text: #c4b5fd;
  --accent-text-hover: #ddd6fe;
  --accent-on: #ffffff;
  --accent-shadow: rgba(129, 140, 248, 0.28);
  --toggle-active: #a78bfa;
  --toggle-inactive: var(--border-secondary);
  --toggle-knob: #ffffff;
  --success: #34d399;
  --success-text: #6ee7b7;
  --success-bg: rgba(52, 211, 153, 0.1);
  --success-border: rgba(52, 211, 153, 0.3);
  --error: #f87171;
  --error-text: #fca5a5;
  --error-bg: rgba(248, 113, 113, 0.1);
  --error-border: rgba(248, 113, 113, 0.3);
  --error-hover-bg: rgba(127, 29, 29, 0.2);
  --error-hover-bg-strong: rgba(127, 29, 29, 0.4);
  --warning: #fbbf24;
  --warning-text: #fcd34d;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --warning-border: rgba(251, 191, 36, 0.3);
  --info: #60a5fa;
  --info-text: #93c5fd;
  --info-bg: rgba(96, 165, 250, 0.1);
  --info-border: rgba(96, 165, 250, 0.3);
  --tag-purple: #c084fc;
  --tag-purple-bg: rgba(192, 132, 252, 0.1);
  --tag-purple-border: rgba(192, 132, 252, 0.3);
  --tag-purple-hover: rgba(192, 132, 252, 0.1);

  /* === 品牌色阶（Linear / Anthropic 风渐变） === */
  --brand-violet: #a78bfa;
  --brand-indigo: #818cf8;
  --brand-cyan: #22d3ee;
  --brand-pink: #f0abfc;
  --brand-gradient: linear-gradient(135deg, #a78bfa 0%, #818cf8 50%, #22d3ee 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(167, 139, 250, 0.18) 0%, rgba(129, 140, 248, 0.10) 50%, rgba(34, 211, 238, 0.18) 100%);
  --brand-gradient-border: linear-gradient(135deg, rgba(167, 139, 250, 0.6) 0%, rgba(129, 140, 248, 0.35) 50%, rgba(34, 211, 238, 0.6) 100%);

  /* === Aurora 背景（页面级 mesh） === */
  --aurora-1: radial-gradient(60% 50% at 12% 8%, rgba(167, 139, 250, 0.22) 0%, transparent 70%);
  --aurora-2: radial-gradient(55% 45% at 88% 4%, rgba(34, 211, 238, 0.16) 0%, transparent 70%);
  --aurora-3: radial-gradient(50% 50% at 50% 100%, rgba(129, 140, 248, 0.14) 0%, transparent 70%);

  /* === 表面（玻璃卡片） === */
  --surface-card-bg: rgba(20, 20, 30, 0.55);
  --surface-card-border: rgba(255, 255, 255, 0.07);
  --surface-card-border-hover: rgba(167, 139, 250, 0.32);
  --surface-elevated-bg: rgba(28, 28, 42, 0.7);

  /* === 投影 === */
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.14);
  --shadow-lift: 0 4px 8px rgba(0, 0, 0, 0.25), 0 16px 40px rgba(0, 0, 0, 0.22);
  --shadow-glow: 0 0 0 1px rgba(167, 139, 250, 0.25), 0 12px 32px rgba(129, 140, 248, 0.18);

  /* === 圆角尺度（取代之前直角） === */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;

  /* === 缓动 === */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.32, 0.72, 0, 1);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-secondary);
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* =====================================================
   细滚动条 - 用于嵌套容器（默认 6px，透明轨道）
   ===================================================== */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}
.custom-scrollbar::-webkit-scrollbar-corner {
  background: transparent;
}

/* =====================================================
   时间轴专用：默认完全透明，hover 容器渐显
   适用于横向时间轴这种"很少需要主动滚动"的场景
   ===================================================== */
.timeline-scroller {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 0.3s ease;
}
.timeline-scroller::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
.timeline-scroller::-webkit-scrollbar-track {
  background: transparent;
}
.timeline-scroller::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  transition: background 0.3s ease;
}
.timeline-scroller:hover,
.timeline-scroller:focus-within {
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.timeline-scroller:hover::-webkit-scrollbar-thumb,
.timeline-scroller:focus-within::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
}
.timeline-scroller:hover::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

select option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

/* =====================================================
   全局可复用 utilities（被 Tailwind 类组合调用）
   ===================================================== */

/* 玻璃面板（保留旧 API） */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
}

/* Aurora 渐变画布：在容器上加 .aurora-canvas，::before 会渲染极光背景 */
.aurora-canvas {
  position: relative;
  isolation: isolate;
}
.aurora-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--aurora-1), var(--aurora-2), var(--aurora-3);
  pointer-events: none;
  z-index: 0;
}
.aurora-canvas > * {
  position: relative;
  z-index: 1;
}

/* 文字渐变（品牌色） */
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 玻璃卡片（默认表面 + 悬浮提升） */
.surface-card {
  background: var(--surface-card-bg);
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  transition:
    transform 220ms var(--ease-spring),
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}
.surface-card:hover {
  transform: translateY(-2px);
  border-color: var(--surface-card-border-hover);
  box-shadow: var(--shadow-lift);
}

/* 渐变描边卡片：hover 时四周浮现品牌渐变细线 */
.gradient-border-card {
  position: relative;
  border-radius: var(--radius-lg);
}
.gradient-border-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--brand-gradient-border);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.gradient-border-card:hover::before {
  opacity: 1;
}
.gradient-border-card.is-active::before {
  opacity: 1;
}

/* 状态点（Linear 风带辉光） */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot.success { background: var(--success); box-shadow: 0 0 8px rgba(52, 211, 153, 0.55); }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 8px rgba(251, 191, 36, 0.55); }
.status-dot.error   { background: var(--error);   box-shadow: 0 0 8px rgba(248, 113, 113, 0.55); }
.status-dot.info    { background: var(--info);    box-shadow: 0 0 8px rgba(96, 165, 250, 0.55); }
.status-dot.brand   { background: var(--brand-violet); box-shadow: 0 0 8px rgba(167, 139, 250, 0.6); }
.status-dot.idle    { background: var(--text-muted); }

/* 状态点 - 呼吸（用于 generating 等进行中状态） */
.status-dot.pulse {
  animation: status-pulse 1.6s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}

/* 品牌主按钮（替代旧的纯白按钮，可选用） */
.btn-brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.625rem 1.125rem;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 160ms var(--ease-spring), box-shadow 220ms ease, filter 160ms ease;
  box-shadow: 0 4px 14px rgba(129, 140, 248, 0.28);
  white-space: nowrap;
}
.btn-brand:hover {
  transform: translateY(-1px);
  filter: brightness(1.08) saturate(1.05);
  box-shadow: 0 8px 24px rgba(129, 140, 248, 0.4);
}
.btn-brand:active {
  transform: translateY(0);
  filter: brightness(0.96);
}
.btn-brand:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.3);
}

/* 幽灵按钮（次级 CTA） */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-card-bg);
  color: var(--text-secondary);
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease, transform 160ms var(--ease-spring);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--surface-card-border-hover);
  background: var(--surface-elevated-bg);
  transform: translateY(-1px);
}

/* 渐变光斑（hero 用） */
.glow-spot {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.6;
}

/* 入场动画（替换之前依赖的 animate-in） */
.fade-in-up {
  animation: fade-in-up 320ms var(--ease-smooth) both;
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fade-in 200ms ease-out both;
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 流光扫光（用于生成中 banner / 进度条） */
.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 70%
  );
  animation: shimmer-slide 1.6s linear infinite;
}
@keyframes shimmer-slide {
  from { transform: translateX(-60%); }
  to   { transform: translateX(60%); }
}

/* 焦点轮廓（无障碍 + 美观） */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* =====================================================
   进度条（品牌渐变填充 + shimmer 高光）
   .progress-track / .progress-fill
   用法：<div class="progress-track"><div class="progress-fill" style="width:42%" /></div>
   ===================================================== */
.progress-track {
  position: relative;
  height: 6px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}
.progress-track.lg { height: 10px; }
.progress-track.sm { height: 3px; }

.progress-fill {
  position: relative;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-gradient);
  transition: width 320ms var(--ease-smooth);
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.45);
}
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 70%
  );
  animation: shimmer-slide 1.6s linear infinite;
  mix-blend-mode: overlay;
}

/* 圆形进度环 (用 SVG 时可用 stroke="url(#brand-gradient)") */
.progress-ring-bg {
  stroke: var(--bg-elevated);
}
.progress-ring-fill {
  stroke: url(#topenmuse-brand-gradient);
  filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.45));
  transition: stroke-dashoffset 320ms var(--ease-smooth);
}

/* 大数字（带渐变 + 等宽数字） */
.metric-number {
  font-family: 'Inter', sans-serif;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* =====================================================
   Hero 装饰：旋转的 conic 渐变 + 颗粒噪点
   用法：在容器内放一个 <div class="hero-glow-orb">
   ===================================================== */
.hero-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: hero-orb-rotate 22s linear infinite;
  background: conic-gradient(
    from 0deg,
    rgba(167, 139, 250, 0.45),
    rgba(34, 211, 238, 0.30),
    rgba(240, 171, 252, 0.30),
    rgba(167, 139, 250, 0.45)
  );
}
@keyframes hero-orb-rotate {
  to { transform: rotate(360deg); }
}

/* 颗粒纹理 - 类 Vercel Bento 风的颗粒覆盖 */
.grain-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.3  0 0 0 0 0.3  0 0 0 0 0.3  0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* 通用表单输入字段（替代散落的 bg + border 内联） */
.field-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.875rem;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.4;
  outline: none;
  transition: border-color 150ms ease, background 150ms ease;
}
.field-input::placeholder {
  color: var(--text-muted);
}
.field-input:focus {
  border-color: var(--accent-border);
  background: var(--bg-elevated);
}

/* ⌘K 提示徽章 */
.cmdk-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  line-height: 1;
}

/* =====================================================
   Aurora 舞台：Dashboard 全屏多层背景动效
   多个漂浮光斑 + 颗粒星点 + 缓慢漂移
   注意：选择器需更高优先级，覆盖 .aurora-canvas > * { position: relative }
   ===================================================== */
.aurora-canvas > .aurora-stage,
.aurora-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform, opacity;
  /* drift + pulse 同时跑，让漂浮 + 呼吸明显可见 */
  animation: aurora-drift 14s ease-in-out infinite, aurora-pulse 6s ease-in-out infinite;
}
.aurora-blob.b1 {
  width: 560px;
  height: 560px;
  top: -140px;
  left: -140px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.9) 0%, rgba(167, 139, 250, 0.35) 35%, transparent 70%);
}
.aurora-blob.b2 {
  width: 500px;
  height: 500px;
  top: 14%;
  right: -120px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.75) 0%, rgba(34, 211, 238, 0.28) 35%, transparent 70%);
  animation-delay: -4s, -2s;
  animation-duration: 16s, 7s;
}
.aurora-blob.b3 {
  width: 480px;
  height: 480px;
  bottom: -140px;
  left: 22%;
  background: radial-gradient(circle, rgba(240, 171, 252, 0.7) 0%, rgba(240, 171, 252, 0.25) 35%, transparent 70%);
  animation-delay: -8s, -3s;
  animation-duration: 18s, 8s;
}
.aurora-blob.b4 {
  width: 420px;
  height: 420px;
  bottom: 6%;
  right: 12%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.7) 0%, rgba(129, 140, 248, 0.25) 35%, transparent 70%);
  animation-delay: -11s, -4s;
  animation-duration: 15s, 9s;
}
@keyframes aurora-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(110px, -70px) scale(1.15); }
  50%      { transform: translate(-80px, 90px) scale(0.88); }
  75%      { transform: translate(60px, 40px) scale(1.08); }
}
@keyframes aurora-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.95; }
}

/* 漂浮粒子流：从底部缓慢上升的发光颗粒，立刻可见的动效 */
.aurora-particle {
  position: absolute;
  bottom: -10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(167, 139, 250, 0.6) 60%, transparent 100%);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.8);
  opacity: 0;
  will-change: transform, opacity;
  animation: particle-float 14s linear infinite;
}
.aurora-particle.p1  { left: 8%;  animation-delay: 0s;    animation-duration: 13s; }
.aurora-particle.p2  { left: 18%; animation-delay: -3s;   animation-duration: 16s; --particle-color: 34, 211, 238; }
.aurora-particle.p3  { left: 28%; animation-delay: -7s;   animation-duration: 12s; }
.aurora-particle.p4  { left: 42%; animation-delay: -1s;   animation-duration: 18s; --particle-color: 240, 171, 252; }
.aurora-particle.p5  { left: 55%; animation-delay: -10s;  animation-duration: 14s; }
.aurora-particle.p6  { left: 68%; animation-delay: -5s;   animation-duration: 17s; --particle-color: 129, 140, 248; }
.aurora-particle.p7  { left: 80%; animation-delay: -8s;   animation-duration: 13s; --particle-color: 34, 211, 238; }
.aurora-particle.p8  { left: 92%; animation-delay: -2s;   animation-duration: 15s; }
.aurora-particle.p2,
.aurora-particle.p4,
.aurora-particle.p6,
.aurora-particle.p7 {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(var(--particle-color, 167, 139, 250), 0.6) 60%, transparent 100%);
  box-shadow: 0 0 8px rgba(var(--particle-color, 167, 139, 250), 0.8);
}

@keyframes particle-float {
  0%   { transform: translate3d(0, 0, 0) scale(0.6); opacity: 0; }
  10%  { opacity: 1; }
  50%  { transform: translate3d(40px, -50vh, 0) scale(1); opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translate3d(-30px, -110vh, 0) scale(0.4); opacity: 0; }
}

/* 闪烁星点 - 纯 CSS 径向渐变多重背景（用两层 background-size 让星点真的"小且亮"） */
.aurora-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(2px 2px at 70% 60%, rgba(167, 139, 250, 0.85), transparent 60%),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(34, 211, 238, 0.80), transparent 60%),
    radial-gradient(1.5px 1.5px at 85% 20%, rgba(255, 255, 255, 0.75), transparent 60%),
    radial-gradient(2px 2px at 10% 70%, rgba(240, 171, 252, 0.80), transparent 60%),
    radial-gradient(1.5px 1.5px at 55% 15%, rgba(255, 255, 255, 0.7), transparent 60%);
  background-repeat: repeat;
  background-size: 280px 280px, 360px 360px, 240px 240px, 320px 320px, 200px 200px, 260px 260px;
  animation: stars-twinkle 5s ease-in-out infinite;
  opacity: 0.85;
}
@keyframes stars-twinkle {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 0.45; }
}

/* =====================================================
   首次进入开场动画 (Splash Intro)
   ===================================================== */
.splash-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.75rem;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(124, 58, 237, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 80%, rgba(34, 211, 238, 0.15) 0%, transparent 60%),
    #07050f;
  overflow: hidden;
  animation: splash-exit 0.7s ease 2.3s forwards;
}
.splash-intro.is-skipped {
  animation: splash-exit 0.35s ease 0s forwards;
}
@keyframes splash-exit {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* 背景光球（不参与点击） */
.splash-intro .splash-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.splash-intro .splash-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: hero-orb-rotate 18s linear infinite, splash-orb-fade 1.2s ease both;
}
@keyframes splash-orb-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 中央 logo + 扩散光环 */
.splash-logo-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splash-logo-in 1.1s cubic-bezier(0.25, 0.85, 0.25, 1) both;
}
.splash-logo-box {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: var(--bg-deep);
  border: 1px solid var(--surface-card-border);
  box-shadow:
    0 8px 32px rgba(129, 140, 248, 0.55),
    0 0 60px rgba(167, 139, 250, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.splash-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.splash-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(167, 139, 250, 0.6);
  animation: splash-ring-pulse 1.8s ease-out infinite;
}
.splash-ring:nth-of-type(2) { animation-delay: 0.6s; }
@keyframes splash-ring-pulse {
  0%   { width: 96px; height: 96px; opacity: 0.9; border-width: 2px; }
  100% { width: 360px; height: 360px; opacity: 0; border-width: 1px; }
}
@keyframes splash-logo-in {
  0%   { opacity: 0; transform: scale(0.55) translateY(20px); filter: blur(14px); }
  60%  { filter: blur(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

/* 标题 + 副标题 */
.splash-title {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: splash-text-in 0.8s ease 0.5s both;
}
.splash-subtitle {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  animation: splash-text-in 0.8s ease 0.65s both;
}
@keyframes splash-text-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 关键词序列 */
.splash-keywords {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 480px;
}
.splash-keywords span {
  display: inline-block;
  padding: 0.375rem 0.85rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  background: var(--brand-gradient-soft);
  border: 1px solid var(--accent-border);
  opacity: 0;
  animation: splash-keyword-in 0.55s ease forwards;
}
.splash-keywords span:nth-child(1) { animation-delay: 0.95s; }
.splash-keywords span:nth-child(2) { animation-delay: 1.08s; }
.splash-keywords span:nth-child(3) { animation-delay: 1.21s; }
.splash-keywords span:nth-child(4) { animation-delay: 1.34s; }
.splash-keywords span:nth-child(5) { animation-delay: 1.47s; }
@keyframes splash-keyword-in {
  from { opacity: 0; transform: translateY(10px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 跳过提示 */
.splash-skip {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  animation: splash-text-in 0.8s ease 1.6s both;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.splash-skip kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
}

/* 关爱：尊重 prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .aurora-blob, .aurora-stars, .hero-glow-orb, .aurora-particle {
    animation: none !important;
  }
  .splash-intro {
    animation: splash-exit 0.2s ease 0.8s forwards;
  }
  .splash-logo-wrap, .splash-title, .splash-subtitle, .splash-keywords span {
    animation: fade-in 0.3s ease both;
  }
  .splash-ring { display: none; }
}


/* =============================================================
 * 自定义时长输入框 — 隐藏浏览器原生上下箭头
 * 与 VideoSettingsPanel 自定义时长一行配套，使用主题色 +/- 按钮替代。
 * ============================================================= */
input.custom-duration-input::-webkit-outer-spin-button,
input.custom-duration-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input.custom-duration-input {
  -moz-appearance: textfield;
  appearance: textfield;
}
