/* ============================================================
   小微 AIGC 科学馆 · 高级 UI 增强层（Premium Layer）
   在华微蓝 V3.0 基础上叠加：更精的字阶/多层光影/玻璃质感/
   微交互/渐变光效/留白节奏。不改变品牌主色，仅增强。
   用法：在 theme.css 之后引入本文件。
   ============================================================ */
:root {
  /* —— 字体增强 —— */
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  /* —— 多层级阴影（更柔和、更有空气感） —— */
  --shadow-xs: 0 1px 2px rgba(15, 79, 138, .05);
  --shadow-sm: 0 1px 2px rgba(15, 79, 138, .06), 0 2px 8px rgba(15, 79, 138, .05);
  --shadow-md: 0 2px 4px rgba(15, 79, 138, .05), 0 8px 24px rgba(15, 79, 138, .09);
  --shadow-lg: 0 4px 8px rgba(15, 79, 138, .06), 0 16px 40px rgba(15, 79, 138, .14);
  --shadow-xl: 0 8px 16px rgba(15, 79, 138, .08), 0 28px 64px rgba(15, 79, 138, .18);
  --shadow-primary: 0 4px 14px rgba(64, 149, 229, .32), 0 2px 6px rgba(64, 149, 229, .18);
  --shadow-primary-lg: 0 10px 28px rgba(64, 149, 229, .4), 0 3px 10px rgba(64, 149, 229, .2);
  --shadow-ai: 0 4px 14px rgba(139, 92, 246, .32);

  /* —— 动效曲线 —— */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  /* —— 玻璃质感 —— */
  --glass-bg: rgba(255, 255, 255, .72);
  --glass-border: rgba(255, 255, 255, .65);
  --glass-blur: 16px;
}

/* ========== 全局排版增强 ========== */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: .1px;
}
h1 { letter-spacing: -.5px; line-height: 1.25; }
h2 { letter-spacing: -.3px; line-height: 1.3; }
h3 { letter-spacing: -.15px; }

::selection { background: rgba(64, 149, 229, .2); }

/* 焦点态更精致 */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 4px; }

/* 细滚动条 */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(132, 148, 161, .35); border-radius: 20px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(132, 148, 161, .55); }
*::-webkit-scrollbar-track { background: transparent; }

/* ========== 卡片悬浮增强 ========== */
.card, .stat, .list-card {
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out), border-color .28s var(--ease-out);
}
.card-hover:hover, a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-line);
}
.stat.stat-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ========== 按钮增强 ========== */
.btn {
  transition: transform .18s var(--ease-out), box-shadow .22s var(--ease-out), background .22s, border-color .22s, color .22s;
  font-weight: 500;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  box-shadow: var(--shadow-primary);
  background: linear-gradient(135deg, #4aa3e8 0%, #2e86d8 52%, #1a7bd5 100%);
}
.btn-primary:hover { box-shadow: var(--shadow-primary-lg); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-ai { box-shadow: var(--shadow-ai); }
.btn-ai:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(139, 92, 246, .4); }

/* ========== 玻璃质感组件 ========== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
}
.glass-dark {
  background: rgba(11, 58, 101, .55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .14);
}

/* ========== 品牌渐变 / 光效背景 ========== */
.hero-gradient {
  background:
    radial-gradient(1200px 500px at 12% -10%, rgba(64, 149, 229, .55), transparent 60%),
    radial-gradient(900px 480px at 95% 0%, rgba(139, 92, 246, .4), transparent 55%),
    linear-gradient(135deg, #0b3a65 0%, #0f4f8a 45%, #1a7bd5 100%);
}
.mesh-light {
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(64, 149, 229, .12), transparent 60%),
    radial-gradient(500px 300px at 90% 20%, rgba(139, 92, 246, .1), transparent 55%);
}
.glow-ring {
  position: relative;
}
.glow-ring::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit;
  padding: 1px; background: linear-gradient(135deg, rgba(64,149,229,.6), rgba(139,92,246,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; opacity: .8;
}

/* 文字渐变（用于标题/数字强调，克制使用） */
.text-gradient {
  background: linear-gradient(120deg, #2e86d8, #4095e5 50%, #8b5cf6);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.text-gradient-light {
  background: linear-gradient(120deg, #ffffff, #c7e2fa 60%, #d9c8fb);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ========== 导航增强 ========== */
.nav-item { transition: all .2s var(--ease-out); position: relative; }
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-hover));
}
.topbar { backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); }

/* ========== 表格增强 ========== */
.table { border-collapse: separate; border-spacing: 0; }
.table thead th { box-shadow: inset 0 -1px 0 rgba(255,255,255,.08); }
.table tbody tr { transition: background .18s; }

/* ========== 标签 / 芯片 ========== */
.tag { transition: all .18s var(--ease-out); }

/* ========== 微交互进入动效 ========== */
@keyframes pm-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pm-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pm-pop {
  0% { opacity: 0; transform: scale(.96); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes pm-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pm-pulse {
  0%, 100% { opacity: .6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
.animate-rise { animation: pm-rise .6s var(--ease-out) both; }
.animate-fade { animation: pm-fade .7s var(--ease-out) both; }
.animate-pop { animation: pm-pop .45s var(--ease-spring) both; }
.animate-float { animation: pm-float 5s var(--ease-in-out) infinite; }
.animate-pulse { animation: pm-pulse 3s var(--ease-in-out) infinite; }

/* 交错延迟工具类 */
.d1 { animation-delay: .06s; } .d2 { animation-delay: .12s; } .d3 { animation-delay: .18s; }
.d4 { animation-delay: .24s; } .d5 { animation-delay: .3s; } .d6 { animation-delay: .36s; }

/* ========== 场馆沉浸光效（venue） ========== */
.venue-tunnel {
  background:
    radial-gradient(800px 400px at 50% 120%, rgba(64,149,229,.35), transparent 60%),
    radial-gradient(600px 400px at 50% -20%, rgba(139,92,246,.3), transparent 55%),
    linear-gradient(180deg, #081b33 0%, #0b2a4d 60%, #0f3d6b 100%);
}
.scanline { position: relative; overflow: hidden; }
.scanline::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.03) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

/* 光晕点 */
.light-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-primary); box-shadow: 0 0 12px 2px rgba(64,149,229,.7);
}

/* ========== 辅助排版 ========== */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--color-primary);
}
.num-mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.divider-soft { height: 1px; background: linear-gradient(90deg, transparent, var(--color-border), transparent); border: 0; }

/* 减少动态偏好（无障碍） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
