/* ============================================================
   LCode (lcode.cn) 官方网站主样式表
   设计语言：明暗双主题 / 渐变品牌色 / 玻璃拟态 / 卡片网格
   ============================================================ */

/* ---------- 设计令牌：亮色主题（默认） ---------- */
:root {
  /* 品牌色系 */
  --brand: #4653e8;
  --brand-deep: #3644cc;
  --brand-soft: rgba(70, 83, 232, .09);
  --accent: #06b6d4;
  --grad: linear-gradient(135deg, #4653e8 0%, #7c5cf0 55%, #06b6d4 100%);
  --grad-text: linear-gradient(120deg, #4653e8, #7c5cf0 50%, #06b6d4);

  /* 背景与表面 */
  --bg: #f6f7fb;
  --bg-grid: rgba(70, 83, 232, .05);
  --surface: #ffffff;
  --surface-2: #f1f3fa;
  --surface-3: #e9ecf6;

  /* 文字 */
  --text: #171d33;
  --text-2: #556079;
  --text-3: #97a0b6;

  /* 边框与阴影 */
  --border: #e3e6f0;
  --border-strong: #ccd2e3;
  --shadow-sm: 0 1px 3px rgba(23, 29, 51, .06);
  --shadow-md: 0 8px 24px rgba(23, 29, 51, .09);
  --shadow-lg: 0 18px 48px rgba(23, 29, 51, .14);

  /* 语义色 */
  --ok: #16a34a;
  --ok-bg: #e9f9ef;
  --err: #dc2626;
  --err-bg: #fdeeee;

  /* 代码块配色 */
  --code-bg: #101528;
  --code-text: #d6dcf5;

  /* 圆角与动效 */
  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 暗色主题 ---------- */
[data-theme="dark"] {
  --bg: #0a0e1b;
  --bg-grid: rgba(112, 128, 255, .06);
  --surface: #111730;
  --surface-2: #171e3c;
  --surface-3: #1e2650;
  --text: #e7eaf6;
  --text-2: #a4adc9;
  --text-3: #6a7396;
  --border: #232b52;
  --border-strong: #313a6d;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  --brand-soft: rgba(99, 112, 255, .14);
  --ok-bg: rgba(22, 163, 74, .12);
  --err-bg: rgba(220, 38, 38, .14);
  --code-bg: #0a0f22;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background .3s var(--ease), color .3s var(--ease);
}

a { color: var(--brand); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brand-deep); }

img { max-width: 100%; display: block; }

::selection { background: var(--brand); color: #fff; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -.5px;
  color: var(--text);
  flex-shrink: 0;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(70, 83, 232, .35);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand em {
  font-style: normal;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand .beta {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  border: 1px solid var(--border-strong);
  padding: 1px 7px;
  border-radius: 20px;
  margin-left: 2px;
}

/* 主导航 */
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav a {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 9px;
  transition: all .2s var(--ease);
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

/* 头部搜索 */
.header-search {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  height: 40px;
  transition: border-color .2s, box-shadow .2s;
}
.header-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.header-search svg { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }
.header-search input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  width: 150px;
  padding: 0 8px;
  font-family: inherit;
}
.header-search input::placeholder { color: var(--text-3); }

/* 头部按钮组 */
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .moon { display: none; }
[data-theme="dark"] .icon-btn .sun { display: none; }
[data-theme="dark"] .icon-btn .moon { display: block; }

.btn-login {
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 14px rgba(70, 83, 232, .3);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(70, 83, 232, .4); color: #fff; }

/* 移动端菜单按钮 */
.nav-toggle { display: none; }

/* ---------- 通用容器 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.main { flex: 1; padding: 36px 0 64px; }
.narrow { max-width: 860px; }

/* ---------- Hero 区 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 62% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 40%, #000 30%, transparent 75%);
}
.hero::after {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 480px;
  background: radial-gradient(closest-side, rgba(70, 83, 232, .16), rgba(6, 182, 212, .07), transparent);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 26px;
}
.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, .5); }
  55% { box-shadow: 0 0 0 7px rgba(6, 182, 212, 0); }
}

.hero h1 {
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -1.2px;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-2);
  max-width: 620px;
  margin: 0 auto 36px;
}

.hero-cta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 26px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all .22s var(--ease);
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 18px rgba(70, 83, 232, .32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(70, 83, 232, .42); color: #fff; }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; border-radius: 9px; }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { color: #fff; opacity: .88; }
.btn-block { width: 100%; }

/* ---------- 代码窗口装饰（Hero 右侧） ---------- */
.hero-cards {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  margin-top: 56px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.code-window {
  width: min(430px, 92vw);
  border-radius: 16px;
  background: var(--code-bg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .05);
  overflow: hidden;
  text-align: left;
  transform: rotate(-1.2deg);
  transition: transform .35s var(--ease);
}
.code-window:hover { transform: rotate(0) scale(1.02); }
.code-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.code-titlebar i { width: 11px; height: 11px; border-radius: 50%; }
.code-titlebar i:nth-child(1) { background: #ff5f57; }
.code-titlebar i:nth-child(2) { background: #febc2e; }
.code-titlebar i:nth-child(3) { background: #28c840; }
.code-titlebar span {
  margin-left: 10px;
  color: #8b93b8;
  font-size: 12px;
  font-family: ui-monospace, Consolas, monospace;
}
.code-window pre {
  padding: 20px 22px;
  color: var(--code-text);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.85;
  overflow-x: auto;
}
.code-window .cm { color: #5b6488; }   /* 注释 */
.code-window .kw { color: #8ea2ff; }   /* 关键字 */
.code-window .fn { color: #ffd479; }   /* 函数 */
.code-window .st { color: #7ee2a8; }   /* 字符串 */
.code-window .nm { color: #ff9e64; }   /* 数字 */

/* 浮动特性小卡 */
.float-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  animation: float 5s ease-in-out infinite;
}
.float-card svg { width: 22px; height: 22px; color: var(--brand); }
.float-card small { display: block; font-weight: 400; color: var(--text-3); font-size: 12px; }
.float-card.f1 { transform: translateX(20px); animation-delay: .8s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- 数据统计条 ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-item b {
  display: block;
  font-size: 30px;
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -.5px;
}
.stat-item span { font-size: 13px; color: var(--text-2); }

/* ---------- 区块标题 ---------- */
.section { margin-top: 76px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.6px;
  position: relative;
  padding-left: 16px;
}
.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 5px;
  border-radius: 4px;
  background: var(--grad);
}
.section-head .more { font-size: 14px; font-weight: 600; }

/* ---------- 文章卡片网格 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all .28s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 32%, var(--border));
}
.card:hover::before { transform: scaleX(1); }
.card h3 {
  font-size: 18.5px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.3px;
}
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--brand); }
.card .summary {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--text-3);
  font-size: 13px;
}
.card-meta svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.card-meta .m { display: inline-flex; align-items: center; gap: 5px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* 分类徽标 / 标签 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--brand-soft);
  color: var(--brand);
  transition: all .2s var(--ease);
}
.chip:hover { background: var(--brand); color: #fff; }
.chip.plain { background: var(--surface-2); color: var(--text-2); }
.chip.plain:hover { background: var(--brand); color: #fff; }
.chip b { font-weight: 700; opacity: .75; }

/* ---------- 分类网格 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: all .25s var(--ease);
  box-shadow: var(--shadow-sm);
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 32%, var(--border));
}
.cat-card .name { font-size: 17px; font-weight: 700; color: var(--text); }
.cat-card:hover .name { color: var(--brand); }
.cat-card .count {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 12px;
  border-radius: 18px;
  flex-shrink: 0;
}

/* ---------- 技术特性区 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 22px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: all .25s var(--ease);
  box-shadow: var(--shadow-sm);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.feature-card .f-icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.feature-card .f-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-2); line-height: 1.75; }

/* ---------- CTA 横幅 ---------- */
.cta-banner {
  margin-top: 80px;
  border-radius: 22px;
  background: linear-gradient(135deg, #171e42 0%, #252e66 55%, #123a56 100%);
  padding: 58px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 38px 38px;
}
.cta-banner h2 {
  position: relative;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: -.6px;
  margin-bottom: 14px;
}
.cta-banner p { position: relative; color: rgba(255, 255, 255, .68); margin-bottom: 30px; font-size: 16px; }
.cta-banner .btn { position: relative; }

/* ---------- 页面标题（内页） ---------- */
.page-head { margin-bottom: 34px; }
.page-head h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -.8px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.page-head .sub { color: var(--text-2); margin-top: 10px; font-size: 15.5px; }

/* 面包屑 */
.crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-3);
  margin-bottom: 22px;
}
.crumb a { color: var(--text-3); }
.crumb a:hover { color: var(--brand); }
.crumb .sep { opacity: .5; }

/* ---------- 过滤条 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
  align-items: center;
}

/* ---------- 标签云 ---------- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  padding: 8px 0;
}
.tag-cloud .chip { padding: 7px 17px; font-size: 13.5px; }

/* ---------- 分页 ---------- */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
}
.pager a, .pager span {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .2s var(--ease);
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .cur {
  background: var(--grad);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(70, 83, 232, .3);
}
.pager .info { border: none; background: transparent; color: var(--text-3); }

/* ---------- 文章正文 ---------- */
.article-wrap { max-width: 820px; margin: 0 auto; }
.article-head { margin-bottom: 30px; }
.article-head h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.8px;
  margin: 14px 0 18px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--text-3);
  font-size: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 34px;
}
.article-meta .m { display: inline-flex; align-items: center; gap: 6px; }
.article-meta svg { width: 15px; height: 15px; }

.article-body {
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--text);
  word-break: break-word;
}
.article-body h2.md-h {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.4px;
  margin: 44px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--brand);
}
.article-body h3.md-h { font-size: 20px; font-weight: 700; margin: 36px 0 12px; }
.article-body h4.md-h { font-size: 17px; font-weight: 700; margin: 30px 0 10px; }
.article-body p { margin: 0 0 18px; }
.article-body ul { margin: 0 0 20px; padding-left: 6px; list-style: none; }
.article-body li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 9px;
}
.article-body li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: .72em;
  width: 7px;
  height: 7px;
  border-radius: 3px;
  background: var(--grad);
}
.article-body blockquote {
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 12px 12px 0;
  padding: 16px 22px;
  margin: 0 0 20px;
  color: var(--text-2);
}
.article-body blockquote p { margin: 0; }
.article-body strong { color: var(--brand); font-weight: 700; }
.article-body code.inline {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 7px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .88em;
  color: var(--brand-deep);
}
[data-theme="dark"] .article-body code.inline { color: #9db1ff; }
.article-body pre.codeblock {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 13px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 0 0 20px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  line-height: 1.8;
  border: 1px solid rgba(255, 255, 255, .06);
}
.article-body .code-block { position: relative; margin: 0 0 22px; }
.article-body .code-block pre.codeblock { margin: 0; padding-top: 36px; }
.article-body .code-block[data-lang]:not([data-lang=""])::before {
  content: attr(data-lang);
  position: absolute;
  top: 12px;
  left: 18px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #7f8ab8;
  pointer-events: none;
}
.article-body figure { margin: 8px 0 26px; }
.article-body figure img {
  width: 100%;
  height: auto;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.article-body figure figcaption {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-3);
  text-align: center;
}
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 34px 0; }
.article-body mark { background: rgba(255, 213, 79, .45); color: inherit; border-radius: 3px; padding: 0 3px; }
[data-theme="dark"] .article-body mark { background: rgba(255, 213, 79, .25); }

/* 文章底部 */
.article-foot {
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* 上下篇 */
.pn-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
}
.pn-nav a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all .22s var(--ease);
}
.pn-nav a:hover { border-color: var(--brand); transform: translateY(-2px); }
.pn-nav .lab { font-size: 12.5px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pn-nav .t { font-size: 15px; font-weight: 700; color: var(--text); }
.pn-nav a:hover .t { color: var(--brand); }
.pn-nav .next { text-align: right; align-items: flex-end; }

/* 相关文章 */
.related { margin-top: 46px; }
.related h3 { font-size: 19px; font-weight: 800; margin-bottom: 18px; }
.related .card-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.related .card { padding: 20px; gap: 9px; }
.related .card h3 { font-size: 15.5px; }

/* ---------- 搜索结果 ---------- */
.result-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 22px;
  margin-bottom: 26px;
  font-size: 14.5px;
  color: var(--text-2);
}
.result-info b { color: var(--brand); }

/* ---------- 表单 ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 38px 36px;
  max-width: 460px;
  margin: 0 auto;
}
.form-card h2 { font-size: 23px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.form-card .hint { text-align: center; color: var(--text-3); font-size: 14px; margin-bottom: 26px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
}
.field .tip { font-weight: 400; color: var(--text-3); font-size: 12.5px; }
.field input[type=text], .field input[type=password], .field textarea, .field select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--bg);
  color: var(--text);
  padding: 0 15px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: auto; min-height: 130px; padding: 13px 15px; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.field textarea.code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  min-height: 380px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 26px; }

/* ---------- 消息提示 ---------- */
.msg {
  border-radius: 11px;
  padding: 13px 18px;
  font-size: 14.5px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.msg-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 28%, transparent); }
.msg-err { background: var(--err-bg); color: var(--err); border: 1px solid color-mix(in srgb, var(--err) 28%, transparent); }

/* ---------- 后台 ---------- */
.admin-wrap { max-width: 1080px; margin: 0 auto; }
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}
.admin-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.admin-stat .f-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.admin-stat .f-icon svg { width: 22px; height: 22px; }
.admin-stat b { display: block; font-size: 24px; font-weight: 800; line-height: 1.2; }
.admin-stat span { font-size: 13px; color: var(--text-3); }

.quick-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 后台工作台布局 ---------- */
.admin-shell {
  min-height: calc(100vh - 68px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 36px;
}

.admin-topbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 24px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.admin-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}

.admin-brand h1 { font-size: 18px; line-height: 1.25; }
.admin-brand p { color: var(--text-3); font-size: 13px; }

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-2);
  font-size: 14px;
}

.admin-user .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.admin-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.admin-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  position: sticky;
  top: 92px;
}

.admin-nav { display: grid; gap: 6px; }

.admin-nav-item {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 600;
}

.admin-nav-item:hover { background: var(--surface-2); color: var(--text); }
.admin-nav-item.active { background: var(--brand-soft); color: var(--brand); }
.admin-nav-external { margin-top: 8px; border-top: 1px solid var(--border); }

.admin-content {
  min-width: 0;
  display: grid;
  gap: 22px;
}

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 { font-size: 17px; }
.panel-head span { color: var(--text-3); font-size: 13px; }

.message-list {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.admin-message {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  background: var(--surface-2);
}

.admin-message-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.admin-message-meta .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.admin-message-author { font-weight: 700; }
.admin-message-meta time { color: var(--text-3); font-size: 12px; margin-left: auto; }
.admin-message-body { color: var(--text-2); white-space: pre-wrap; }

.message-form { display: grid; gap: 14px; }
.message-form .field span { display: block; margin-bottom: 7px; font-weight: 600; font-size: 14px; }
.message-form textarea { width: 100%; }

.empty-panel {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 24px;
  color: var(--text-3);
  text-align: center;
}

.admin-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.admin-footer .footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
  color: var(--text-3);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 首页新版布局 ---------- */
.header-social { display: flex; align-items: center; gap: 8px; }
.social-link { padding: 8px; }
.social-link svg { width: 19px; height: 19px; }

.home-showcase {
  display: grid;
  grid-template-columns: 70% 30%;
  gap: 18px;
  margin-top: 24px;
  align-items: stretch;
  height: 360px;
}

.home-showcase > * { min-width: 0; }

.product-hub,
.news-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-hub { padding: 14px; }
.news-panel { padding: 16px 18px; max-width: 100%; overflow: hidden; }
.product-hub .panel-head { margin-bottom: 10px; }

.hub-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  min-height: 0;
  overflow: hidden;
}

.hub-tile {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  border-radius: 3px;
  background-color: var(--tile-accent, #0b6fb8);
  background-image: radial-gradient(circle at 18% 18%, rgba(255, 255, 255, .18), transparent 46%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  color: #fff;
  isolation: isolate;
}

.hub-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.hub-tile__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .03) 18%, rgba(0, 0, 0, .78) 100%);
}

.hub-tile__body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 9px 11px 10px;
}

.hub-tile__cat {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, .76);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .08em;
}

.hub-tile__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.28;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .38);
}

.hub-tile__meta {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(255, 255, 255, .74);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-tile--x1y1 { grid-column: span 1; grid-row: span 1; }
.hub-tile--x2y1 { grid-column: span 2; grid-row: span 1; }
.hub-tile--x1y2 { grid-column: span 1; grid-row: span 2; }
.hub-tile--x3y1 { grid-column: span 3; grid-row: span 1; }
.hub-tile--x4y1 { grid-column: span 4; grid-row: span 1; }
.hub-tile--x2y2 { grid-column: span 2; grid-row: span 2; }
.hub-tile--x2y3 { grid-column: span 2; grid-row: span 3; }
.hub-tile--x3y2 { grid-column: span 3; grid-row: span 2; }
.hub-tile--empty { grid-column: span 1; grid-row: span 1; }

.hub-tile--more {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 16px 18px;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 55%);
  background-color: var(--brand);
}

.hub-tile--more::before {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -42px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(255, 255, 255, .06), 0 0 0 38px rgba(255, 255, 255, .04);
}

.hub-tile__more-kicker {
  position: relative;
  color: rgba(255, 255, 255, .78);
  font-size: 10px;
  letter-spacing: .08em;
}

.hub-tile__more-title {
  position: relative;
  margin-top: 6px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.hub-tile__strip {
  grid-column: 1 / -1;
  grid-row: 4 / 5;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
}
.hub-tile__strip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.hub-strip-label { color: var(--text-3); }
.hub-strip-title {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.hub-tile:hover .hub-tile__img { transform: scale(1.07); }
.hub-tile:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.hub-tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.hub-empty,
.news-list .empty {
  border: 1px dashed var(--border-strong);
  border-radius: 2px;
  padding: 34px;
  color: var(--text-3);
  text-align: center;
}

.hub-empty { grid-column: 1 / -1; grid-row: 1 / -1; }

.news-list {
  list-style: none;
  flex: 1;
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  min-height: 0;
}

.news-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 0;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.news-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.news-list a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.news-list time { color: var(--text-3); font-size: 12px; white-space: nowrap; }

/* ---------- 新闻/博客左右列表 ---------- */
.list-layout { margin-top: 24px; }
.list-layout__body {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 18px;
  align-items: start;
}
.list-layout__body > * { min-width: 0; }
.article-list {
  list-style: none;
  display: grid;
  gap: 10px;
}
.article-row__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}
.article-row__link:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.article-row__title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 600;
}
.article-row__link:hover .article-row__title {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.article-row__date {
  flex-shrink: 0;
  color: var(--text-3);
  font-size: 12px;
}
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.sidebar-card + .sidebar-card { margin-top: 18px; }
.sidebar-card h3 {
  margin-bottom: 12px;
  font-size: 15px;
}
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.calendar-head h3 { margin-bottom: 0; }
.calendar-month {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  text-align: center;
  font-size: 12px;
}
.cal-week {
  color: var(--text-3);
  font-weight: 600;
  padding: 4px 0;
}
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 40px;
  border: 1px solid #e8ebf0;
  border-radius: 6px;
  background: #f8f9fb;
  color: var(--text);
  padding: 3px 2px;
}
.cal-day__num { font-size: 14px; font-weight: 700; line-height: 1; }
.cal-day__count {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-3);
  font-size: 9.5px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-day--blank { visibility: hidden; }
.cal-day--has {
  border-color: #ee8d31;
  background: #ee8d31;
  color: #fff;
}
.cal-day--has .cal-day__count { color: rgba(255, 255, 255, .86); }
.cal-day--today {
  border: 1.6px solid var(--brand);
  background: #fff;
}
.cal-day--today.cal-day--has { background: #ee8d31; }
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  color: var(--text-3);
  font-size: 10.5px;
}
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.legend-dot--has { background: #ee8d31; }
.legend-dot--today {
  background: #fff;
  border: 1.6px solid var(--brand);
}
.sidebar-cats { list-style: none; display: grid; gap: 8px; }
.sidebar-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
}
.sidebar-cats a:hover { background: var(--brand-soft); color: var(--brand); }
.sidebar-cats span { color: var(--text-3); font-size: 12px; }
.sidebar-cats .empty { color: var(--text-3); font-size: 13px; }

.home-custom { margin-top: 36px; }

.timeline {
  position: relative;
  display: grid;
  gap: 28px;
  padding: 8px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.timeline-item time {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.timeline-card h3 { margin-bottom: 6px; font-size: 16px; }
.timeline-card p { color: var(--text-2); font-size: 14px; }
.timeline-item.left .timeline-card { grid-column: 1; }
.timeline-item.right .timeline-card { grid-column: 2; }

@media (max-width: 900px) {
  .home-showcase { grid-template-columns: 1fr; height: auto; max-height: none; }
  .list-layout__body { grid-template-columns: 1fr; }
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 112px);
  }
  .timeline::before { left: 18px; }
  .timeline-item { grid-template-columns: 1fr; gap: 12px; }
  .timeline-item.left .timeline-card,
  .timeline-item.right .timeline-card { grid-column: 1; }
  .timeline-item time { left: 18px; transform: none; }
}

/* ---------- 捐赠二维码 ---------- */
.donate-section { margin-top: 36px; }
.donate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.donate-qr {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.donate-qr img {
  width: 168px;
  height: 168px;
  object-fit: contain;
  margin: 0 auto 12px;
  border-radius: var(--radius-sm);
}
.donate-qr-title { font-weight: 700; color: var(--text); }
.donate-admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.donate-admin-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: grid;
  gap: 10px;
  background: var(--surface-2);
}
.donate-admin-card label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.donate-preview { width: 96px; height: 96px; object-fit: contain; border-radius: 8px; margin-bottom: 8px; }

@media (max-width: 900px) {
  .donate-grid,
  .donate-admin-grid { grid-template-columns: 1fr; }
}

/* 数据表格 */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 720px; }
table.data th {
  text-align: left;
  padding: 14px 18px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
table.data td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--surface-2); }
table.data td.ops { white-space: nowrap; }
table.data td.ops a { margin-right: 12px; font-size: 13.5px; }
table.data .id { color: var(--text-3); font-family: ui-monospace, Consolas, monospace; }
table.data .views { color: var(--text-3); }

/* ---------- 关于页 ---------- */
.about-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 46px 42px;
  box-shadow: var(--shadow-md);
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}
.about-hero::before {
  content: "</>";
  position: absolute;
  right: 28px;
  top: 6px;
  font-size: 120px;
  font-weight: 900;
  color: var(--brand-soft);
  font-family: ui-monospace, Consolas, monospace;
  line-height: 1;
  pointer-events: none;
}
.about-hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -.8px; margin-bottom: 12px; position: relative; }
.about-hero .lead { color: var(--text-2); font-size: 16.5px; max-width: 640px; position: relative; }
.about-body { max-width: 860px; }

/* ---------- 登录后用户菜单 ---------- */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 7px;
  border-radius: 30px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
  font-size: 14px;
  transition: all .2s var(--ease);
}
.user-chip:hover { background: var(--brand); color: #fff; }
.user-chip .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}

/* ---------- 404 ---------- */
.err-wrap { text-align: center; padding: 90px 20px; }
.err-code {
  font-size: clamp(90px, 16vw, 150px);
  font-weight: 900;
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -4px;
}
.err-wrap h1 { font-size: 24px; margin: 18px 0 10px; }
.err-wrap p { color: var(--text-2); margin-bottom: 30px; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 52px 24px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand p { color: var(--text-2); font-size: 14px; margin-top: 14px; max-width: 340px; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.footer-col a {
  display: block;
  color: var(--text-2);
  font-size: 14px;
  padding: 5px 0;
  transition: color .2s;
}
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-3);
  font-size: 13px;
}
.footer-bottom a { color: var(--text-3); }
.footer-bottom a:hover { color: var(--brand); }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed;
  right: 26px;
  bottom: 30px;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: none;
  background: var(--grad);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(70, 83, 232, .38);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all .3s var(--ease);
  z-index: 90;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-3px); }
.back-top svg { width: 20px; height: 20px; }

/* ---------- 滚动显现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 空状态 ---------- */
.empty {
  text-align: center;
  color: var(--text-3);
  padding: 70px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.empty svg { width: 52px; height: 52px; margin-bottom: 16px; color: var(--text-3); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .header-search { display: none; }
  .header-inner { gap: 16px; }
  .main-nav a { white-space: nowrap; padding: 8px 10px; }
}

@media (max-width: 1024px) {
  .header-search input { width: 100px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .header-social { display: none; }
  .nav-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    margin-left: auto;
  }
  .nav-toggle svg { width: 20px; height: 20px; }
  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 18px;
    gap: 4px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: all .25s var(--ease);
    z-index: 99;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .main-nav a { padding: 12px 14px; }
  .header-search, .header-actions .btn-login { display: none; }
  .float-card { display: none; }
  .code-window { transform: none; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .pn-nav { grid-template-columns: 1fr; }
  .pn-nav .next { text-align: left; align-items: flex-start; }
  .field-row { grid-template-columns: 1fr; }
  .about-hero::before { font-size: 70px; top: auto; bottom: 0; }
}

@media (max-width: 560px) {
  .header-inner { padding: 0 16px; gap: 12px; }
  .container { padding: 0 16px; }
  .brand span.beta { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .form-card { padding: 30px 22px; }
  .hero { padding: 56px 0 56px; }
  .back-top { right: 16px; bottom: 20px; }
}

/* ---------- 产品卡片 ---------- */
.card.product-card { padding: 0; overflow: hidden; }
.card.product-card .pc-cover {
  display: block;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--bg-2);
}
.card.product-card .pc-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.card.product-card:hover .pc-cover img { transform: scale(1.06); }
.card.product-card .card-tags,
.card.product-card h3,
.card.product-card .summary,
.card.product-card .card-meta { padding: 0 22px; }
.card.product-card h3 { margin: 18px 22px 0; }
.card.product-card .summary { margin: 12px 22px 0; }
.card.product-card .card-meta { padding: 0 22px 22px; }
.card.product-card .card-meta .price {
  color: var(--brand);
  font-weight: 800;
  font-size: 16px;
}

/* 产品详情 */
.product-wrap .price-tag {
  color: var(--brand);
  font-weight: 800;
  font-size: 15px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  padding: 3px 12px;
  border-radius: 999px;
}
.cover-img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 18px 0 8px;
  background: var(--bg-2);
}
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 22px 0; }
.gallery .g-item {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  transition: border-color .25s var(--ease);
}
.gallery .g-item:hover { border-color: var(--brand); }
.gallery .g-item img { width: 100%; height: 140px; object-fit: cover; display: block; }
.gallery.edit { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.gallery.edit .g-item img { height: 90px; }

/* 附件下载列表 */
.attachments { margin: 26px 0 6px; }
.attachments h4 { font-size: 15px; margin-bottom: 12px; color: var(--text); }
.attachments ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.attachments li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 600;
  transition: all .2s var(--ease);
}
.attachments li a:hover { border-color: var(--brand); color: var(--brand); }
.attachments li a svg { width: 20px; height: 20px; flex: none; }
.attachments li a .sz { margin-left: auto; color: var(--text-3); font-weight: 500; font-size: 13px; }

/* 后台：产品缩略图与上传预览 */
.p-mini { display: flex; align-items: center; gap: 10px; }
.p-mini img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; flex: none; background: var(--bg-2); }
.data td.p-cell { max-width: 360px; }
.form-card .field input[type="file"] {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
}
.form-card .field input[type="file"]:hover { border-color: var(--brand); }
.upload-preview { margin-bottom: 10px; }
.upload-preview img { max-width: 180px; border-radius: var(--radius); border: 1px solid var(--border); }

