/* ============================================================
   Obsidian — componentized premium UI
   组件来源（21st.dev 提取规格）：
   - Aurora Background        demo 8076  (blur-3xl 彩色 blob + 星星, mix-blend-screen)
   - Spotlight Card           demo 2487  (custom-cursor 光标跟随光斑)
   - Moving Border            demo 9450  (hover 渐变描边流动)
   - Lamp                     demo 900   (conic 顶部灯效)
   - Beams Background         demo 1637  (点阵 + 光柱)
   - Text Shimmer             demo 15761 (标题流光)
   - Blue Noise               demo 23975 (噪点质感层, CSS 版)
   ============================================================ */

/* ---------- 字体 ---------- */
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("assets/fonts/space-grotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("assets/fonts/space-grotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- 设计令牌 ---------- */
:root {
  --bg: #0a0a0d;
  --bg-soft: #0e0e13;
  --panel: rgba(255, 255, 255, .035);
  --panel-hover: rgba(255, 255, 255, .058);
  --panel-solid: #121218;
  --border: rgba(255, 255, 255, .078);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #f4f4f6;
  --muted: #9c9ca8;
  --faint: #63636e;
  --accent: #c9a96b;            /* 金属金 */
  --accent-strong: #e6cc93;
  --accent-deep: #a8864b;
  --accent-soft: rgba(201, 169, 107, .14);
  --ink: #0d0d10;               /* 亮底按钮上的深色文字 */
  --ring: rgba(230, 204, 147, .45);
  --shadow-card: 0 1px 0 rgba(255,255,255,.045) inset, 0 22px 50px -26px rgba(0,0,0,.9);
  --shadow-lift: 0 30px 70px -30px rgba(0,0,0,.95);
  --radius: 16px;
  --radius-sm: 10px;
  --topbar-h: 60px;
  --ease: cubic-bezier(.22, .8, .28, 1);
  --font: "Inter", -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
[data-theme="light"] {
  --bg: #f4f2ee;
  --bg-soft: #faf9f6;
  --panel: rgba(20, 20, 26, .035);
  --panel-hover: rgba(20, 20, 26, .06);
  --panel-solid: #ffffff;
  --border: rgba(20, 20, 26, .09);
  --border-strong: rgba(20, 20, 26, .18);
  --text: #191920;
  --muted: #5d5d68;
  --faint: #8d8d98;
  --accent: #a3803f;
  --accent-strong: #8a6a2f;
  --accent-deep: #a3803f;
  --accent-soft: rgba(163, 128, 63, .12);
  --ink: #f4f4f6;
  --ring: rgba(138, 106, 47, .4);
  --shadow-card: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 44px -24px rgba(30, 25, 10, .28);
  --shadow-lift: 0 26px 60px -28px rgba(30, 25, 10, .4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.65 var(--font);
  min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: rgba(201, 169, 107, .3); }
button { font-family: inherit; }
img { max-width: 100%; }
mark { background: rgba(201, 169, 107, .2); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ============================================================
   背景层 —— Aurora (8076) + Beams (1637) + Noise (23975)
   ============================================================ */
.bg-base {
  position: fixed; inset: 0; z-index: -5; pointer-events: none;
  background:
    url("assets/gen/tex-dark.webp") repeat,
    radial-gradient(120% 90% at 50% -12%, rgba(255,255,255,.05), transparent 58%),
    var(--bg);
  background-size: 640px 640px, auto, auto;
}
[data-theme="light"] .bg-base {
  background:
    url("assets/gen/tex-light.webp") repeat,
    radial-gradient(120% 90% at 50% -12%, rgba(30,25,10,.04), transparent 58%),
    var(--bg);
  background-size: 640px 640px, auto, auto;
}
/* Aurora 彩色 blob：blur-3xl + mix-blend-screen，低透明度 */
.bg-blobs { position: fixed; inset: 0; z-index: -4; overflow: hidden; pointer-events: none; }
.bg-blobs i {
  position: absolute; border-radius: 50%;
}
.bg-blobs i:nth-child(1) {
  width: 30vw; height: 30vw; left: -8vw; top: -14vh;
  background: radial-gradient(circle at 40% 40%, rgba(79, 70, 229, .30), transparent 62%);
  animation: drift1 55s ease-in-out infinite alternate;
}
.bg-blobs i:nth-child(2) {
  width: 26vw; height: 26vw; right: -9vw; top: 4vh;
  background: radial-gradient(circle at 55% 45%, rgba(124, 58, 237, .22), transparent 62%);
  animation: drift2 70s ease-in-out infinite alternate;
}
@keyframes drift1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(4vw, 3vh, 0) scale(1.12); } }
@keyframes drift2 { from { transform: translate3d(0,0,0) scale(1.08); } to { transform: translate3d(-3vw, 5vh, 0) scale(.94); } }
[data-theme="light"] .bg-blobs i { opacity: .5; }
[data-theme="light"] .bg-blobs i:nth-child(1) { background: radial-gradient(circle at 40% 40%, rgba(199, 180, 130, .5), transparent 62%); }
[data-theme="light"] .bg-blobs i:nth-child(2) { background: radial-gradient(circle at 55% 45%, rgba(160, 170, 220, .4), transparent 62%); }

/* 星星层（Aurora twinkling stars，CSS 实现，缓慢漂移） */
.bg-stars {
  position: fixed; inset: 0; z-index: -4; pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,.55) 1px, transparent 1.4px),
    radial-gradient(rgba(255,255,255,.32) 1px, transparent 1.5px),
    radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.4px);
  background-size: 180px 180px, 97px 97px, 340px 340px;
  background-position: 0 0, 40px 60px, 120px 20px;
  opacity: .5;
}
[data-theme="light"] .bg-stars { opacity: .3; }
[data-theme="light"] .bg-stars { background-image:
  radial-gradient(rgba(40,40,60,.4) 1px, transparent 1.4px),
  radial-gradient(rgba(40,40,60,.22) 1px, transparent 1.5px),
  radial-gradient(rgba(40,40,60,.12) 1px, transparent 1.4px); }

/* 噪点质感层（Noise 23975 CSS 版） */
.bg-noise {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image: var(--noise); background-size: 160px 160px;
  opacity: .05;
}
[data-theme="light"] .bg-noise { opacity: .06; }

/* 网格 + 点阵（Beams 1637） */
.grid-overlay {
  position: fixed; inset: 0; z-index: -4; pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 30px 30px, 54px 54px, 54px 54px;
  mask-image: radial-gradient(ellipse 100% 62% at 50% 0%, #000 18%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 100% 62% at 50% 0%, #000 18%, transparent 78%);
}
[data-theme="light"] .grid-overlay {
  background-image:
    radial-gradient(rgba(30,30,40,.14) 1px, transparent 1px),
    linear-gradient(rgba(30,30,40,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,30,40,.05) 1px, transparent 1px);
}

/* ============ 顶栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  min-height: var(--topbar-h); padding: 9px 22px;
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.back-home {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 12.5px/1 var(--font-ui);
  color: var(--muted);
  padding: 7px 11px; border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 60%, transparent);
  text-decoration: none; transition: all .25s var(--ease); flex: none;
}
.back-home:hover { color: var(--ink); border-color: var(--accent); transform: translateX(-2px); box-shadow: var(--shadow-card); }

.brand { display: flex; align-items: center; gap: 11px; cursor: default; }
.logo {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  object-fit: cover; display: block;
  border: 1px solid rgba(201, 169, 107, .35);
  box-shadow: var(--shadow-card);
  filter: saturate(.96);
}
.brand h1 { font: 700 14.5px/1.2 var(--font-display); letter-spacing: .14px; }
.brand p { font-size: 11px; color: var(--muted); }
.sourcetabs { display: flex; gap: 3px; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.sourcetab {
  border: none; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600;
  padding: 4px 13px 5px; border-radius: 14px; cursor: pointer; transition: all .22s var(--ease);
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px; white-space: nowrap; line-height: 1.15;
}
.sourcetab .tname { display: inline-flex; align-items: center; gap: 6px; }
.sourcetab .tcn { font-size: 10px; font-weight: 500; opacity: .6; letter-spacing: .02em; }
.sourcetab.active .tcn { opacity: .75; }
.sourcetab em { font-style: normal; font-size: 10.5px; background: var(--panel-hover); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; transition: inherit; }
.sourcetab:hover { color: var(--text); }
.sourcetab.active { background: #f4f4f6; color: #0d0d10; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 14px -6px rgba(0,0,0,.6); }
.sourcetab.active em { background: rgba(13,13,16,.08); border-color: transparent; }
[data-theme="light"] .sourcetab.active { background: #191920; color: #f4f4f6; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 16px -8px rgba(0,0,0,.5); }
[data-theme="light"] .sourcetab.active em { background: rgba(255,255,255,.14); }
.searchbox { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }
#q {
  flex: 1; background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 9px 16px; font-size: 13px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
#q:focus { border-color: var(--ring); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ring) 18%, transparent); background: var(--panel-hover); }
#q::placeholder { color: var(--faint); }
.fulltoggle { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; user-select: none; }
.fulltoggle input { accent-color: var(--accent-deep); width: 15px; height: 15px; cursor: pointer; }
.theme-btn {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  width: 36px; height: 36px; border-radius: 50%; font-size: 15px; cursor: pointer;
  transition: all .25s var(--ease); flex: none; display: grid; place-items: center;
}
.theme-btn:hover { border-color: var(--ring); transform: rotate(18deg) scale(1.06); }
.theme-btn .i-sun { display: none; }
[data-theme="light"] .theme-btn .i-moon { display: none; }
[data-theme="light"] .theme-btn .i-sun { display: block; }
.btn svg, .tabbtn svg { flex: none; vertical-align: -2px; }

/* ============ Hero ============ */
.hero { position: relative; padding: clamp(34px, 6vw, 70px) 22px 30px; text-align: center; display: flex; justify-content: center; overflow: hidden; }
/* Beams 光柱（Beams 1637）：两条倾斜光束缓慢明暗 */
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero-bg::before {
  content: ""; position: absolute; inset: -20% -10%;
  background:
    linear-gradient(112deg, transparent 44%, rgba(255,255,255,.05) 50%, transparent 56%),
    linear-gradient(118deg, transparent 46%, rgba(255,255,255,.032) 52%, transparent 58%);
}
[data-theme="light"] .hero-bg::before {
  background:
    linear-gradient(112deg, transparent 44%, rgba(160,150,120,.1) 50%, transparent 56%),
    linear-gradient(118deg, transparent 46%, rgba(160,150,120,.07) 52%, transparent 58%);
}
/* Lamp 视差（JS 注入 --mx/--my） */
.hero-title { transform: translate(calc(var(--mx, 0) * 10px), calc(var(--my, 0) * 6px)); }
.lamp { transform: translate(calc(var(--mx, 0) * -16px), calc(var(--my, 0) * -10px)); }
.lamp, .hero-title { transition: transform .35s ease-out; }
.hero-glow {
  position: absolute; top: -12%; left: 50%; transform: translateX(-50%);
  width: 64%; height: 78%; z-index: 0; pointer-events: none;
  background: url("assets/gen/hero-glow.webp") center top / 100% auto no-repeat;
  opacity: .55;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.7) 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.7) 60%, transparent 100%);
}
[data-theme="light"] .hero-glow { opacity: .4; }

.hero-inner { position: relative; z-index: 1; max-width: 800px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 15px; }
/* Lamp 顶部灯效（Lamp 900）：conic 光锥 + 高光线 */
.lamp { position: relative; width: min(760px, 96%); height: 320px; pointer-events: none; margin: -70px auto -210px; }
.lamp::before {
  content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 150%; height: 100%;
  background: conic-gradient(from 70deg at center top, transparent 0%, rgba(255,255,255,.32) 28%, rgba(255,255,255,.1) 44%, transparent 50%);
  -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 10%, transparent 92%);
}
.lamp::after {
  content: ""; position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%);
  width: min(560px, 90%); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 204, 147, .85) 50%, transparent);
  filter: blur(.4px);
}
[data-theme="light"] .lamp::before { opacity: .55; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 16px;
  font-size: 12px; color: var(--muted); background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card); letter-spacing: .02em;
}
.hero-title {
  font: 700 clamp(36px, 6.4vw, 68px)/1.06 var(--font-display);
  letter-spacing: -.035em; text-wrap: balance;
  background: linear-gradient(112deg, #d9d9df 0%, #f7f7f9 22%, #e9dfc4 42%, #f7f7f9 58%, #c9c9d2 78%, #e4e4ea 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="light"] .hero-title {
  background: linear-gradient(112deg, #2a2a33 0%, #191920 24%, #8a6a2f 46%, #191920 60%, #2e2e38 80%, #22222b 100%);
  -webkit-background-clip: text; background-clip: text;
}
.grad {
  background: linear-gradient(92deg, #8a6a2f 0%, #c9a96b 30%, #e8d6a8 50%, #c9a96b 70%, #8a6a2f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="light"] .grad { background: linear-gradient(92deg, #8a6a2f 0%, #a3803f 50%, #8a6a2f 100%); -webkit-background-clip: text; background-clip: text; }
.hero-sub { color: var(--muted); font-size: 15px; max-width: 580px; }
.hero-search { position: relative; width: min(600px, 94%); margin-top: 4px; }
.hero-search input {
  width: 100%; background: var(--panel); border: 1px solid var(--border);
  color: var(--text); border-radius: 999px; padding: 14px 46px 14px 20px; font-size: 14.5px;
  outline: none; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
  transition: border-color .2s, box-shadow .2s, background .2s, transform .2s;
}
.hero-search input:focus { border-color: var(--ring); background: var(--panel-hover); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ring) 16%, transparent), var(--shadow-card); }
.hero-search input::placeholder { color: var(--faint); }
.search-ico {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--faint); pointer-events: none; z-index: 1;
}
.hero-search input { padding-left: 44px; }
.hero-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: var(--panel-hover); border: 1px solid var(--border); color: var(--muted);
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 12px; transition: all .2s;
}
.hero-clear:hover { color: var(--text); border-color: var(--ring); }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.hstat {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 24px; min-width: 112px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card); transition: transform .22s var(--ease), border-color .22s;
}
.hstat:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.hstat b { display: block; font: 700 24px/1.1 var(--font-display); color: var(--accent-strong); letter-spacing: -.02em; }
.hstat span { font-size: 11px; color: var(--muted); }
[data-theme="light"] .hstat b { color: var(--accent-deep); }

/* ============ 标签 & 排序 ============ */
.tagsbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 22px 2px; align-items: center; justify-content: center; }
.tags { display: contents; }
.chip {
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 5px 13px; font-size: 12px; cursor: pointer;
  transition: all .2s var(--ease); user-select: none;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.chip.active { background: #f4f4f6; border-color: transparent; color: #0d0d10; }
[data-theme="light"] .chip.active { background: #191920; color: #f4f4f6; }
.sortbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 14px 22px 4px; max-width: 1440px; margin: 0 auto;
}
.sort-label { font-size: 12px; color: var(--faint); margin-right: 4px; }
.sortbtn {
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; transition: all .2s var(--ease);
}
.sortbtn:hover { color: var(--text); border-color: var(--border-strong); }
.sortbtn.active { background: var(--accent-soft); border-color: var(--ring); color: var(--accent-strong); }
[data-theme="light"] .sortbtn.active { color: var(--accent-deep); }
.result-count { margin-left: auto; font-size: 12px; color: var(--faint); }

/* ============ 卡片网格（Spotlight 2487 + Moving Border 9450） ============ */
.list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px; padding: 18px 22px 8px; max-width: 1440px; margin: 0 auto;
}
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow-card);
  transition: transform .28s var(--ease), border-color .28s, box-shadow .28s, background .28s;
  content-visibility: auto; contain-intrinsic-size: auto 380px;
  overflow: hidden;
}
/* Moving Border：hover 顶部金色流光线 */
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; border-radius: inherit; z-index: 1;
  background: linear-gradient(90deg, transparent 12%, rgba(230, 204, 147, .85) 50%, transparent 88%);
  background-size: 220% 100%; background-position: 120% 0;
  opacity: 0; transition: opacity .3s;
}
.card:hover::before { opacity: 1; animation: borderflow 2.6s var(--ease) infinite; }
@keyframes borderflow { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
/* Spotlight：光标跟随光斑（--x/--y 由 app.js 注入） */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(560px circle at var(--x, 50%) var(--y, 40%), rgba(255,255,255,.055), transparent 42%);
  opacity: 0; transition: opacity .3s;
}
.card:hover::after { opacity: 1; }
[data-theme="light"] .card::after { background: radial-gradient(560px circle at var(--x, 50%) var(--y, 40%), rgba(255,255,255,.65), transparent 42%); }
.card:hover { transform: translateY(-4px); border-color: rgba(201, 169, 107, .34); background: var(--panel-hover); box-shadow: var(--shadow-lift); }
.thumb {
  position: relative; aspect-ratio: 16 / 9.4; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, #131318, #1a1a22); cursor: pointer; isolation: isolate;
}
[data-theme="light"] .thumb { background: linear-gradient(135deg, #e9e7e1, #f5f3ee); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.thumb:hover img, .thumb:hover video { transform: scale(1.05); }
.thumb-re { background: var(--card, #fff); }
.thumb-re img { object-fit: contain !important; }

.thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint); font-size: 24px; }
.thumb .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,.6));
  color: #fff; opacity: 0; transition: opacity .25s; font-size: 12.5px; font-weight: 600;
}
.thumb:hover .play { opacity: 1; }
.thumb .play i {
  font-style: normal; display: inline-flex; align-items: center; gap: 7px;
  background: rgba(12,12,16,.66); border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px; padding: 7px 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.card-head { display: flex; align-items: flex-start; gap: 8px; padding: 2px 4px 0; }
.card-title { font: 600 14px/1.35 var(--font-display); letter-spacing: -.01em; }
.slug { font-size: 11px; color: var(--faint); font-weight: 500; margin-left: 4px; }
.card-sub { font-size: 11px; color: var(--faint); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.card-desc { font-size: 12.5px; color: var(--muted); line-height: 1.55; padding: 0 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 4px; }
.card-tags span {
  font-size: 10.5px; color: var(--muted); background: var(--panel-hover);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px;
}
.card-actions { display: flex; gap: 8px; margin-top: auto; padding: 0 2px 2px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel-hover); border: 1px solid var(--border); color: var(--text);
  border-radius: 11px; padding: 8px 14px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all .2s var(--ease); text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ring); transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn.primary { background: #f4f4f6; border: 1px solid transparent; color: #0d0d10; }
.btn.primary:hover { background: var(--accent); border-color: transparent; color: #14100a; filter: none; }
[data-theme="light"] .btn.primary { background: #191920; color: #f4f4f6; }
[data-theme="light"] .btn.primary:hover { background: var(--accent-deep); color: #fff; }
.btn.small { padding: 6px 12px; font-size: 12px; border-radius: 9px; }
.btn.close { width: 34px; height: 34px; padding: 0; border-radius: 50%; flex: none; }

/* ============ 徽章 ============ */
.msbadge {
  display: inline-block; background: var(--panel-hover); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 9px; font-size: 10.5px; color: var(--muted);
}
.msbadge.feat { border-color: rgba(201,169,107,.5); color: var(--accent-strong); background: var(--accent-soft); }
.msbadge.free { border-color: rgba(120,190,140,.4); color: #7fc795; background: rgba(120,190,140,.1); }
.msbadge.enh { border-color: rgba(150,160,255,.4); color: #aab2ff; background: rgba(150,160,255,.09); }
[data-theme="light"] .msbadge.free { color: #2e7d4f; }
[data-theme="light"] .msbadge.enh { color: #4a55c4; }

/* ============ 提示词块（可折叠） ============ */
.prompt-wrap { padding: 0 4px; }
.prompt-toggle {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left;
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s var(--ease); user-select: none;
}
.prompt-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.prompt-toggle.open { color: var(--accent-strong); border-color: rgba(201,169,107,.4); background: var(--accent-soft); }
.plen { margin-left: auto; font-weight: 500; color: var(--faint); font-size: 10.5px; }
.pico { transition: transform .25s var(--ease); font-size: 10px; }
.prompt-toggle.open .pico { transform: rotate(90deg); }
.prompt {
  max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
}
.prompt:not(.collapsed) {
  max-height: 26em; overflow: auto; margin-top: 7px;
  background: color-mix(in srgb, var(--bg-soft) 72%, transparent);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; scrollbar-width: thin;
}
.prompt .txt { display: block; color: var(--muted); font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.prompt pre { overflow: auto; background: rgba(0,0,0,.35); border: 1px solid var(--border); border-radius: 9px; padding: 12px; margin: 8px 0; }
[data-theme="light"] .prompt pre { background: rgba(20,20,26,.06); }
.prompt code { font-family: "Cascadia Code", Consolas, monospace; font-size: 11.5px; color: #d8d8e0; line-height: 1.6; }
[data-theme="light"] .prompt code { color: #2c2c36; }

/* ============ 加载 & 空态 ============ */
.loadwrap { display: flex; justify-content: center; padding: 18px 0 30px; }
.more {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 10px 26px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .22s var(--ease);
}
.more:hover { border-color: var(--ring); transform: translateY(-1px); }
.loading, .empty { text-align: center; color: var(--faint); padding: 60px 20px; font-size: 13px; }
.spinner {
  display: inline-block; width: 22px; height: 22px; margin-right: 8px;
  border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%;
  vertical-align: -5px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 弹窗 ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6, 6, 10, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fadein .25s ease; }
[data-theme="light"] .modal-backdrop { background: rgba(30, 28, 24, .42); }
.modal-box {
  position: relative; width: min(1180px, 100%); max-height: calc(100vh - 36px);
  display: flex; flex-direction: column; overflow: hidden;
  background: color-mix(in srgb, var(--bg-soft) 94%, transparent);
  border: 1px solid var(--border-strong); border-radius: 22px;
  box-shadow: 0 40px 120px -30px rgba(0,0,0,.9);
  animation: pop .32s var(--ease);
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.965) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 13px; }
.modal-title { font: 600 17px/1.3 var(--font-display); letter-spacing: -.01em; }
.modal-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.modal-tabs { display: flex; gap: 4px; padding: 0 22px 13px; flex-wrap: wrap; }
.tabbtn {
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font-size: 12px; cursor: pointer; transition: all .2s var(--ease);
}
.tabbtn:hover { color: var(--text); border-color: var(--border-strong); }
.tabbtn.active { background: #f4f4f6; border-color: transparent; color: #0d0d10; }
[data-theme="light"] .tabbtn.active { background: #191920; color: #f4f4f6; }
.modal-body { flex: 1; min-height: 0; padding: 0 22px 22px; }
.tabpane { display: none; height: 100%; }
.tabpane.active { display: block; }
.tabpane img, .tabpane video { width: 100%; border-radius: 14px; display: block; }
.tabpane video { aspect-ratio: 16 / 9; background: #000; }
#pane-img img { min-height: 320px; object-fit: contain; background: color-mix(in srgb, var(--bg-soft) 60%, transparent); }
.frame-wrap { position: relative; height: calc(100vh - 250px); min-height: 420px; border-radius: 14px; overflow: hidden; background: #0a0a12; }
#mFrame { width: 100%; height: 100%; border: 0; }
.frame-loading {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 10px;
  background: var(--bg-soft); color: var(--muted); font-size: 12.5px; z-index: 2;
  align-content: center;
}
.frame-loading.hidden { display: none; }
.frame-actions { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 8px; z-index: 3; }
.frame-actions .btn { background: rgba(12,12,16,.7); border-color: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); }
.prompt-full {
  width: 100%; height: calc(100vh - 250px); min-height: 420px; overflow: auto; padding: 16px 18px;
  font-size: 12.5px; line-height: 1.75; color: color-mix(in srgb, var(--text) 84%, transparent);
  white-space: pre-wrap; word-break: break-word; scrollbar-width: thin;
  background: color-mix(in srgb, var(--bg-soft) 55%, transparent); border-radius: 14px; border: 1px solid var(--border);
}
.prompt-full code { font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; }

/* ============ 免责 & 页脚 ============ */
.disclaimer { max-width: 900px; margin: 10px auto 14px; padding: 0 22px; }
.disclaimer-head {
  width: 100%; text-align: left; background: var(--panel); color: var(--muted);
  border: 1px solid var(--border); border-radius: 13px; padding: 11px 16px;
  font-size: 12.5px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all .2s var(--ease);
}
.disclaimer-head:hover { color: var(--text); border-color: var(--ring); }
#discArrow { transition: transform .25s; font-size: 10px; }
.disclaimer.open #discArrow { transform: rotate(90deg); }
.disclaimer-body {
  display: none; margin-top: 8px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 13px; padding: 14px 18px; font-size: 12px; color: var(--muted); line-height: 1.8;
}
.disclaimer.open .disclaimer-body { display: block; }
.disclaimer-body p { margin: 2px 0; }
.disclaimer-body b { color: var(--text); }
.foot { text-align: center; color: var(--faint); font-size: 11.5px; padding: 10px 20px 26px; }

/* ============ Toast ============ */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: rgba(16,16,22,.94); border: 1px solid var(--border-strong); color: #fff;
  padding: 10px 20px; border-radius: 999px; font-size: 13px; font-weight: 600; z-index: 200;
  box-shadow: 0 14px 44px rgba(0,0,0,.5); transition: transform .3s var(--ease); opacity: 0;
  backdrop-filter: blur(10px); pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ============ 工具 ============ */
.hidden { display: none !important; }

/* ============ 动效降级 & 窄屏 ============ */
@media (prefers-reduced-motion: reduce) {
  .bg-blobs i, .bg-stars, .hero-bg::before, .lamp::before, .lamp::after, .hero-title, .card::before { animation: none !important; }
  .card.enter { opacity: 1; transform: none; }
  .card.enter.visible { animation: none; }
  * { transition-duration: .01s !important; }
}
@media (max-width: 720px) {
  .topbar { gap: 10px; padding: 8px 14px; }
  .sourcetabs { order: 5; width: 100%; }
  .sourcetab { flex: 1; justify-content: center; }
  .searchbox { order: 6; min-width: 100%; }
  .list { grid-template-columns: 1fr; padding: 14px 14px 6px; gap: 14px; }
  .card { contain-intrinsic-size: auto 360px; }
  .modal-box { max-height: calc(100vh - 16px); border-radius: 16px; }
  .frame-wrap, .prompt-full { height: 62vh; min-height: 340px; }
}

/* ---------- 访问量 ---------- */
.vstats{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:0 0 20px}
.vstat{font-size:12.5px;font-weight:600;color:var(--muted);background:var(--panel);border:1px solid var(--border);border-radius:999px;padding:6px 16px;letter-spacing:.02em}
.vstat b{color:var(--accent-strong, #e6cc93);margin-left:3px}
