/* ============================================================
   AI UI 风格词库 · 全局样式
   暗色模式 / 响应式 / Demo 展示提示词效果
   ============================================================ */

:root {
  /* 浅色主题 */
  --bg: #f6f7f9;
  --bg-soft: #ffffff;
  --bg-elev: #ffffff;
  --text: #16181d;
  --text-2: #4b5260;
  --text-3: #8a91a0;
  --border: #e6e8ee;
  --border-strong: #d4d8e1;
  --brand: #4f46e5;
  --brand-soft: #eef0ff;
  --brand-contrast: #ffffff;
  --accent: #06b6d4;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .10);
  --shadow-lg: 0 20px 48px rgba(16, 24, 40, .16);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --maxw: 1240px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono",
    monospace;
}

[data-theme="dark"] {
  --bg: #0d0f14;
  --bg-soft: #14171f;
  --bg-elev: #1a1e28;
  --text: #e8eaf0;
  --text-2: #b3b9c6;
  --text-3: #767e8e;
  --border: #262b36;
  --border-strong: #343b49;
  --brand: #818cf8;
  --brand-soft: #1e2240;
  --brand-contrast: #0d0f14;
  --accent: #22d3ee;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
code, pre { font-family: var(--font-mono); }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; gap: 18px;
  height: 60px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 900;
  box-shadow: var(--shadow-sm);
}
.logo small { font-weight: 600; color: var(--text-3); font-size: 12px; }
.nav-spacer { flex: 1; }
.nav-link { font-size: 14px; color: var(--text-2); padding: 6px 10px; border-radius: 8px; transition: .15s; }
.nav-link:hover { color: var(--text); background: var(--brand-soft); }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 17px; background: var(--bg-soft);
  transition: .15s;
}
.theme-toggle:hover { border-color: var(--border-strong); transform: translateY(-1px); }

/* ---------------- Hero ---------------- */
.hero { padding: 64px 0 36px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 420px;
  background: radial-gradient(600px 260px at 20% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
              radial-gradient(520px 240px at 85% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  padding: 5px 13px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(28px, 4.6vw, 46px); line-height: 1.2; font-weight: 850; letter-spacing: -.02em;
  max-width: 760px;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { margin-top: 16px; font-size: 16.5px; color: var(--text-2); max-width: 680px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; }
.hero-stat b { display: block; font-size: 24px; font-weight: 800; }
.hero-stat span { font-size: 13px; color: var(--text-3); }

/* ---------------- 工具栏：搜索 + 分类 ---------------- */
.toolbar { position: sticky; top: 60px; z-index: 40; padding: 14px 0 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.search-box { position: relative; max-width: 520px; }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-box input {
  width: 100%; height: 44px; padding: 0 14px 0 42px; font-size: 15px;
  border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--bg-soft); color: var(--text); outline: none; transition: .15s;
}
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.chips { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-2);
  transition: .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }
.chip.active { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }
.chip .count { opacity: .65; font-weight: 500; margin-left: 4px; font-size: 12px; }

/* ---------------- 卡片网格 ---------------- */
.grid {
  display: grid; gap: 22px; padding: 28px 0 60px;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

/* Demo 舞台 */
.demo-stage {
  position: relative; height: 190px; overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.demo-stage .demo-tag {
  position: absolute; top: 10px; left: 12px; z-index: 3;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
  border: 1px solid var(--border); color: var(--text-3);
  backdrop-filter: blur(4px);
}
.demo-stage .demo-hint {
  position: absolute; bottom: 9px; right: 12px; z-index: 3;
  font-size: 11px; color: var(--text-2); opacity: .95;
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px;
  backdrop-filter: blur(6px);
}

.card-body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card-title { font-size: 17.5px; font-weight: 800; letter-spacing: -.01em; }
.card-en { font-size: 12.5px; color: var(--brand); font-weight: 700; font-family: var(--font-mono); }
.card-desc { font-size: 13.8px; color: var(--text-2); line-height: 1.65; }
.keywords { display: flex; flex-wrap: wrap; gap: 6px; }
.kw {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2);
  background: var(--bg); border: 1px solid var(--border);
  padding: 2.5px 9px; border-radius: 7px;
}
.prompt-box {
  margin-top: auto;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px 11px;
  display: flex; flex-direction: column; gap: 8px;
}
.prompt-box .prompt-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.prompt-box .prompt-label {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--text-3);
  text-transform: uppercase;
}
.prompt-box pre {
  font-size: 12.3px; line-height: 1.6; color: var(--text-2);
  white-space: pre-wrap; word-break: break-word; max-height: 96px; overflow: hidden;
  transition: max-height .3s ease; margin: 0;
}
.prompt-box.expanded pre { max-height: 420px; overflow: auto; }
.copy-btn {
  flex: none;
  font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand); transition: .15s;
}
.copy-btn:hover { filter: brightness(.97); }
.copy-btn.copied { background: #16a34a; color: #fff; }
.expand-btn {
  font-size: 12px; color: var(--brand); font-weight: 700; padding: 2px 0; align-self: flex-start;
}
.expand-btn:hover { text-decoration: underline; }

.empty {
  grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--text-3);
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
}
.empty b { display: block; font-size: 17px; color: var(--text-2); margin-bottom: 6px; }

/* ---------------- 页脚 ---------------- */
.site-footer { border-top: 1px solid var(--border); padding: 34px 0 46px; color: var(--text-3); font-size: 13.5px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.footer-inner a { color: var(--text-2); }
.footer-inner a:hover { color: var(--brand); }

/* ============================================================
   实时 Demo 组件样式（每个 .demo-* 对应一个词条）
   注意：Demo 内部颜色尽量自包含，避免被主题变量影响
   ============================================================ */
.demo { display: grid; place-items: center; }
.demo-stage > .demo {
  position: absolute; inset: 12px; z-index: 1;
  width: auto; height: auto; user-select: none;
}

/* 1. 玻璃拟态 */
.demo-glass {
  width: 100%; height: 100%; border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #06b6d4 55%, #ec4899);
  position: relative; overflow: hidden;
}
.demo-glass::before {
  content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255,255,255,.35); top: -30px; left: -20px; filter: blur(6px);
}
.demo-glass::after {
  content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%;
  background: rgba(255,255,255,.25); bottom: -30px; right: -10px; filter: blur(6px);
}
.demo-glass .g-card {
  position: relative; z-index: 2; width: 62%; padding: 14px 16px; border-radius: 14px;
  background: rgba(255,255,255,.16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.35); box-shadow: 0 10px 30px rgba(0,0,0,.18);
  color: #fff;
}
.demo-glass .g-card b { font-size: 14px; display: block; }
.demo-glass .g-card span { font-size: 11px; opacity: .85; }
.demo-glass .g-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.3); margin-top: 10px; overflow: hidden; }
.demo-glass .g-bar i { display: block; width: 68%; height: 100%; background: #fff; border-radius: 99px; }

/* 2. 新野兽派 */
.demo-brutal { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.demo-brutal .b-box {
  border: 3px solid #111; border-radius: 0; padding: 12px 16px; font-weight: 800; font-size: 13px;
  box-shadow: 5px 5px 0 #111; background: #fff; color: #111;
}
.demo-brutal .b-box.y { background: #fde047; }
.demo-brutal .b-box.p { background: #f472b6; }
.demo-brutal .b-box.b { background: #60a5fa; }
.demo-brutal .b-btn {
  border: 3px solid #111; background: #111; color: #fff; padding: 11px 18px; font-weight: 800;
  box-shadow: 5px 5px 0 #f472b6; transition: transform .12s, box-shadow .12s;
}
.demo-brutal .b-btn:hover { transform: translate(3px,3px); box-shadow: 2px 2px 0 #f472b6; }

/* 3. 新拟态 */
.demo-neumo { display: flex; gap: 16px; align-items: center; }
.demo-neumo .n-card {
  width: 150px; padding: 18px; border-radius: 20px; background: #e8ecf3;
  box-shadow: 8px 8px 18px #c8cedb, -8px -8px 18px #ffffff;
  text-align: center; color: #5b6472;
}
.demo-neumo .n-circle {
  width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%;
  background: #e8ecf3; box-shadow: inset 4px 4px 8px #c8cedb, inset -4px -4px 8px #fff;
  display: grid; place-items: center; font-size: 18px;
}
.demo-neumo .n-card b { font-size: 13px; }
.demo-neumo .n-card span { font-size: 11px; color: #8a91a0; }
.demo-neumo .n-press {
  width: 54px; height: 54px; border-radius: 16px; background: #e8ecf3;
  box-shadow: inset 5px 5px 10px #c8cedb, inset -5px -5px 10px #fff;
  display: grid; place-items: center; font-size: 20px; color: #6366f1;
}

/* 4. 霓虹赛博 */
.demo-neon {
  width: 100%; height: 100%; border-radius: 14px; background: #07080f;
  display: grid; place-items: center; position: relative; overflow: hidden;
  background-image: linear-gradient(rgba(34,211,238,.08) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(34,211,238,.08) 1px, transparent 1px);
  background-size: 26px 26px;
}
.demo-neon .n-title {
  font-family: var(--font-mono); font-weight: 800; font-size: 22px; letter-spacing: .12em;
  color: #22d3ee; text-shadow: 0 0 8px #22d3ee, 0 0 22px rgba(34,211,238,.7);
  animation: neonPulse 2.2s ease-in-out infinite;
}
.demo-neon .n-sub { margin-top: 8px; font-family: var(--font-mono); font-size: 11px; color: #f0abfc; text-shadow: 0 0 8px #e879f9; }
@keyframes neonPulse { 0%,100% { opacity: 1; } 50% { opacity: .72; } }

/* 5. 极光渐变 */
.demo-aurora {
  width: 100%; height: 100%; border-radius: 14px; position: relative; overflow: hidden;
  background: #0b1020;
}
.demo-aurora::before, .demo-aurora::after {
  content: ""; position: absolute; width: 70%; height: 90%; border-radius: 50%;
  filter: blur(38px); opacity: .8;
}
.demo-aurora::before { background: radial-gradient(circle, #6366f1, transparent 65%); top: -30%; left: -10%; animation: auroraMove 7s ease-in-out infinite alternate; }
.demo-aurora::after { background: radial-gradient(circle, #22d3ee, transparent 65%); bottom: -40%; right: -10%; animation: auroraMove 9s ease-in-out infinite alternate-reverse; }
.demo-aurora .a-label { position: relative; z-index: 2; color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .04em; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
@keyframes auroraMove { from { transform: translate(0,0) scale(1); } to { transform: translate(18%,14%) scale(1.15); } }

/* 6. 扁平设计 */
.demo-flat { display: flex; gap: 12px; align-items: center; }
.demo-flat .f-tile { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 24px; }
.demo-flat .f-tile.t1 { background: #ef4444; } .demo-flat .f-tile.t2 { background: #f59e0b; }
.demo-flat .f-tile.t3 { background: #10b981; } .demo-flat .f-tile.t4 { background: #3b82f6; }
.demo-flat .f-tile.t5 { background: #8b5cf6; }

/* 7. 极简瑞士 */
.demo-swiss { width: 100%; height: 100%; background: #fff; border-radius: 14px; padding: 16px 18px; color: #111; display: flex; flex-direction: column; justify-content: space-between; }
.demo-swiss .s-big { font-size: 30px; font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.demo-swiss .s-row { display: flex; justify-content: space-between; align-items: flex-end; font-size: 11px; color: #555; }
.demo-swiss .s-line { height: 3px; background: #111; width: 46%; }
.demo-swiss .s-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin-top: 8px; }
.demo-swiss .s-grid i { height: 14px; background: #111; }
.demo-swiss .s-grid i:nth-child(2n) { background: #d4d4d8; }

/* 8. 黏土拟态 */
.demo-clay { display: flex; gap: 14px; align-items: center; }
.demo-clay .c-shape {
  width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; font-size: 26px;
  box-shadow: inset -6px -8px 14px rgba(0,0,0,.10), inset 6px 6px 14px rgba(255,255,255,.7), 0 10px 18px rgba(0,0,0,.10);
}
.demo-clay .c-shape.c1 { background: #fbcfe8; } .demo-clay .c-shape.c2 { background: #bfdbfe; }
.demo-clay .c-shape.c3 { background: #bbf7d0; } .demo-clay .c-shape.c4 { background: #ddd6fe; }

/* 9. 蒸汽波 */
.demo-vapor {
  width: 100%; height: 100%; border-radius: 14px; overflow: hidden; position: relative;
  background: linear-gradient(180deg, #2b1055 0%, #7597de 55%, #ff71ce 100%);
}
.demo-vapor .v-sun {
  position: absolute; left: 50%; top: 34%; transform: translateX(-50%);
  width: 86px; height: 86px; border-radius: 50%;
  background: linear-gradient(180deg, #ffe66d, #ff2e93);
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 8px, transparent 8px 12px);
  mask-image: repeating-linear-gradient(180deg, #000 0 8px, transparent 8px 12px);
}
.demo-vapor .v-grid {
  position: absolute; left: -20%; right: -20%; bottom: 0; height: 46%;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 22px 22px; transform: perspective(120px) rotateX(58deg); transform-origin: bottom;
}
.demo-vapor .v-text { position: absolute; top: 12px; left: 14px; font-family: var(--font-mono); font-weight: 800; color: #fff; letter-spacing: .15em; text-shadow: 2px 2px 0 #ff2e93; font-size: 13px; }

/* 10. 孟菲斯 */
.demo-memphis { width: 100%; height: 100%; border-radius: 14px; background: #fef3c7; position: relative; overflow: hidden; }
.demo-memphis .m-circle { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: #f472b6; top: 22px; right: 30px; }
.demo-memphis .m-tri { position: absolute; width: 0; height: 0; border-left: 26px solid transparent; border-right: 26px solid transparent; border-bottom: 44px solid #3b82f6; bottom: 24px; left: 34px; }
.demo-memphis .m-squiggle { position: absolute; top: 30px; left: 30px; font-size: 30px; color: #111; font-weight: 900; }
.demo-memphis .m-dots { position: absolute; bottom: 18px; right: 26px; width: 60px; height: 40px; background-image: radial-gradient(#111 2px, transparent 2.5px); background-size: 10px 10px; }
.demo-memphis .m-bar { position: absolute; top: 64px; left: 30px; width: 90px; height: 14px; background: #10b981; border: 2px solid #111; }

/* 11. 便当盒布局 */
.demo-bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 46px; gap: 8px; width: 86%; }
.demo-bento .bt { border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg-soft); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--text-2); }
.demo-bento .bt.w2 { grid-column: span 2; } .demo-bento .bt.h2 { grid-row: span 2; }
.demo-bento .bt.brand { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; border: none; }

/* 12. 编辑杂志风 */
.demo-editorial { width: 100%; height: 100%; background: #faf7f2; border-radius: 14px; padding: 16px 18px; color: #1a1a1a; display: flex; flex-direction: column; }
.demo-editorial .e-kicker { font-size: 10px; letter-spacing: .22em; color: #b45309; font-weight: 700; }
.demo-editorial .e-title { font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 700; line-height: 1.1; margin: 4px 0 8px; }
.demo-editorial .e-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; }
.demo-editorial .e-line { height: 5px; background: #d6cfc4; border-radius: 3px; margin-bottom: 6px; }
.demo-editorial .e-line.w80 { width: 80%; } .demo-editorial .e-line.w60 { width: 60%; }
.demo-editorial .e-img { background: linear-gradient(135deg, #d6cfc4, #b8ad9c); border-radius: 8px; }

/* 13. 有机自然 */
.demo-organic { width: 100%; height: 100%; border-radius: 14px; background: linear-gradient(160deg, #e7f0e4, #d8e6d2); display: grid; place-items: center; position: relative; overflow: hidden; }
.demo-organic .o-blob { position: absolute; border-radius: 48% 52% 60% 40% / 50% 45% 55% 50%; background: #86a878; opacity: .55; }
.demo-organic .o-blob.b1 { width: 120px; height: 120px; top: -24px; left: -20px; }
.demo-organic .o-blob.b2 { width: 90px; height: 90px; bottom: -20px; right: -10px; background: #a8c49a; }
.demo-organic .o-card { position: relative; z-index: 2; background: rgba(255,255,255,.75); backdrop-filter: blur(6px); border-radius: 22px; padding: 14px 20px; text-align: center; color: #3f5b36; }
.demo-organic .o-card b { font-size: 14px; display: block; } .demo-organic .o-card span { font-size: 11px; opacity: .8; }

/* 14. 滚动显现动效 */
.demo-scroll { width: 100%; height: 100%; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--border); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 16px; justify-content: center; }
.demo-scroll .sc-item { height: 34px; border-radius: 10px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); display: flex; align-items: center; padding: 0 14px; font-size: 12px; font-weight: 700; color: var(--brand); opacity: 0; transform: translateY(14px); animation: scIn 3.4s ease-in-out infinite; }
.demo-scroll .sc-item:nth-child(2) { animation-delay: .5s; } .demo-scroll .sc-item:nth-child(3) { animation-delay: 1s; }
@keyframes scIn { 0% { opacity: 0; transform: translateY(14px); } 25%,70% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-8px); } }

/* 15. 悬停上浮 */
.demo-hover { display: flex; gap: 14px; align-items: center; }
.demo-hover .h-card { width: 120px; padding: 16px 14px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--border); box-shadow: var(--shadow-sm); text-align: center; transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s; }
.demo-hover .h-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.demo-hover .h-card .h-ico { font-size: 24px; } .demo-hover .h-card b { display: block; font-size: 13px; margin-top: 6px; }
.demo-hover .h-card span { font-size: 11px; color: var(--text-3); }

/* 16. 按钮波纹 */
.demo-ripple { display: grid; place-items: center; }
.demo-ripple .r-btn { position: relative; overflow: hidden; padding: 13px 30px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; }
.demo-ripple .r-btn .ripple-dot { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.55); transform: scale(0); animation: ripple .65s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(18); opacity: 0; } }

/* 17. 流光按钮 shimmer */
.demo-shimmer { display: grid; place-items: center; }
.demo-shimmer .s-btn { position: relative; overflow: hidden; padding: 13px 30px; border-radius: 12px; background: linear-gradient(110deg, #4f46e5, #06b6d4, #4f46e5); background-size: 200% 100%; color: #fff; font-weight: 800; font-size: 14px; animation: shimmerBg 2.6s linear infinite; }
.demo-shimmer .s-btn::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: shine 2.6s ease-in-out infinite; }
@keyframes shimmerBg { to { background-position: -200% 0; } }
@keyframes shine { 0% { left: -60%; } 60%,100% { left: 130%; } }

/* 18. 视差 */
.demo-parallax { width: 100%; height: 100%; border-radius: 14px; overflow: hidden; position: relative; background: linear-gradient(180deg, #bae6fd, #e0f2fe); }
.demo-parallax .p-layer { position: absolute; left: 0; right: 0; }
.demo-parallax .p-sun { top: 20px; right: 30px; width: 40px; height: 40px; border-radius: 50%; background: #fbbf24; animation: pMove 5s ease-in-out infinite alternate; }
.demo-parallax .p-mountain { bottom: 30px; height: 70px; background: #7dd3fc; clip-path: polygon(0 100%, 22% 30%, 45% 100%, 66% 20%, 100% 100%); animation: pMove 7s ease-in-out infinite alternate-reverse; }
.demo-parallax .p-front { bottom: 0; height: 40px; background: #0284c7; clip-path: polygon(0 100%, 30% 40%, 55% 100%, 80% 45%, 100% 100%); animation: pMove 4s ease-in-out infinite alternate; }
@keyframes pMove { from { transform: translateX(-8px); } to { transform: translateX(10px); } }

/* 19. 骨架屏 */
.demo-skeleton { width: 84%; display: flex; flex-direction: column; gap: 10px; }
.demo-skeleton .sk { border-radius: 8px; background: linear-gradient(90deg, var(--border) 25%, color-mix(in srgb, var(--border) 40%, var(--bg-soft)) 50%, var(--border) 75%); background-size: 200% 100%; animation: skShine 1.4s linear infinite; }
.demo-skeleton .sk.avatar { width: 42px; height: 42px; border-radius: 50%; }
.demo-skeleton .sk.h { height: 14px; width: 70%; } .demo-skeleton .sk.l { height: 10px; width: 100%; } .demo-skeleton .sk.l2 { height: 10px; width: 85%; }
.demo-skeleton .sk-row { display: flex; gap: 12px; align-items: center; }
@keyframes skShine { to { background-position: -200% 0; } }

/* 20. 暗色模式 */
.demo-dark { width: 100%; height: 100%; border-radius: 14px; background: #0d0f14; border: 1px solid #262b36; padding: 16px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.demo-dark .d-top { display: flex; justify-content: space-between; align-items: center; }
.demo-dark .d-title { color: #e8eaf0; font-weight: 800; font-size: 14px; }
.demo-dark .d-toggle { width: 38px; height: 20px; border-radius: 99px; background: #6366f1; position: relative; }
.demo-dark .d-toggle::after { content: ""; position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.demo-dark .d-card { background: #1a1e28; border: 1px solid #262b36; border-radius: 10px; padding: 12px; color: #b3b9c6; font-size: 12px; }
.demo-dark .d-card b { color: #e8eaf0; }

/* 21. 渐变文字 */
.demo-gradient-text { display: grid; place-items: center; }
.demo-gradient-text .gt { font-size: 30px; font-weight: 900; letter-spacing: -.02em; background: linear-gradient(90deg, #f43f5e, #f59e0b, #10b981, #3b82f6, #8b5cf6); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gtFlow 4s linear infinite; }
@keyframes gtFlow { to { background-position: 200% center; } }

/* 22. 噪点纹理 */
.demo-noise { width: 100%; height: 100%; border-radius: 14px; background: #e7e5e4; position: relative; overflow: hidden; display: grid; place-items: center; }
.demo-noise::before { content: ""; position: absolute; inset: 0; opacity: .5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E"); }
.demo-noise .n-label { position: relative; z-index: 2; background: #1c1917; color: #fafaf9; padding: 10px 18px; border-radius: 10px; font-weight: 800; font-size: 14px; }

/* 23. 3D 倾斜卡片 */
.demo-tilt { display: grid; place-items: center; perspective: 700px; }
.demo-tilt .t-card { width: 150px; padding: 20px; border-radius: 16px; background: linear-gradient(145deg, #fff, #eef0ff); border: 1px solid var(--border); box-shadow: 0 18px 36px rgba(79,70,229,.22); transform: rotateX(12deg) rotateY(-14deg); transition: transform .08s linear; text-align: center; }
.demo-tilt .t-card .t-ico { font-size: 28px; } .demo-tilt .t-card b { display: block; margin-top: 8px; font-size: 14px; }
.demo-tilt .t-card span { font-size: 11px; color: var(--text-3); }

/* 24. 故障抖动 glitch */
.demo-glitch { width: 100%; height: 100%; border-radius: 14px; background: #0a0a0f; display: grid; place-items: center; overflow: hidden; }
.demo-glitch .gl { position: relative; font-family: var(--font-mono); font-weight: 900; font-size: 26px; color: #fff; letter-spacing: .08em; }
.demo-glitch .gl::before, .demo-glitch .gl::after { content: attr(data-text); position: absolute; inset: 0; }
.demo-glitch .gl::before { color: #22d3ee; animation: gl1 2.4s infinite steps(1); clip-path: inset(0 0 55% 0); }
.demo-glitch .gl::after { color: #f472b6; animation: gl2 2.4s infinite steps(1); clip-path: inset(55% 0 0 0); }
@keyframes gl1 { 0%,92%,100% { transform: translate(0); } 93% { transform: translate(-3px,-2px); } 96% { transform: translate(3px,1px); } }
@keyframes gl2 { 0%,90%,100% { transform: translate(0); } 91% { transform: translate(3px,2px); } 95% { transform: translate(-3px,-1px); } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 640px) {
  .hero { padding: 44px 0 26px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .toolbar { top: 60px; }
  .nav-link.hide-sm { display: none; }
  .demo-stage { height: 172px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
