/* ============================================================
   PrettyQuasar 的学习笔记 · 样式
   设计参考 spaceship.com：近黑底 / 电光蓝宇宙 / 超粗标题 / 胶囊按钮
   ============================================================ */

:root {
  --bg: #0a0a0f;
  --bg-soft: #0e0e15;
  --surface: #14141c;
  --surface-2: #1a1a24;
  --surface-3: #22222e;
  --border: #26263a;
  --border-soft: #1e1e2c;
  --text: #f5f5f7;
  --text-2: #a5a5b5;
  --text-3: #6e6e80;
  --blue: #2418ff;
  --blue-deep: #12087a;
  --periwinkle: #6c6cff;
  --periwinkle-bright: #8585ff;
  --mint: #3ee6b0;
  --coral: #ff5c7a;
  --violet: #9d6bff;
  --cyan: #33d6ff;
  --amber: #ffb454;
  --radius: 20px;
  --radius-lg: 28px;
  --pill: 999px;
  --header-h: 68px;
  --max-w: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "Cascadia Code", "SF Mono", Consolas, "Courier New", monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(108, 108, 255, .45); color: #fff; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

.container { width: min(var(--max-w), 92%); margin: 0 auto; }

/* ---------- 顶部公告条 ---------- */
.promo {
  background: linear-gradient(90deg, #101024, #1a1040 50%, #101024);
  border-bottom: 1px solid var(--border-soft);
  font-size: .85rem;
  text-align: center;
  padding: 9px 16px;
  color: var(--text-2);
}
.promo a { color: var(--text); font-weight: 600; }
.promo a:hover { color: var(--periwinkle-bright); }
.promo .arrow { display: inline-block; transition: transform .2s; }
.promo a:hover .arrow { transform: translateX(4px); }

/* ---------- 页头 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background .25s, border-color .25s, backdrop-filter .25s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(10, 10, 15, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border-soft);
}
.header .container {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1320px, 94%);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand svg { width: 28px; height: 28px; }
.brand .wordmark {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.brand .wordmark small {
  display: block;
  font-size: .62rem;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .28em;
  line-height: 1.1;
}

.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: var(--pill);
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav a.active { color: var(--text); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--pill);
  font-size: .92rem;
  font-weight: 700;
  padding: 11px 24px;
  transition: transform .18s, box-shadow .18s, background .18s, color .18s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--periwinkle);
  color: #fff;
  box-shadow: 0 0 0 rgba(108, 108, 255, 0);
}
.btn-primary:hover {
  background: var(--periwinkle-bright);
  box-shadow: 0 6px 28px rgba(108, 108, 255, .45);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .1);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-dark {
  background: var(--surface-3);
  color: var(--text);
}
.btn-dark:hover { background: #2c2c3a; }
.btn-lg { padding: 15px 34px; font-size: 1rem; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .08);
  color: var(--text-2);
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .14); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* 汉堡 */
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: max(640px, calc(100vh - var(--header-h) - 40px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 20px 140px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 65% at 50% 108%, rgba(36, 24, 255, .85), transparent 62%),
    radial-gradient(ellipse 55% 45% at 50% 100%, rgba(108, 108, 255, .55), transparent 60%),
    radial-gradient(ellipse 40% 30% at 82% 18%, rgba(157, 107, 255, .16), transparent 70%),
    radial-gradient(ellipse 40% 30% at 14% 26%, rgba(51, 214, 255, .1), transparent 70%),
    linear-gradient(180deg, #07070d 0%, #0a0a1c 55%, #10086a 100%);
}
.hero-stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-quasar {
  position: absolute;
  left: 50%;
  bottom: -190px;
  transform: translateX(-50%);
  width: min(1000px, 130vw);
  pointer-events: none;
  opacity: .95;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 7, 13, .55) 0%, transparent 30%, transparent 70%, rgba(10, 10, 15, .35) 100%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; width: min(860px, 100%); }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .22em;
  color: rgba(255, 255, 255, .75);
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(6px);
  padding: 7px 18px;
  border-radius: var(--pill);
  margin-bottom: 26px;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  text-wrap: balance;
  text-shadow: 0 4px 40px rgba(0, 0, 0, .45);
}
.hero h1 .grad {
  background: linear-gradient(92deg, #b9b9ff 0%, #ffffff 45%, #7df0cf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  margin: 20px auto 0;
  max-width: 620px;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: rgba(255, 255, 255, .82);
}

/* 搜索胶囊 */
.hero-search {
  margin: 38px auto 0;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(640px, 100%);
  background: rgba(14, 14, 24, .78);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
  border-radius: var(--pill);
  padding: 8px 8px 8px 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .45);
  transition: border-color .2s, box-shadow .2s;
}
.hero-search:focus-within {
  border-color: rgba(108, 108, 255, .7);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 0 0 4px rgba(108, 108, 255, .18);
}
.hero-search svg { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; }
.hero-search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  padding: 10px 4px;
}
.hero-search input::placeholder { color: var(--text-3); }

.hero-chips {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .88);
  background: rgba(14, 14, 24, .6);
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 8px 18px;
  border-radius: var(--pill);
  backdrop-filter: blur(6px);
}
.chip .ico { font-size: 1rem; }
.chip strong { color: var(--mint); font-weight: 800; }

.hero-scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, .55);
  font-size: .75rem;
  letter-spacing: .3em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.hero-scroll .line {
  width: 1px; height: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,.6), transparent);
  animation: drip 2s infinite;
}
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- 通用 section ---------- */
.section { padding: 100px 0; position: relative; }
.section-tight { padding: 72px 0; }

.section-head {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.section-head h2 .accent { color: var(--periwinkle-bright); }
.section-head .lead { color: var(--text-2); font-size: 1.02rem; }
.section-head .lead a { color: var(--periwinkle-bright); font-weight: 600; }
.section-head .lead a:hover { text-decoration: underline; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--periwinkle-bright);
  margin-bottom: 14px;
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--periwinkle); border-radius: 2px; }

/* ---------- 特性卡片（为什么写笔记） ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  position: relative;
  overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.feature:hover { transform: translateY(-5px); border-color: var(--border); }
.feature .orb {
  width: 54px; height: 54px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 22px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  box-shadow: 0 0 30px color-mix(in srgb, var(--c) 25%, transparent);
}
.feature h3 { font-size: 1.22rem; font-weight: 800; margin-bottom: 10px; }
.feature p { color: var(--text-2); font-size: .94rem; }
.feature::after {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%);
  pointer-events: none;
}

/* ---------- 笔记卡片 ---------- */
.notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.segmented {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--pill);
  padding: 4px;
}
.segmented button {
  border: none;
  background: none;
  color: var(--text-2);
  font-size: .88rem;
  font-weight: 700;
  padding: 8px 22px;
  border-radius: var(--pill);
  transition: background .2s, color .2s;
}
.segmented button.active { background: var(--text); color: #0a0a0f; }
.segmented button:not(.active):hover { color: var(--text); }

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.note-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  position: relative;
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.note-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--c) 55%, var(--border));
  box-shadow: 0 16px 44px rgba(0, 0, 0, .5), 0 0 0 1px color-mix(in srgb, var(--c) 20%, transparent);
}
.note-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c), transparent 80%);
  opacity: .9;
}
.note-card .glow {
  position: absolute;
  top: -70px; right: -70px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%);
  pointer-events: none;
  transition: opacity .25s;
}
.note-card .top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .76rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--c) 80%, #fff);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  padding: 4px 12px;
  border-radius: var(--pill);
}
.note-card h3 {
  font-size: 1.14rem;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-card:hover h3 { color: var(--periwinkle-bright); }
.note-card .excerpt {
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.note-card .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  font-size: .78rem;
  color: var(--text-3);
}
.note-card .meta .views { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.note-card .meta svg { width: 13px; height: 13px; }

.notes-more { text-align: center; margin-top: 44px; }

/* ---------- 分类星图 ---------- */
.cats-section {
  background:
    radial-gradient(ellipse 60% 50% at 85% 0%, rgba(36, 24, 255, .14), transparent 65%),
    radial-gradient(ellipse 50% 40% at 8% 100%, rgba(62, 230, 176, .06), transparent 65%),
    var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.cats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: transform .22s, border-color .22s, background .22s;
  position: relative;
  overflow: hidden;
}
.cat-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 50%, var(--border));
  background: var(--surface-2);
}
.cat-card .icon {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem;
  background: color-mix(in srgb, var(--c) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.cat-card .info { flex: 1; min-width: 0; }
.cat-card h3 { font-size: 1.05rem; font-weight: 800; }
.cat-card p {
  font-size: .8rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-card .count {
  font-size: .8rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--c) 85%, #fff);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  padding: 5px 13px;
  border-radius: var(--pill);
  flex-shrink: 0;
}
.cat-card .go {
  position: absolute;
  right: 22px; bottom: 14px;
  font-size: .72rem;
  color: var(--text-3);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s, transform .2s;
}
.cat-card:hover .go { opacity: 1; transform: none; }

/* ---------- 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 60px;
  align-items: center;
}
.about-visual {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 45%, rgba(108, 108, 255, .35), transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(62, 230, 176, .18), transparent 50%),
    var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.about-visual svg { width: 78%; }
.about-body h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 18px;
}
.about-body p { color: var(--text-2); margin-bottom: 14px; }
.about-body p strong { color: var(--text); }
.about-stats {
  display: flex;
  gap: 40px;
  margin: 28px 0 30px;
  flex-wrap: wrap;
}
.about-stats .stat .num {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--periwinkle-bright), var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
}
.about-stats .stat .label { font-size: .8rem; color: var(--text-3); letter-spacing: .08em; }
.about-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  padding: 24px 4px;
  transition: color .2s;
}
.faq-q:hover { color: var(--periwinkle-bright); }
.faq-q .chev { flex-shrink: 0; width: 20px; height: 20px; color: var(--text-3); transition: transform .3s; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.faq-a-inner { padding: 0 4px 24px; color: var(--text-2); font-size: .95rem; }
.faq-a-inner a { color: var(--periwinkle-bright); }

/* ---------- CTA ---------- */
.cta-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 70px 40px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 90% at 50% 120%, rgba(36, 24, 255, .9), transparent 65%),
    radial-gradient(ellipse 45% 55% at 80% -10%, rgba(157, 107, 255, .35), transparent 65%),
    radial-gradient(ellipse 45% 55% at 15% -10%, rgba(51, 214, 255, .22), transparent 65%),
    #0c0c1e;
  border: 1px solid rgba(108, 108, 255, .35);
}
.cta-card h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.cta-card p { color: rgba(255, 255, 255, .75); max-width: 520px; margin: 0 auto 32px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-card .btn-ghost { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); }

/* ---------- 页脚 ---------- */
.footer {
  background: #0c0c12;
  border-top: 1px solid var(--border-soft);
  padding: 70px 0 36px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-soft);
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { color: var(--text-3); font-size: .88rem; max-width: 280px; }
.footer-col h4 { font-size: .95rem; font-weight: 800; margin-bottom: 18px; }
.footer-col ul { list-style: none; display: grid; gap: 11px; }
.footer-col a { color: var(--text-2); font-size: .88rem; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 30px;
  font-size: .8rem;
  color: var(--text-3);
}
.footer-bottom .links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-bottom a { color: var(--text-3); transition: color .2s; }
.footer-bottom a:hover { color: var(--text-2); }
.footer-social { display: flex; gap: 10px; }
.footer-social .icon-btn { width: 36px; height: 36px; background: var(--surface-2); border-color: var(--border-soft); }

/* ---------- 笔记列表页 ---------- */
.page-hero {
  position: relative;
  padding: 80px 0 56px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 50% 130%, rgba(36, 24, 255, .5), transparent 62%),
    radial-gradient(ellipse 40% 50% at 90% -20%, rgba(157, 107, 255, .14), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
.page-hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -.02em;
}
.page-hero .sub { color: var(--text-2); margin-top: 12px; max-width: 640px; }
.page-hero .container { position: relative; z-index: 1; }

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 36px 0 34px;
}
.filter-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 6px 8px 6px 20px;
  max-width: 560px;
  transition: border-color .2s, box-shadow .2s;
}
.filter-search:focus-within {
  border-color: rgba(108, 108, 255, .6);
  box-shadow: 0 0 0 4px rgba(108, 108, 255, .14);
}
.filter-search svg { width: 17px; height: 17px; color: var(--text-3); flex-shrink: 0; }
.filter-search input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  color: var(--text); font-size: .95rem; padding: 9px 2px;
}
.filter-search input::placeholder { color: var(--text-3); }
.filter-search .clear {
  border: none; background: var(--surface-3); color: var(--text-2);
  width: 30px; height: 30px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  font-size: .8rem;
}
.filter-search.has-value .clear { display: inline-flex; }

.filter-cats { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-cat {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: .84rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--pill);
  transition: all .2s;
}
.filter-cat:hover { color: var(--text); border-color: var(--text-3); }
.filter-cat.active {
  background: var(--text);
  color: #0a0a0f;
  border-color: var(--text);
}
.filter-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.result-count { font-size: .85rem; color: var(--text-3); }
.result-count strong { color: var(--text); }

.empty-state {
  text-align: center;
  padding: 90px 20px;
  color: var(--text-2);
}
.empty-state .big { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.3rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }

/* ---------- 阅读页 ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--periwinkle), var(--mint));
  z-index: 200;
  transition: width .1s linear;
}
.reader { max-width: 780px; margin: 0 auto; padding: 64px 0 40px; }
.reader-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 34px;
  transition: color .2s;
}
.reader-back:hover { color: var(--periwinkle-bright); }
.reader-back svg { width: 16px; height: 16px; }
.reader-head { margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border-soft); }
.reader-head h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.35;
  margin: 18px 0 20px;
}
.reader-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--text-3); font-size: .85rem; }
.reader-meta .item { display: inline-flex; align-items: center; gap: 6px; }
.reader-meta svg { width: 14px; height: 14px; }
.reader-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.tag {
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: 4px 13px;
  border-radius: var(--pill);
}

.article { font-size: 1.02rem; color: #d6d6e0; }
.article p { margin-bottom: 1.2em; }
.article h2 {
  font-size: 1.42rem;
  font-weight: 800;
  color: var(--text);
  margin: 2em 0 .8em;
  padding-left: 14px;
  border-left: 4px solid var(--periwinkle);
  line-height: 1.4;
}
.article h3 { font-size: 1.15rem; font-weight: 800; color: var(--text); margin: 1.6em 0 .6em; }
.article ul, .article ol { margin: 0 0 1.2em 1.4em; }
.article li { margin-bottom: .5em; }
.article strong { color: var(--text); }
.article em { color: var(--periwinkle-bright); font-style: normal; }
.article a { color: var(--periwinkle-bright); text-decoration: underline; text-underline-offset: 3px; }
.article blockquote {
  margin: 1.6em 0;
  padding: 18px 24px;
  background: linear-gradient(90deg, rgba(108, 108, 255, .1), transparent);
  border-left: 3px solid var(--mint);
  border-radius: 0 14px 14px 0;
  color: var(--text-2);
}
.article code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: 2px 7px;
  border-radius: 7px;
  color: var(--mint);
}
.article pre {
  background: #0d0d16;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  overflow-x: auto;
  margin: 1.4em 0;
  position: relative;
}
.article pre::before {
  content: "";
  position: absolute;
  top: 14px; left: 18px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 18px 0 0 #febc2e, 36px 0 0 #28c840;
  opacity: .8;
}
.article pre code {
  background: none;
  border: none;
  padding: 0;
  color: #c8d3f5;
  font-size: .86rem;
  line-height: 1.75;
  display: block;
  padding-top: 14px;
}

.reader-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border-soft);
}
.reader-nav a {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 18px 22px;
  transition: border-color .2s, transform .2s;
}
.reader-nav a:hover { border-color: var(--periwinkle); transform: translateY(-2px); }
.reader-nav .dir { font-size: .74rem; color: var(--text-3); letter-spacing: .1em; margin-bottom: 6px; }
.reader-nav .t { font-size: .92rem; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reader-nav a.next { text-align: right; }
.reader-nav .placeholder { visibility: hidden; }

.related { margin-top: 64px; }
.related h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 24px; }

/* ---------- 返回顶部 / Toast ---------- */
.to-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(20, 20, 28, .9);
  backdrop-filter: blur(8px);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s, color .2s;
  z-index: 90;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: var(--text); border-color: var(--periwinkle); }
.to-top svg { width: 18px; height: 18px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--pill);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ok { color: var(--mint); }

/* ---------- 滚动显现 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }

/* ---------- 移动端菜单 ---------- */
.mobile-panel {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: rgba(12, 12, 18, .97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 20px 5%;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 99;
}
.mobile-panel.open { display: flex; }
.mobile-panel a {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-2);
  padding: 13px 10px;
  border-radius: 12px;
}
.mobile-panel a:hover, .mobile-panel a.active { color: var(--text); background: rgba(255, 255, 255, .05); }
.mobile-panel .btn { margin-top: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .features, .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { max-width: 380px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav, .header-actions .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .section-head { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .section { padding: 72px 0; }
  .hero { padding: 70px 18px 120px; }
}

@media (max-width: 620px) {
  .features, .cats-grid { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr; }
  .reader-nav { grid-template-columns: 1fr; }
  .reader-nav .placeholder { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .about-stats { gap: 26px; }
  .hero-search { padding-left: 16px; }
  .hero-search .btn { padding: 10px 18px; }
  .cta-card { padding: 54px 24px; }
}

/* ---------- 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
