/* ══════════════════════════════════════════════════════════════
   theme-impact.css —— 震撼层 v2 (修正版)
   ══════════════════════════════════════════════════════════════

   v1 的问题 (截图对比发现的):
     · 卡片背景太透 (最低 78%) + backdrop-filter, 极光从底下透上来,
       白 + 粉紫 -> 视觉上"粉白糊", 内容像蒙了层纱
     · 极光太浓 (alpha 最高 .50), 抢了内容的注意力
     · 层次不清: 极光 / 卡片 / 文字 三层混在一起

   v2 的修正思路 —— 不是减弱效果, 而是**分层**:
     ① 极光压暗 + 模糊加大 -> 变成柔和的"氛围底色", 不再是主体
     ② 卡片提实 (最低 92%) -> 内容清晰可读, 玻璃感靠边缘而不是靠透
     ③ 光只从卡片**边缘**透出来 (渐变描边 + 外发光), 不穿透卡面
     ④ 花瓣单独分层, 保证浮在极光之上

   所有改动仍然是纯叠加, 不碰任何已有类名和结构。
   ══════════════════════════════════════════════════════════════ */

/* ── 补充变量 ─────────────────────────────────────────────── */
:root {
  --imp-gold:        #FFC46B;
  --imp-rose:        #FF6B8A;
  --imp-lilac:       #C8A2E0;
  --imp-glow-rose:   rgba(255, 107, 138, 0.32);
  --imp-glow-lilac:  rgba(200, 162, 224, 0.30);
  --imp-glow-gold:   rgba(255, 196, 107, 0.26);
  --imp-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --imp-ease-silk:   cubic-bezier(.16, 1, .3, 1);
}

/* ══════════════════════════════════════════════════════════
   分层: 明确三种元素的堆叠顺序
     极光  z-index: 0   (最底, 氛围)
     内容  z-index: 1
     花瓣  z-index: 2   (浮在最上, 有"飘过屏幕"的感觉)
   ══════════════════════════════════════════════════════════ */

#sakura-canvas {
  z-index: 2 !important;      /* ★ 花瓣浮在内容和极光之上 */
}

body::before {
  z-index: 0;
}

.ld-nav, .ld-hero, .ld-section, .ld-footer,
.sk-landing, .sk-layout, .sk-main {
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════
   ① 极光 —— 从"主体"降为"氛围"
   alpha 砍掉一半, 模糊加大, 再叠一层白纱压对比
   ══════════════════════════════════════════════════════════ */

body::before {
  content: '';
  position: fixed;
  inset: -25%;
  pointer-events: none;
  background:
    radial-gradient(46% 38% at 12% 8%,  rgba(255, 143, 171, .30) 0%, transparent 70%),
    radial-gradient(40% 34% at 88% 14%, rgba(200, 162, 224, .24) 0%, transparent 68%),
    radial-gradient(52% 42% at 78% 88%, rgba(255, 196, 107, .16) 0%, transparent 72%),
    radial-gradient(38% 30% at 20% 82%, rgba(255, 183, 197, .22) 0%, transparent 70%);
  filter: blur(22px) saturate(1.1);
  transform: translateZ(0);
  opacity: .9;
}

@media (prefers-reduced-motion: no-preference) {
  body::before {
    animation: imp-aurora 26s ease-in-out infinite alternate;
  }
}

@keyframes imp-aurora {
  0%   { transform: scale(1)    translate(0, 0)    rotate(0deg); }
  50%  { transform: scale(1.10) translate(2%, -2%) rotate(2deg); }
  100% { transform: scale(1.05) translate(-2%, 2%) rotate(-2deg); }
}

/* ══════════════════════════════════════════════════════════
   ② 渐变文字 (保留 v1, 稍微收一下光晕)
   ══════════════════════════════════════════════════════════ */

.ld-hero-title {
  background: linear-gradient(102deg,
    #FF5F82 0%, #FF8FAB 22%, #C8A2E0 52%, #FF8FAB 74%, #FFB347 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 107, 138, .22));
  letter-spacing: -0.02em;
}

@media (prefers-reduced-motion: no-preference) {
  .ld-hero-title { animation: imp-shimmer 9s linear infinite; }
}

@keyframes imp-shimmer {
  0%   { background-position:   0% 50%; }
  100% { background-position: 220% 50%; }
}

/* 段落标题底下的渐变短横线 */
.ld-section-title {
  position: relative;
  padding-bottom: 14px;
}
.ld-section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #FF8FAB, #C8A2E0, #FFC46B);
  box-shadow: 0 2px 10px var(--imp-glow-rose);
}

/* 价格数字: 金红渐变 */
.ld-price-num {
  background: linear-gradient(135deg, #FF6B8A, #FFB347 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ══════════════════════════════════════════════════════════
   ③ 卡片 —— ★ v2 核心修正: 提实 + 光只从边缘出
   ══════════════════════════════════════════════════════════ */

.ld-feature,
.ld-step,
.ld-trust-item,
.ld-price {
  position: relative;
  /* ★ 从 0.94/0.82/0.78 提到 0.98/0.95/0.93 —— 内容清晰优先 */
  background: linear-gradient(158deg,
    rgba(255, 255, 255, .98) 0%,
    rgba(255, 253, 254, .95) 55%,
    rgba(255, 249, 252, .93) 100%) !important;
  -webkit-backdrop-filter: blur(6px) saturate(1.2);
  backdrop-filter: blur(6px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .85) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 -1px 0 rgba(255, 183, 197, .16) inset,
    0 10px 28px -16px var(--imp-glow-rose),
    0 2px 8px -5px rgba(74, 63, 85, .06) !important;
  transition:
    transform .42s var(--imp-ease-silk),
    box-shadow .42s var(--imp-ease-silk),
    border-color .3s ease;
  will-change: transform;
  transform: translateZ(0);
}

/* 渐变描边: 这是光"从边缘透出来"的地方 */
.ld-feature::before,
.ld-step::before,
.ld-trust-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(140deg,
    rgba(255, 143, 171, .90) 0%,
    rgba(200, 162, 224, .62) 42%,
    rgba(255, 255, 255, 0) 72%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: .9;
  transition: opacity .35s ease;
}

.ld-feature:hover::before,
.ld-step:hover::before {
  opacity: 1;
  background: linear-gradient(140deg,
    rgba(255, 107, 138, 1) 0%,
    rgba(200, 162, 224, .85) 40%,
    rgba(255, 196, 107, .70) 78%);
}

@media (hover: hover) {
  .ld-feature:hover,
  .ld-step:hover,
  .ld-trust-item:hover {
    transform: translateY(-7px) scale(1.014);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 1) inset,
      0 22px 48px -20px var(--imp-glow-rose),
      0 10px 24px -16px var(--imp-glow-lilac) !important;
  }
}

@media (hover: none) {
  .ld-feature:active,
  .ld-step:active,
  .ld-price:active {
    transform: scale(.985);
    transition-duration: .1s;
  }
}

/* 特性图标: 渐变底座 + 发光 */
.ld-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  font-size: 26px;
  line-height: 1;
  background: linear-gradient(140deg, #FF8FAB 0%, #FFA9C0 45%, #C8A2E0 100%);
  box-shadow:
    0 10px 22px -8px var(--imp-glow-rose),
    0 2px 6px -2px rgba(255, 107, 138, .28),
    inset 0 1.5px 0 rgba(255, 255, 255, .55),
    inset 0 -2px 6px rgba(255, 107, 138, .16);
  transform: translateZ(0);
}

/* 步骤序号: 渐变圆 + 外环 */
.ld-step-num {
  background: linear-gradient(140deg, #FF6B8A 0%, #FF8FAB 50%, #C8A2E0 100%) !important;
  box-shadow:
    0 10px 24px -8px var(--imp-glow-rose),
    0 0 0 5px rgba(255, 143, 171, .13),
    0 0 0 10px rgba(255, 143, 171, .05),
    inset 0 1.5px 0 rgba(255, 255, 255, .45) !important;
}

/* 热门套餐: 渐变描边 + 光环 */
.ld-price.is-hot {
  border-color: transparent !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,248,251,.97)) padding-box,
    linear-gradient(140deg, #FF6B8A, #C8A2E0 45%, #FFC46B) border-box !important;
  border: 2px solid transparent !important;
  box-shadow:
    0 18px 44px -16px var(--imp-glow-rose),
    0 0 0 6px rgba(255, 143, 171, .09),
    inset 0 1px 0 rgba(255,255,255,1) !important;
}

/* ══════════════════════════════════════════════════════════
   ④ 动效
   ══════════════════════════════════════════════════════════ */

.ld-hero-btns .el-button--primary,
.ld-nav-actions .el-button--primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #FF6B8A 0%, #FF8FAB 50%, #FFA9C0 100%) !important;
  border: none !important;
  box-shadow:
    0 12px 28px -10px var(--imp-glow-rose),
    inset 0 1.5px 0 rgba(255, 255, 255, .45),
    inset 0 -2px 8px rgba(200, 60, 95, .16) !important;
  transition: transform .22s var(--imp-ease-spring),
              box-shadow .28s ease,
              filter .22s ease;
}

.ld-hero-btns .el-button--primary::after,
.ld-nav-actions .el-button--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg,
    transparent, rgba(255, 255, 255, .50), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .ld-hero-btns .el-button--primary::after {
    animation: imp-sheen 4.5s ease-in-out infinite;
  }
}

@keyframes imp-sheen {
  0%, 62%  { left: -120%; }
  78%, 100%{ left: 160%;  }
}

.ld-hero-btns .el-button--primary:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.05);
  box-shadow:
    0 18px 38px -12px var(--imp-glow-rose),
    inset 0 1.5px 0 rgba(255, 255, 255, .5) !important;
}

.ld-hero-btns .el-button--primary:active {
  transform: translateY(0) scale(.97);
  transition-duration: .08s;
}

.ld-hero-btns .el-button:not(.el-button--primary) {
  background: rgba(255, 255, 255, .85) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 143, 171, .40) !important;
  box-shadow: 0 6px 18px -10px var(--imp-glow-rose),
              inset 0 1px 0 rgba(255, 255, 255, .9) !important;
}

/* 导航毛玻璃吸顶 */
.ld-nav {
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  background: rgba(255, 255, 255, .82) !important;
  border-bottom: 1px solid rgba(255, 183, 197, .28);
  box-shadow: 0 4px 22px -14px rgba(255, 107, 138, .35);
}

/* 滚动入场 */
@media (prefers-reduced-motion: no-preference) {
  /* ★★★ 安全的渐进增强:
     默认状态 = 完全不做任何事 (元素正常可见)
     只有 .imp-in 被加上时, 才播一次入场动画
     → 即使 JS 挂了 / Observer 没触发 / 截图工具不滚动,
       页面也是**完整可见**的, 绝不会出现空白区
     → 代价仅仅是没有动画, 而不是内容消失 */
  .imp-armed.imp-in {
    animation: imp-section-in .62s var(--imp-ease-silk) both;
  }
  .imp-armed.imp-in .ld-feature,
  .imp-armed.imp-in .ld-step,
  .imp-armed.imp-in .ld-price,
  .imp-armed.imp-in .ld-trust-item {
    animation: imp-rise .62s var(--imp-ease-silk) both;
  }
  .imp-armed.imp-in .ld-feature:nth-child(1),
  .imp-armed.imp-in .ld-step:nth-child(1),
  .imp-armed.imp-in .ld-price:nth-child(1),
  .imp-armed.imp-in .ld-trust-item:nth-child(1) { animation-delay: .02s; }
  .imp-armed.imp-in .ld-feature:nth-child(2),
  .imp-armed.imp-in .ld-step:nth-child(2),
  .imp-armed.imp-in .ld-price:nth-child(2),
  .imp-armed.imp-in .ld-trust-item:nth-child(2) { animation-delay: .10s; }
  .imp-armed.imp-in .ld-feature:nth-child(3),
  .imp-armed.imp-in .ld-step:nth-child(3),
  .imp-armed.imp-in .ld-price:nth-child(3),
  .imp-armed.imp-in .ld-trust-item:nth-child(3) { animation-delay: .18s; }
  .imp-armed.imp-in .ld-feature:nth-child(4),
  .imp-armed.imp-in .ld-step:nth-child(4),
  .imp-armed.imp-in .ld-price:nth-child(4),
  .imp-armed.imp-in .ld-trust-item:nth-child(4) { animation-delay: .26s; }
  .imp-armed.imp-in .ld-feature:nth-child(n+5),
  .imp-armed.imp-in .ld-step:nth-child(n+5),
  .imp-armed.imp-in .ld-price:nth-child(n+5),
  .imp-armed.imp-in .ld-trust-item:nth-child(n+5) { animation-delay: .34s; }
}

@keyframes imp-section-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

@keyframes imp-rise {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .ld-hero-title { animation: imp-hero-in .82s var(--imp-ease-silk) both,
                               imp-shimmer 9s linear infinite .82s; }
  .ld-hero-sub   { animation: imp-hero-in .82s var(--imp-ease-silk) .12s both; }
  .ld-hero-btns  { animation: imp-hero-in .82s var(--imp-ease-silk) .22s both; }
  .ld-hero-note  { animation: imp-hero-in .82s var(--imp-ease-silk) .30s both; }
}

@keyframes imp-hero-in {
  from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* ══════════════════════════════════════════════════════════
   ⑤ 深色模式
   ══════════════════════════════════════════════════════════ */
html.dark body::before {
  filter: blur(26px) saturate(1.0) brightness(.62);
}

html.dark .ld-feature,
html.dark .ld-step,
html.dark .ld-trust-item,
html.dark .ld-price {
  background: linear-gradient(158deg,
    rgba(52, 42, 60, .97) 0%,
    rgba(46, 37, 54, .95) 60%,
    rgba(42, 34, 50, .94) 100%) !important;
  border-color: rgba(255, 183, 197, .16) !important;
}

html.dark .ld-nav {
  background: rgba(34, 27, 40, .86) !important;
}

/* ══════════════════════════════════════════════════════════
   ⑥ 降级与性能
   ══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  body::before,
  .ld-hero-title,
  .ld-feature::before,
  .ld-hero-btns .el-button--primary::after {
    animation: none !important;
  }
  .ld-hero-title { filter: none; }
  /* 关了动效: 不播任何入场动画, 元素本来就是可见的 */
  .imp-armed.imp-in,
  .imp-armed.imp-in .ld-feature,
  .imp-armed.imp-in .ld-step,
  .imp-armed.imp-in .ld-price,
  .imp-armed.imp-in .ld-trust-item {
    animation: none !important;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ld-feature, .ld-step, .ld-trust-item, .ld-price { background: #FFFFFF !important; }
  .ld-nav { background: rgba(255, 255, 255, .96) !important; }
}

/* 移动端少用 backdrop-filter (老 iPhone 上吃 GPU) */
@media (max-width: 900px) {
  .ld-feature,
  .ld-step,
  .ld-trust-item,
  .ld-price {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
  .ld-nav {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  body::before { filter: blur(18px) saturate(1.05); }
}
