/* ============================================================
   资源站设计系统 v1
   深色为主，支持浅色切换
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg:            #08080c;
  --bg-soft:       #0d0d13;
  --surface:       #13131b;
  --surface-2:     #1a1a24;
  --surface-3:     #22222e;
  --line:          rgba(255,255,255,.07);
  --line-strong:   rgba(255,255,255,.14);
  --text:          #f2f2f7;
  --text-2:        #a3a3b2;
  --text-3:        #6b6b7c;
  --brand:         #6b5cff;
  --brand-soft:    rgba(107,92,255,.14);
  --brand-2:       #00d4c8;
  --brand-grad:    linear-gradient(135deg,#6b5cff 0%,#4b8bff 50%,#00c2ff 100%);
  --hot:           #ff4d6d;
  --ok:            #2ee6a8;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.4);
  --shadow-md:     0 8px 24px -8px rgba(0,0,0,.6);
  --shadow-lg:     0 24px 64px -16px rgba(0,0,0,.72);

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --ease:  cubic-bezier(.22,1,.36,1);
  --t-fast: 180ms;
  --t-mid:  320ms;

  --nav-h: 72px;
  --container: 1280px;
}

[data-theme="light"] {
  --bg:          #ffffff;
  --bg-soft:     #f7f7fa;
  --surface:     #ffffff;
  --surface-2:   #f4f4f8;
  --surface-3:   #ececf2;
  --line:        rgba(10,10,20,.08);
  --line-strong: rgba(10,10,20,.16);
  --text:        #101018;
  --text-2:      #55556a;
  --text-3:      #8a8a9e;
  --brand-soft:  rgba(107,92,255,.09);
  --shadow-md:   0 8px 24px -8px rgba(20,20,50,.12);
  --shadow-lg:   0 24px 64px -16px rgba(20,20,50,.18);
}

[data-theme="light"] .card,
[data-theme="light"] .cat,
[data-theme="light"] .panel,
[data-theme="light"] .stats,
[data-theme="light"] .stat { box-shadow: 0 1px 3px rgba(20,20,50,.05); }
[data-theme="light"] .card:hover,
[data-theme="light"] .cat:hover { box-shadow: 0 12px 32px -12px rgba(20,20,50,.18); }
[data-theme="light"] .cat__name { color: var(--text); }
[data-theme="light"] .cat__count { color: var(--text-2); }
[data-theme="light"] .hero__grid { opacity: .35; }

/* hidden 必须能压过各种 display 设定，否则出现双态同时显示 */
[hidden] { display: none !important; }

/* ---------- reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--t-mid) var(--ease), color var(--t-mid) var(--ease);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; }
h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
p { margin: 0; }
::selection { background: var(--brand); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong); border-radius: 99px;
  border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 40px;
}
.section-head h2 { font-size: 32px; }
.section-head .eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 12px; display: block;
}
.section-head p { color: var(--text-2); font-size: 15px; margin-top: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  will-change: transform;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--brand-grad); color: #fff; box-shadow: 0 4px 16px -4px rgba(107,92,255,.5); }
.btn--primary:hover { box-shadow: 0 8px 28px -6px rgba(107,92,255,.7); transform: translateY(-1px); }
.btn--ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); }
.btn--ghost:hover { background: var(--surface-3); border-color: var(--text-3); }
.btn--quiet { color: var(--text-2); padding: 0 14px; }
.btn--quiet:hover { color: var(--text); background: var(--surface-2); }
.btn--lg { height: 52px; padding: 0 30px; font-size: 15px; border-radius: var(--r-md); }
.btn--block { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h); display: flex; align-items: center;
  transition: height var(--t-mid) var(--ease), background var(--t-mid) var(--ease),
              border-color var(--t-mid) var(--ease), backdrop-filter var(--t-mid) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  height: 60px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 40px; width: 100%; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; flex: none; white-space: nowrap; }
.logo__mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--brand-grad);
  display: grid; place-items: center; flex: none;
  box-shadow: 0 4px 12px -2px rgba(107,92,255,.6);
}
.logo__mark svg { width: 17px; height: 17px; }
.nav__menu { display: flex; gap: 4px; margin-left: 8px; }
.nav__link {
  padding: 8px 14px; border-radius: var(--r-xs); font-size: 14px; color: var(--text-2);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--surface-2); }
.nav__link.is-active { color: var(--text); }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-xs); display: grid; place-items: center;
  color: var(--text-2); transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: calc(var(--nav-h) + 104px) 0 96px; overflow: hidden; }
.hero__glow { position: absolute; pointer-events: none; border-radius: 50%; filter: blur(110px); }
.hero__glow--a { width: 620px; height: 420px; top: -140px; left: 4%; background: rgba(107,92,255,.32); }
.hero__glow--b { width: 520px; height: 380px; top: -60px; right: 0; background: rgba(0,194,255,.2); }
.hero__grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 30%, transparent 75%);
}
.hero__inner { position: relative; text-align: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px;
  border-radius: 99px; background: var(--brand-soft); border: 1px solid rgba(107,92,255,.28);
  font-size: 13px; color: var(--text); margin-bottom: 28px;
}
.hero__badge b { font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.hero__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(46,230,168,.18); }
.hero h1 { font-size: 56px; line-height: 1.16; letter-spacing: -.035em; margin-bottom: 22px; }
.hero h1 em { font-style: normal; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { font-size: 16px; color: var(--text-2); max-width: 560px; margin: 0 auto 40px; line-height: 1.7; }

/* search */
.search-wrap { position: relative; max-width: 600px; margin: 0 auto; z-index: 30; }
.search {
  position: relative; display: flex; align-items: center; gap: 8px;
  width: 100%;
  height: 60px; padding: 0 8px 0 20px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow-md);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search:focus-within {
  border-color: rgba(107,92,255,.6);
  box-shadow: 0 0 0 4px rgba(107,92,255,.12), var(--shadow-md);
}
.search svg { width: 20px; height: 20px; color: var(--text-3); flex: none; }
.search input {
  flex: 1; height: 100%; border: 0; background: none; outline: none;
  color: var(--text); font-size: 15px; min-width: 0;
}
.search input::placeholder { color: var(--text-3); }
.search kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
  padding: 3px 7px; border-radius: 5px; background: var(--surface-3);
  color: var(--text-3); border: 1px solid var(--line); margin-right: 6px;
}
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 24px; }

/* 搜索联想 */
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 50;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 8px; text-align: left; overflow: hidden;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.suggest.is-on { opacity: 1; transform: none; pointer-events: auto; }
.suggest__item {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px;
  transition: background var(--t-fast) var(--ease);
}
.suggest__item:hover { background: var(--surface-2); }
.suggest__item img { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; flex: none; background: var(--surface-3); }
.suggest__t {
  font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text);
}
.suggest__c { font-size: 11px; color: var(--text-3); flex: none; padding: 2px 7px; border-radius: 5px; background: var(--surface-2); }
.tag-pill {
  height: 32px; padding: 0 14px; display: inline-flex; align-items: center;
  border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; color: var(--text-2);
  transition: all var(--t-fast) var(--ease);
}
.tag-pill:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.tag-pill__n {
  font-size: 11px; color: var(--text-3); margin-left: 7px;
  font-variant-numeric: tabular-nums; opacity: .8;
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.stat { background: var(--surface); padding: 32px 28px; }
.stat__num {
  font-size: 38px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { font-size: 13px; color: var(--text-3); margin-top: 8px; }

/* ---------- category tiles ---------- */
.cats { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.cat {
  position: relative; display: block; padding: 28px; min-height: 208px;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--surface); overflow: hidden;
  transition: transform var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}
.cat::after {
  content: ''; position: absolute; z-index: 0; inset: -40% -20% auto auto; width: 240px; height: 240px;
  border-radius: 50%; filter: blur(50px); opacity: .35;
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.cat__en, .cat__name, .cat__count, .cat__arrow { z-index: 1; }
.cat--violet::after { background: #6b5cff; }
.cat--cyan::after   { background: #00c2ff; }
.cat--amber::after  { background: #ffb020; }
.cat--rose::after   { background: #ff4d6d; }
.cat:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.cat:hover::after { opacity: .6; transform: scale(1.15) translate(-10px, 10px); }
.cat__en { position: relative; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); }
.cat__name { position: relative; font-size: 26px; font-weight: 600; margin-top: 10px; letter-spacing: -.02em; }
.cat__count { position: relative; font-size: 13px; color: var(--text-2); margin-top: 6px; font-variant-numeric: tabular-nums; }
.cat__arrow {
  position: absolute; left: 28px; bottom: 28px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line);
  color: var(--text-2); transition: all var(--t-fast) var(--ease);
}
.cat:hover .cat__arrow { background: var(--text); color: var(--bg); border-color: var(--text); }
.cat__arrow svg { width: 15px; height: 15px; }

/* ---------- rail (draggable) ---------- */
.rail-wrap { position: relative; }
.rail {
  display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none;
  padding: 4px 0 8px; cursor: grab;
  -ms-overflow-style: none;
  scroll-behavior: auto;
}
.rail::-webkit-scrollbar { display: none; }
.rail.is-dragging { cursor: grabbing; }
.rail.is-dragging a { pointer-events: none; }
.rail > * { flex: 0 0 320px; }
.rail-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  border: 1px solid var(--line-strong); color: var(--text);
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.rail-wrap:hover .rail-btn:not([disabled]) { opacity: 1; pointer-events: auto; }
.rail-btn:hover { transform: translateY(-50%) scale(1.08); }
.rail-btn[disabled] { opacity: 0 !important; pointer-events: none; }
.rail-btn--prev { left: -22px; }
.rail-btn--next { right: -22px; }
.rail-btn svg { width: 18px; height: 18px; }

/* ---------- card ---------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease),
              box-shadow var(--t-mid) var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.card__media {
  position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2);
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 500ms var(--ease), opacity var(--t-mid) var(--ease);
  opacity: 0;
}
.card__media img.is-loaded { opacity: 1; }
.card:hover .card__media img { transform: scale(1.05); }
.card__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,12,.6) 0%, transparent 42%);
  pointer-events: none;
}
.card__badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; z-index: 2; }
.badge {
  height: 24px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px;
  border-radius: 6px; font-size: 11px; font-weight: 500; letter-spacing: .02em;
  background: rgba(8,8,12,.66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #f2f2f7; border: 1px solid rgba(255,255,255,.12);
}
.badge svg { width: 11px; height: 11px; }
.badge--hot { background: rgba(255,77,109,.9); border-color: transparent; }
.badge--push { margin-left: auto; }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title {
  font-size: 15px; font-weight: 500; line-height: 1.45; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 44px;
}
.card__meta {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3);
  margin-top: auto; font-variant-numeric: tabular-nums;
}
.card__meta i { font-style: normal; opacity: .5; }
.card__lock {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(8,8,12,.66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12); color: #f2f2f7;
}
.card__lock svg { width: 13px; height: 13px; }

/* ---------- grid ---------- */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(4,1fr); }

/* ---------- filter bar ---------- */
.toolbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  position: sticky; top: 68px; z-index: 40;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.toolbar__count { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.toolbar__count b { color: var(--text); font-weight: 600; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: var(--r-sm); }
.seg button {
  height: 32px; padding: 0 14px; border-radius: 8px; font-size: 13px; color: var(--text-2);
  transition: all var(--t-fast) var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 500; }
.spacer { margin-left: auto; }

/* ---------- range slider ---------- */
.range { width: 100%; }
.range__head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-2); margin-bottom: 14px;
}
.range__head b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.range__track {
  position: relative; height: 4px; border-radius: 99px; background: var(--surface-3);
  margin: 10px 8px 18px;
}
.range__fill { position: absolute; height: 100%; border-radius: 99px; background: var(--brand-grad); }
.range__knob {
  position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border-radius: 50%; background: #fff; border: 3px solid var(--brand);
  box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: grab; z-index: 2;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  touch-action: none;
}
.range__knob::after { content: ''; position: absolute; inset: -14px; }
.range__knob:hover, .range__knob.is-drag { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(107,92,255,.18); }
.range__knob:active { cursor: grabbing; }

/* ---------- sidebar / layout ---------- */
.page { padding-top: calc(var(--nav-h) + 40px); }
.layout { display: grid; grid-template-columns: 248px 1fr; gap: 32px; align-items: start; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px;
  position: sticky; top: 76px;
}
.panel + .panel { margin-top: 16px; }
.panel h4 { font-size: 13px; color: var(--text-3); font-weight: 500; letter-spacing: .04em; margin-bottom: 16px; }
.check-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.check-list label {
  display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px;
  font-size: 14px; color: var(--text-2); cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.check-list label:hover { background: var(--surface-2); color: var(--text); }
.check-list input { appearance: none; width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--line-strong); background: transparent; flex: none; position: relative; transition: all var(--t-fast) var(--ease); }
.check-list input:checked { background: var(--brand); border-color: var(--brand); }
.check-list input:checked::after {
  content: ''; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg);
}
.check-list .num { margin-left: auto; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- breadcrumb ---------- */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); margin-bottom: 20px; }
.crumb a:hover { color: var(--text); }
.crumb i { font-style: normal; opacity: .45; }

.page-head { margin-bottom: 32px; }
.page-head h1 { font-size: 34px; letter-spacing: -.03em; }
.page-head p { font-size: 14px; color: var(--text-2); margin-top: 10px; }

/* ---------- detail ---------- */
.detail { display: grid; grid-template-columns: 1fr 372px; gap: 48px; align-items: start; }
.detail__head h1 { font-size: 34px; line-height: 1.3; letter-spacing: -.025em; margin-bottom: 18px; }
.detail__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--text-3); font-size: 13px; margin-bottom: 28px; }
.detail__meta span { display: inline-flex; align-items: center; gap: 6px; }
.detail__meta svg { width: 14px; height: 14px; }
.detail__cover {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  background: var(--surface-2); margin-bottom: 36px; aspect-ratio: 16/9;
}
.detail__cover img { width: 100%; height: 100%; object-fit: cover; }
.prose { font-size: 15.5px; line-height: 1.9; color: var(--text-2); word-break: break-word; }
.prose p { margin: 0 0 14px; }
.prose h3 {
  font-size: 16px; color: var(--text); font-weight: 600; margin: 30px 0 14px;
  padding-left: 12px; position: relative; line-height: 1.5;
}
.prose h3::before {
  content: ''; position: absolute; left: 0; top: .42em; width: 3px; height: 1em;
  border-radius: 2px; background: var(--brand-grad);
}
.prose h3:first-child { margin-top: 0; }
.prose strong { color: var(--text); font-weight: 500; }

.gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 40px; }
.gallery__item {
  position: relative; aspect-ratio: 16/10; border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2); cursor: zoom-in;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.gallery__item:hover img { transform: scale(1.06); }

/* ---------- video ---------- */
.video-box {
  position: relative; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: #000; cursor: pointer;
}
.video-box__poster { position: absolute; inset: 0; }
.video-box__poster img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.video-box__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.32);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.video-box__play svg { width: 26px; height: 26px; margin-left: 3px; }
.video-box:hover .video-box__play { transform: translate(-50%,-50%) scale(1.08); background: var(--brand); }

/* ---------- unlock card ---------- */
.unlock { position: sticky; top: 76px; }
.unlock__card {
  border-radius: var(--r-lg); border: 1px dashed var(--line-strong);
  background: var(--surface); padding: 28px; text-align: center;
  transition: border-color var(--t-mid) var(--ease);
}
.unlock__card:hover { border-color: rgba(107,92,255,.4); }
.unlock__icon {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 16px;
  display: grid; place-items: center; background: var(--brand-soft);
  border: 1px solid rgba(107,92,255,.24); color: var(--brand);
}
.unlock__icon svg { width: 24px; height: 24px; }
.unlock__card h3 { font-size: 17px; margin-bottom: 8px; }
.unlock__card > p { font-size: 13.5px; color: var(--text-3); line-height: 1.7; margin-bottom: 22px; }
.unlock__actions { display: flex; flex-direction: column; gap: 10px; }
.unlock__price { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin-bottom: 20px; }
.unlock__price b { font-size: 30px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.unlock__price span { font-size: 13px; color: var(--text-3); }
.unlock__proof {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-3);
}
.unlock__proof svg { width: 13px; height: 13px; color: var(--ok); }

.unlock__card.is-open { border-style: solid; border-color: rgba(46,230,168,.32); background: color-mix(in srgb, var(--ok) 4%, var(--surface)); }
.unlock__card.is-open .unlock__icon { background: rgba(46,230,168,.12); border-color: rgba(46,230,168,.3); color: var(--ok); }
.pan-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  margin-bottom: 10px; text-align: left;
}
.pan-row__label { font-size: 11px; color: var(--text-3); display: block; margin-bottom: 2px; }
.pan-row__val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
}
.copy-btn {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: var(--surface-3); color: var(--text-2); transition: all var(--t-fast) var(--ease);
}
.copy-btn:hover { background: var(--brand); color: #fff; }
.copy-btn svg { width: 14px; height: 14px; }

/* ---------- detail CTA ---------- */
.cta {
  position: relative; margin-top: 56px; border-radius: var(--r-xl); padding: 1.5px;
  background: linear-gradient(120deg, rgba(107,92,255,.55) 0%, rgba(0,194,255,.28) 38%, rgba(255,255,255,.05) 72%);
  overflow: hidden;
}
.cta__inner {
  position: relative; border-radius: calc(var(--r-xl) - 2px);
  background: var(--surface); padding: 38px 42px; overflow: hidden;
}
.cta__glow {
  position: absolute; width: 540px; height: 540px; left: -140px; top: -300px;
  border-radius: 50%; background: rgba(107,92,255,.3); filter: blur(110px);
  pointer-events: none;
}
.cta__locked { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.cta__copy { min-width: 0; }
.cta__eyebrow {
  display: inline-block; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 12px; font-weight: 500;
}
.cta__copy h2 { font-size: 24px; letter-spacing: -.025em; margin-bottom: 18px; max-width: 420px; }
.cta__points { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin: 0; padding: 0; }
.cta__points li {
  display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2);
}
.cta__points svg { width: 14px; height: 14px; color: var(--ok); flex: none; }
.cta__action { display: flex; flex-direction: column; gap: 10px; flex: none; width: 260px; }
.cta__action .btn { width: 100%; }
.cta__hint {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; color: var(--text-3); margin-top: 4px;
}
.cta__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(46,230,168,.16); }

.cta__done { position: relative; display: flex; align-items: center; gap: 20px; }
.cta__done-icon {
  width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: rgba(46,230,168,.12); border: 1px solid rgba(46,230,168,.3); color: var(--ok);
}
.cta__done-icon svg { width: 22px; height: 22px; }
.cta__done h2 { font-size: 19px; margin-bottom: 4px; }
.cta__done p { font-size: 13.5px; color: var(--text-3); }
.cta__done .btn { margin-left: auto; flex: none; }
.cta.is-done { background: linear-gradient(120deg, rgba(46,230,168,.4) 0%, rgba(46,230,168,.1) 45%, rgba(255,255,255,.04) 75%); }
.cta.is-done .cta__glow { background: rgba(46,230,168,.16); }

/* ---------- member perks ---------- */
.perks { margin-top: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); padding: 22px; }
.perks h4 { font-size: 13px; color: var(--text-3); margin-bottom: 14px; font-weight: 500; }
.perk { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-2); padding: 7px 0; }
.perk svg { width: 15px; height: 15px; color: var(--brand); flex: none; margin-top: 3px; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  background: rgba(4,4,8,.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity var(--t-mid) var(--ease);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__box {
  width: 100%; max-width: 880px; max-height: 90vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 36px;
  transform: translateY(16px) scale(.98); transition: transform var(--t-mid) var(--ease);
}
.modal.is-open .modal__box { transform: none; }
.modal__head { text-align: center; margin-bottom: 28px; position: relative; }
.modal__head h3 { font-size: 24px; margin-bottom: 8px; }
.modal__head p { font-size: 14px; color: var(--text-2); }
.modal__close {
  position: absolute; top: -12px; right: -12px; width: 36px; height: 36px;
  border-radius: 50%; display: grid; place-items: center; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text-2);
}
.modal__close:hover { color: var(--text); background: var(--surface-3); }
.plans { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.plan {
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg-soft);
  padding: 24px; position: relative; cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.plan:hover { border-color: var(--line-strong); }
.plan.is-on { border-color: var(--brand); background: var(--brand-soft); }
.plan__flag {
  position: absolute; top: -10px; right: 16px; height: 22px; padding: 0 10px;
  display: inline-flex; align-items: center; border-radius: 99px;
  background: var(--brand-grad); color: #fff; font-size: 11px; font-weight: 500;
}
.plan__name { font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.plan__price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.plan__price b { font-size: 34px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan__price small { font-size: 15px; font-weight: 500; }
.plan__price span { font-size: 13px; color: var(--text-3); }
.plan__note { font-size: 12px; color: var(--text-3); margin-bottom: 16px; }
.plan__list { display: flex; flex-direction: column; gap: 8px; }
.plan__list li { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-2); list-style: none; line-height: 1.5; }
.plan__list svg { width: 14px; height: 14px; color: var(--ok); flex: none; margin-top: 3px; }
.modal__foot { margin-top: 24px; }
.modal__fine { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 14px; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(4,4,8,.94);
  display: grid; place-items: center; opacity: 0; pointer-events: none;
  transition: opacity var(--t-mid) var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(92vw,1400px); max-height: 88vh; border-radius: var(--r-md); object-fit: contain; }
.lightbox__close { position: absolute; top: 24px; right: 24px; width: 44px; height: 44px;
  border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1);
  color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox__close:hover { background: rgba(255,255,255,.2); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1);
  color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox__nav:hover { background: rgba(255,255,255,.2); }
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }
.lightbox__count { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-size: 13px; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 40px; margin-top: 96px; }
.footer__top { display: grid; grid-template-columns: 1.6fr repeat(3,1fr); gap: 48px; margin-bottom: 48px; }
.footer__brand p { font-size: 13.5px; color: var(--text-3); line-height: 1.8; margin-top: 14px; max-width: 280px; }
.footer h5 { font-size: 13px; color: var(--text); font-weight: 500; margin: 0 0 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: 13.5px; color: var(--text-3); transition: color var(--t-fast) var(--ease); }
.footer ul a:hover { color: var(--text); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding-top: 28px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-3);
}

/* ---------- mobile tabbar ---------- */
.tabbar { display: none; }

/* ---------- skeleton / reveal ---------- */
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.reveal { transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
html.js .reveal { opacity: 0; transform: translateY(18px); }
html.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(3,1fr); }
  .detail { grid-template-columns: 1fr 320px; gap: 32px; }
}
@media (max-width: 980px) {
  .container { padding: 0 20px; }
  .hero h1 { font-size: 40px; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .cats { grid-template-columns: repeat(2,1fr); }
  .layout { grid-template-columns: 1fr; }
  .panel { position: static; }
  .detail { grid-template-columns: 1fr; }
  .unlock { position: static; }
  .cta__locked { flex-direction: column; align-items: stretch; gap: 28px; }
  .cta__action { width: 100%; }
  .cta__copy h2 { max-width: none; }
  .cta__done { flex-wrap: wrap; }
  .cta__done .btn { margin-left: 0; width: 100%; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .nav__menu { display: none; }
  .nav__inner { gap: 16px; }
  .toolbar { position: static; }
}
@media (max-width: 720px) {
  .hero { padding-top: calc(var(--nav-h) + 64px); }
  .hero h1 { font-size: 32px; }
  .hero__sub { font-size: 14.5px; }
  .section { padding: 64px 0; }
  .section-head h2 { font-size: 24px; }
  .grid { grid-template-columns: repeat(2,1fr); gap: 16px; }
  .cats { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2,1fr); }
  .plans { grid-template-columns: 1fr; }
  .modal__box { padding: 24px; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .detail__head h1 { font-size: 24px; }
  .rail > * { flex-basis: 264px; }
  .cta__inner { padding: 26px 22px; }
  .cta__copy h2 { font-size: 19px; }
  .cta__points { flex-direction: column; gap: 10px; }
  .search kbd { display: none; }
  .search { height: 54px; padding-left: 16px; }
  .nav__right { gap: 6px; }
  .nav__right .btn--ghost { display: none; }
  .nav__right .btn { padding: 0 14px; height: 38px; font-size: 13px; }
  .logo { font-size: 15px; }
  .logo__mark { width: 28px; height: 28px; }
  .logo__mark svg { width: 15px; height: 15px; }
  .icon-btn { width: 36px; height: 36px; }

  /* 移动端底部导航 */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    height: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid var(--line);
  }
  .tabbar__item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 10.5px; color: var(--text-3);
    transition: color var(--t-fast) var(--ease);
  }
  .tabbar__item svg { width: 21px; height: 21px; }
  .tabbar__item.is-active { color: var(--brand); }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: 24px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 22px 18px; }
  .stat__num { font-size: 28px; }
}
