/* ============================================================
   莉莉丝发卡 · 前端视觉增强 v2
   - 使用 [class~=] 精确匹配，避免误伤 hover: 变体
   ============================================================ */

/* ---------- 1. 字体 ---------- */
.vault-tokens,
body {
  font-family: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 2. 设计变量 ---------- */
.vault-tokens {
  --bg: #f6f7fb;
  --ink: #14131f;
  --border: #e8e7f1;
  --shadow: 0 22px 48px -26px rgba(28, 24, 60, .28);
  --shadow-sm: 0 4px 16px -8px rgba(28, 24, 60, .16);
  --red: #5b4be8;
  --teal: #0e9f9c;
  --plum: #7a3fe4;
  --gold: #f2a30f;
  --ring: 0 0 0 4px rgba(91, 75, 232, .18);
}

/* ---------- 3. 背景 ---------- */
body.vault-tokens {
  background:
    radial-gradient(1100px 480px at 12% -8%, rgba(91, 75, 232, .09), transparent 62%),
    radial-gradient(900px 420px at 92% -4%, rgba(14, 159, 156, .07), transparent 58%),
    #f6f7fb !important;
  background-attachment: fixed;
}

/* ---------- 4. 顶栏毛玻璃 ---------- */
header.sticky {
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: rgba(255, 255, 255, .78) !important;
  border-bottom-color: rgba(20, 19, 31, .07) !important;
  box-shadow: 0 10px 30px -24px rgba(20, 19, 31, .4);
}

/* 顶栏：只给文字导航加悬停，不碰圆形图标按钮 */
header.sticky nav a,
header.sticky > div > a:not([class~="bg-primary"]):not([class~="bg-secondary"]) {
  transition: color .18s ease;
}

/* ---------- 5. 分类卡片 ---------- */
[class~="min-h-[116px]"] {
  border-radius: 16px !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px -14px rgba(20, 19, 31, .5);
  transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, filter .24s ease !important;
}
/* 顶部柔光 */
[class~="min-h-[116px]"]::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 60%;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0));
  pointer-events: none;
}
[class~="min-h-[116px]"]:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 22px 36px -22px rgba(20, 19, 31, .42) !important;
  filter: saturate(110%);
}
[class~="min-h-[116px]"] > div,
[class~="min-h-[116px]"] > span { position: relative; z-index: 1; }

/* ---------- 6. 商品卡片 ---------- */
[class~="bg-card"] {
  border-radius: 16px !important;
  transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, border-color .24s ease !important;
  box-shadow: 0 1px 3px rgba(20, 19, 31, .06), 0 8px 20px -16px rgba(20, 19, 31, .25);
}
[class~="bg-card"]:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 20px 38px -22px rgba(20, 19, 31, .38) !important;
  border-color: rgba(91, 75, 232, .32) !important;
}
[class~="bg-card"] img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
[class~="bg-card"]:hover img { transform: scale(1.04); }

/* ---------- 7. 主按钮：只作用于真正的 bg-primary 元素 ---------- */
button[class~="bg-primary"],
a[class~="bg-primary"] {
  background: linear-gradient(180deg, #6a5bf0, #5b4be8 58%, #5241dd) !important;
  box-shadow: 0 8px 18px -12px rgba(91, 75, 232, .9);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease !important;
}
button[class~="bg-primary"]:hover,
a[class~="bg-primary"]:hover {
  filter: brightness(1.07);
  box-shadow: 0 14px 24px -14px rgba(91, 75, 232, .95);
}
button[class~="bg-primary"]:active,
a[class~="bg-primary"]:active { transform: translateY(1px); }

/* 图标按钮：保持中性，只加轻微悬停反馈 */
header [class~="bg-secondary"] {
  transition: background-color .18s ease, transform .18s ease;
}
header [class~="bg-secondary"]:hover { transform: translateY(-1px); }

/* ---------- 8. 标题排版 ---------- */
h1, h2, h3 { letter-spacing: -0.025em; }
[class~="text-[28px]"] { font-weight: 800 !important; letter-spacing: -.03em; }
[class~="text-[28px]"]::after {
  content: "";
  display: block;
  width: 30px;
  height: 3px;
  margin-top: 9px;
  border-radius: 3px;
  background: linear-gradient(90deg, #5b4be8, #0e9f9c);
  opacity: .8;
}

/* ---------- 9. 输入框 ---------- */
input, textarea, select {
  border-radius: 12px !important;
  transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(91, 75, 232, .5) !important;
  box-shadow: 0 0 0 4px rgba(91, 75, 232, .10) !important;
  outline: none;
}

/* ---------- 10. 页脚 ---------- */
footer {
  border-top: 1px solid rgba(20, 19, 31, .06);
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(246,247,251,.95));
}

/* ---------- 11. 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(20, 19, 31, .16);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(20, 19, 31, .3); background-clip: content-box; }

/* ---------- 12. 入场动效 ---------- */
@keyframes lili-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
[class~="min-h-[116px]"], [class~="bg-card"] {
  animation: lili-fade-up .42s cubic-bezier(.2,.8,.2,1) both;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- 13. 选中文本 ---------- */
::selection { background: rgba(91, 75, 232, .22); }
