/* ============================================================
   作品发布网站 · 全站样式
   设计语言：靛紫渐变 + 暖白卡片 + 柔和阴影
   ============================================================ */

:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --ink: #171a26;
  --ink-2: #5a6072;
  --ink-3: #9aa0b0;
  --line: #e7e9f2;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: #eef0fe;
  --grad: linear-gradient(135deg, #4f46e5, #7c3aed);
  --ok: #059669;
  --ok-soft: #e7f7f0;
  --warn: #d97706;
  --warn-soft: #fdf3e3;
  --bad: #dc2626;
  --bad-soft: #fdeaea;
  --shadow: 0 1px 2px rgba(23, 26, 38, .04), 0 10px 30px rgba(23, 26, 38, .07);
  --shadow-sm: 0 1px 3px rgba(23, 26, 38, .08);
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

::selection { background: rgba(79, 70, 229, .18); }

/* ---------------------------------------------------------- 顶部导航 */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }

.brand .logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .35);
}

.nav-links { display: flex; gap: 4px; margin-left: 8px; flex: 1; }

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 14.5px;
  transition: all .18s;
}

.nav-links a:hover { color: var(--accent); background: var(--accent-soft); }

.nav-links a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.nav-cta { display: flex; align-items: center; gap: 12px; }

#navToggle { display: none; }

/* ---------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .32);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(79, 70, 229, .4); }

.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger { background: var(--bad-soft); color: var(--bad); }

.btn-danger:hover { background: var(--bad); color: #fff; }

.btn-ok { background: var(--ok-soft); color: var(--ok); }

.btn-ok:hover { background: var(--ok); color: #fff; }

.btn-sm { padding: 6px 14px; font-size: 13px; }

.btn-lg { padding: 13px 30px; font-size: 15.5px; }

.btn-block { width: 100%; }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------------------------------------------------------- 徽章 / 标签 / 状态 */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
}

.chip:hover { border-color: var(--accent); color: var(--accent); }

.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.chip .n { opacity: .65; font-size: 12px; }

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}

.pill-ok { background: var(--ok-soft); color: var(--ok); }

.pill-gray { background: #eef0f4; color: var(--ink-2); }

.pill-warn { background: var(--warn-soft); color: var(--warn); }

.pill-bad { background: var(--bad-soft); color: var(--bad); }

/* ---------------------------------------------------------- 公告条 */

.announce {
  background: linear-gradient(90deg, #eef0fe, #f4effe);
  border-bottom: 1px solid #e2e4f8;
}

.announce .container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 13.5px;
  color: #4338ca;
}

.announce svg { flex: none; }

/* ---------------------------------------------------------- Hero */

.hero { padding: 68px 0 56px; }

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 52px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, .45); }
  50% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
}

.hero h1 {
  font-size: 40px;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .sub { color: var(--ink-2); font-size: 16px; max-width: 520px; margin-bottom: 30px; }

.hero-actions { display: flex; gap: 14px; margin-bottom: 40px; }

.hero-stats { display: flex; gap: 44px; }

.hero-stats .num { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }

.hero-stats .num i { font-style: normal; color: var(--accent); }

.hero-stats .lbl { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(1.2deg);
  transition: transform .3s;
}

.hero-card:hover { transform: rotate(0deg) translateY(-4px); }

.hero-card .cover { aspect-ratio: 16/9; overflow: hidden; }

.hero-card .cover img { width: 100%; height: 100%; object-fit: cover; }

.hero-card .body { padding: 18px 20px; display: flex; align-items: center; gap: 14px; }

.hero-card .meta { flex: 1; min-width: 0; }

.hero-card .meta .t { font-weight: 700; margin-bottom: 3px; }

.hero-card .meta .d { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hero-card .go {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  transition: all .18s;
}

.hero-card .go:hover { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------- 通用区块 */

.section { padding: 54px 0; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }

.section-head h2 { font-size: 25px; letter-spacing: -.4px; }

.section-head .desc { color: var(--ink-2); font-size: 14px; margin-top: 5px; }

.section-head .more { color: var(--accent); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

.section-head .more:hover { gap: 8px; }

/* ---------------------------------------------------------- 作品卡片 */

.works-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.work-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .22s;
  display: flex;
  flex-direction: column;
}

.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d8daf5; }

.work-card .cover { aspect-ratio: 16/9; overflow: hidden; position: relative; background: var(--accent-soft); }

.work-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }

.work-card:hover .cover img { transform: scale(1.04); }

.work-card .cover .cat-chip {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.work-card .cover .feat-chip {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.work-card .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; gap: 9px; }

.work-card .t { font-size: 16.5px; font-weight: 700; }

.work-card .t:hover { color: var(--accent); }

.work-card .d {
  font-size: 13.5px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.work-card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
}

.work-card .foot .metrics { display: flex; gap: 14px; align-items: center; }

.work-card .foot .metrics span { display: inline-flex; align-items: center; gap: 4px; }

.work-card .ver { color: var(--accent); font-weight: 700; }

.work-card .card-actions {
  display: flex; gap: 10px; margin-top: 12px;
  padding-top: 12px; border-top: 1px dashed var(--line);
}
.work-card .card-actions .btn { flex: 1; justify-content: center; }

/* 封面缺失时的渐变占位（内置设计，非外链） */
.cover-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a78bfa 100%);
  color: rgba(255, 255, 255, .92);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 2px;
}

/* ---------------------------------------------------------- 分类速览 */

.cat-row { display: flex; flex-wrap: wrap; gap: 12px; }

.cat-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: all .18s;
  font-weight: 600;
}

.cat-tile:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }

.cat-tile .ic {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
}

.cat-tile .c { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }

/* ---------------------------------------------------------- 作者条幅 */

.author-band {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.avatar-lg {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(23, 26, 38, .15);
  flex: none;
}

.avatar-fallback {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: grid; place-items: center;
  font-size: 30px; font-weight: 800;
  flex: none;
}

.author-band .info { flex: 1; }

.author-band .name { font-size: 19px; font-weight: 800; }

.author-band .role { color: var(--accent); font-size: 13.5px; font-weight: 600; margin: 2px 0 8px; }

.author-band .bio { color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------- CTA 条幅 */

.cta-band {
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
  padding: 44px 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  position: relative;
  overflow: hidden;
}

.cta-band::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}

.cta-band::before {
  content: '';
  position: absolute;
  right: 80px; bottom: -80px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.cta-band h3 { font-size: 23px; margin-bottom: 8px; }

.cta-band p { opacity: .88; font-size: 14.5px; }

.cta-band .btn { background: #fff; color: var(--accent); position: relative; z-index: 1; }

/* ---------------------------------------------------------- 页脚 */

.footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 34px 0;
}

.footer .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

.footer .fl { display: flex; flex-direction: column; gap: 6px; }

.footer .fname { font-weight: 800; display: flex; align-items: center; gap: 8px; }

.footer .fdesc { font-size: 13px; color: var(--ink-2); max-width: 460px; }

.footer .flinks { display: flex; gap: 20px; font-size: 13.5px; color: var(--ink-2); flex-wrap: wrap; }

.footer .flinks a:hover { color: var(--accent); }

.footer .ficp { font-size: 12.5px; color: var(--ink-3); }

/* ---------------------------------------------------------- 作品列表页 */

.page-head { padding: 44px 0 0; }

.page-head h1 { font-size: 30px; letter-spacing: -.4px; margin-bottom: 8px; }

.page-head .sub { color: var(--ink-2); font-size: 14.5px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 26px 0;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  transition: border-color .15s;
}

.search-box:focus-within { border-color: var(--accent); }

.search-box input { border: 0; outline: 0; background: transparent; flex: 1; font-size: 14px; color: var(--ink); }

.search-box svg { color: var(--ink-3); }

.toolbar select {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 13.5px;
  color: var(--ink-2);
  outline: none;
  cursor: pointer;
}

.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }

/* ---------------------------------------------------------- 分页 */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 36px 0 8px;
}

.pg-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all .15s;
}

.pg-btn:hover { border-color: var(--accent); color: var(--accent); }

.pg-btn.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .3);
}

.pg-btn.disabled { opacity: .45; pointer-events: none; }

.pg-dots { color: var(--ink-3); padding: 0 2px; user-select: none; }

/* ---------------------------------------------------------- 详情页 */

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); padding: 26px 0 0; }

.breadcrumb a:hover { color: var(--accent); }

.detail-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 30px; padding: 22px 0 10px; align-items: start; }

.detail-main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.detail-main .cover { aspect-ratio: 21/9; overflow: hidden; background: var(--accent-soft); }

.detail-main .cover img { width: 100%; height: 100%; object-fit: cover; }

.detail-main .inner { padding: 28px 32px 34px; }

.detail-main h1 { font-size: 27px; letter-spacing: -.4px; margin: 10px 0 6px; }

.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink-3); margin-bottom: 20px; }

.detail-meta span { display: inline-flex; align-items: center; gap: 5px; }

.detail-desc { color: var(--ink); font-size: 15px; }

.detail-desc h4 { margin: 22px 0 10px; font-size: 16.5px; padding-left: 10px; border-left: 4px solid var(--accent); }

.detail-desc p { margin: 8px 0; color: var(--ink-2); }

.detail-desc ul { padding-left: 22px; margin: 8px 0; color: var(--ink-2); }

.detail-desc li { margin: 5px 0; }

.detail-desc strong { color: var(--ink); }

.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line); }

/* 版本时间线 */

.timeline { margin-top: 34px; }

.timeline h3 { font-size: 18px; margin-bottom: 18px; }

.tl-item {
  position: relative;
  padding: 0 0 22px 26px;
  border-left: 2px solid var(--line);
  margin-left: 8px;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
  content: '';
  position: absolute;
  left: -7px; top: 3px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.tl-item .v { font-weight: 800; color: var(--accent); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tl-item .date { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }

.tl-item .log { font-size: 14px; color: var(--ink-2); margin-top: 5px; }

.tl-item .dl { margin-top: 8px; }

/* 详情侧栏 */

.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 20px;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

.side-card h3 { font-size: 15px; margin-bottom: 14px; color: var(--ink); }

.kv { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line); }

.kv:last-of-type { border-bottom: 0; }

.kv .k { color: var(--ink-3); }

.kv .v { font-weight: 600; }

.dl-btn-wrap { margin: 16px 0 6px; }

.dl-note { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }

.side-works .sw-item { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px dashed var(--line); align-items: center; }

.side-works .sw-item:last-child { border-bottom: 0; }

.side-works .thumb { width: 62px; height: 40px; border-radius: 8px; overflow: hidden; flex: none; background: var(--accent-soft); }

.side-works .thumb img { width: 100%; height: 100%; object-fit: cover; }

.side-works .t { font-size: 13.5px; font-weight: 600; line-height: 1.4; }

.side-works .t:hover { color: var(--accent); }

.side-works .m { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ---------------------------------------------------------- 关于作者页 */

.profile-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 44px 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  margin-top: 34px;
  flex-wrap: wrap;
}

.profile-hero .avatar-lg, .profile-hero .avatar-fallback { width: 110px; height: 110px; font-size: 40px; }

.profile-hero h1 { font-size: 28px; margin-bottom: 4px; }

.profile-hero .role { color: var(--accent); font-weight: 700; margin-bottom: 12px; }

.social-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
  transition: all .15s;
}

.social-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.about-grid { display: grid; grid-template-columns: 1fr 320px; gap: 26px; margin-top: 26px; align-items: start; }

.about-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
}

.about-card h2 { font-size: 19px; margin-bottom: 16px; }

.about-card .bio { color: var(--ink-2); }

.about-card .bio h4 { color: var(--ink); margin: 20px 0 8px; padding-left: 10px; border-left: 4px solid var(--accent); font-size: 15.5px; }

.skill-cloud { display: flex; flex-wrap: wrap; gap: 10px; }

.skill-cloud .tag { font-size: 13px; padding: 6px 14px; }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; margin-bottom: 20px; }

.mini-stats .num { font-size: 22px; font-weight: 800; color: var(--accent); }

.mini-stats .lbl { font-size: 12.5px; color: var(--ink-3); }

/* ---------------------------------------------------------- 表单页（反馈/联系） */

.form-layout { display: grid; grid-template-columns: 1fr 340px; gap: 26px; align-items: start; margin-top: 30px; }

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 32px;
  box-shadow: var(--shadow-sm);
}

.form-card h2 { font-size: 20px; margin-bottom: 4px; }

.form-card .sub { color: var(--ink-2); font-size: 13.5px; margin-bottom: 22px; }

.field { margin-bottom: 18px; }

.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }

.field label .req { color: var(--bad); margin-left: 3px; }

.input, .textarea, .select {
  width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
  background: #fff;
}

.textarea { min-height: 140px; resize: vertical; line-height: 1.7; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }

/* 星级评分 */

.stars { display: flex; gap: 4px; }

.stars button {
  background: none;
  border: 0;
  cursor: pointer;
  color: #d4d7e3;
  font-size: 26px;
  line-height: 1;
  transition: transform .12s, color .12s;
  padding: 2px;
}

.stars button.on { color: #f59e0b; }

.stars button:hover { transform: scale(1.15); }

/* 反馈展示 */

.fb-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 12px;
}

.fb-item .head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }

.fb-item .who { font-weight: 700; font-size: 14px; }

.fb-item .when { font-size: 12px; color: var(--ink-3); margin-left: auto; }

.fb-item .txt { font-size: 13.5px; color: var(--ink-2); }

.fb-stars { color: #f59e0b; font-size: 13px; letter-spacing: 2px; }

/* 联系信息卡 */

.contact-cards { display: grid; gap: 12px; }

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  transition: all .15s;
}

.contact-card:hover { border-color: var(--accent); }

.contact-card .ic {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  flex: none;
}

.contact-card .k { font-size: 12.5px; color: var(--ink-3); }

.contact-card .v { font-size: 13.5px; font-weight: 600; word-break: break-all; }

/* ---------------------------------------------------------- Toast / 提示 */

.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 10px; }

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  background: #1d2030;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(23, 26, 38, .25);
  animation: toastIn .25s ease;
}

.toast.ok { border-left: 4px solid #34d399; }

.toast.warn { border-left: 4px solid #fbbf24; }

.toast.bad { border-left: 4px solid #f87171; }

@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------- 空状态 / 错误页 */

.empty {
  text-align: center;
  padding: 70px 20px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-3);
}

.empty .big { font-size: 44px; margin-bottom: 10px; opacity: .5; }

.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }

.error-page .code { font-size: 80px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============================================================
   后台管理
   ============================================================ */

.admin-body { display: flex; min-height: 100vh; background: #f2f3f9; }

.admin-side {
  width: 228px;
  flex: none;
  background: #14161f;
  color: #c8ccda;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-side .aside-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}

.admin-side .aside-brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; }

.admin-nav { padding: 6px 12px 20px; flex: 1; }

.admin-nav .grp { font-size: 11.5px; letter-spacing: 1.5px; color: #6b7186; padding: 16px 10px 7px; }

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 2px;
  transition: all .15s;
  position: relative;
}

.admin-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.admin-nav a.active { background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(79, 70, 229, .4); }

.admin-nav .bdg {
  margin-left: auto;
  background: var(--bad);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 7px;
}

.admin-side .aside-foot { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12.5px; }

.admin-side .aside-foot a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; }

.admin-side .aside-foot a:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.admin-top {
  height: 62px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-top h1 { font-size: 17px; font-weight: 700; }

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ok);
  background: var(--ok-soft);
  padding: 5px 13px;
  border-radius: 999px;
  font-weight: 600;
}

.sync-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 1.8s infinite; }

.admin-user { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-2); }

.admin-content { padding: 26px 28px 40px; flex: 1; }

/* 仪表盘 */

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card .ic {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: grid; place-items: center;
  flex: none;
}

.stat-card .ic.i1 { background: var(--accent-soft); color: var(--accent); }

.stat-card .ic.i2 { background: var(--ok-soft); color: var(--ok); }

.stat-card .ic.i3 { background: var(--warn-soft); color: var(--warn); }

.stat-card .ic.i4 { background: #f4e8fe; color: #9333ea; }

.stat-card .num { font-size: 24px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; }

.stat-card .lbl { font-size: 13px; color: var(--ink-3); }

.stat-card .sub { font-size: 12px; color: var(--ink-3); }

.admin-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  overflow: hidden;
}

.admin-panel .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.admin-panel .panel-head h2 { font-size: 15.5px; }

.admin-panel .panel-body { padding: 20px 22px; }

.panel-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* 表格 */

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.table th {
  text-align: left;
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: #fafbfe;
}

.table td { padding: 12px 14px; border-bottom: 1px solid #f0f1f7; vertical-align: middle; }

.table tr:last-child td { border-bottom: 0; }

.table tbody tr { transition: background .12s; }

.table tbody tr:hover { background: #fafbff; }

.table .t-title { font-weight: 600; }

.table .t-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.table .actions { display: flex; gap: 6px; justify-content: flex-end; }

.icon-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-2);
  transition: all .15s;
  flex: none;
}

.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.icon-btn.danger:hover { border-color: var(--bad); color: var(--bad); }

.icon-btn.warn:hover { border-color: var(--warn); color: var(--warn); }

/* 后台表单 */

.form-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px 30px;
  max-width: 860px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.form-grid .full { grid-column: 1 / -1; }

.upload-box {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: #fafbfe;
}

.upload-box:hover { border-color: var(--accent); background: var(--accent-soft); }

.upload-box input[type=file] { display: none; }

.upload-box .ic { color: var(--accent); margin-bottom: 6px; }

.upload-box .txt { font-size: 13.5px; color: var(--ink-2); }

.upload-box .fname { font-size: 12.5px; color: var(--accent); font-weight: 600; margin-top: 4px; word-break: break-all; }

.cover-preview { margin-top: 10px; max-height: 150px; border-radius: 10px; overflow: hidden; display: none; }

.cover-preview img { width: 100%; object-fit: cover; }

.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; padding-top: 8px; }

.checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent); }

.form-actions { display: flex; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); align-items: center; }

.current-file {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ok);
  background: var(--ok-soft);
  border-radius: 8px;
  padding: 7px 12px;
  margin-top: 8px;
  word-break: break-all;
}

/* 登录页 */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(800px 400px at 20% 0%, rgba(79, 70, 229, .14), transparent),
    radial-gradient(700px 380px at 90% 100%, rgba(124, 58, 237, .13), transparent),
    var(--bg);
  padding: 20px;
}

.login-card {
  width: 400px;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 38px 36px;
}

.login-card .logo-lg {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 10px 24px rgba(79, 70, 229, .35);
}

.login-card h1 { font-size: 21px; text-align: center; margin-bottom: 4px; }

.login-card .sub { text-align: center; color: var(--ink-3); font-size: 13.5px; margin-bottom: 26px; }

.login-tip { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--ink-3); background: var(--bg); border-radius: 10px; padding: 9px; }

/* 消息/反馈详情块 */

.msg-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 12px; background: #fff; }

.msg-item.unread { border-left: 4px solid var(--accent); }

.msg-item .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.msg-item .head .who { font-weight: 700; }

.msg-item .head .mail { font-size: 12.5px; color: var(--ink-3); }

.msg-item .head .when { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }

.msg-item .subject { font-weight: 600; margin: 8px 0 4px; }

.msg-item .content { font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; }

.msg-item .ops { display: flex; gap: 8px; margin-top: 12px; }

/* ---------------------------------------------------------- 响应式 */

@media (max-width: 1024px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .hero .container { grid-template-columns: 1fr; gap: 36px; }
  .hero-card { display: none; }
  .detail-wrap { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .about-grid, .form-layout { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-cols { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 12px 18px 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  #navToggle {
    display: grid;
    place-items: center;
    background: none;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    margin-left: auto;
  }
  .nav-cta .btn { display: none; }
  .works-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 30px; }
  .hero-stats { gap: 26px; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px 26px; }
  .form-row, .form-grid { grid-template-columns: 1fr; }
  .admin-body { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; }
  .admin-side .aside-brand { padding: 12px 14px; }
  .admin-side .aside-brand span { display: none; }
  .admin-nav { display: flex; padding: 8px; }
  .admin-nav .grp { display: none; }
  .admin-nav a { white-space: nowrap; }
  .admin-nav a svg { display: none; }
  .admin-side .aside-foot { display: none; }
  .admin-content { padding: 18px 14px 30px; }
  .admin-top { padding: 0 16px; }
  .sync-badge .txt { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer .container { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   v1.1 新增：批量操作 / 图表 / FAQ / 版本历史
   ============================================================ */

/* 勾选列 */
.pick-col { width: 36px; text-align: center; }
.pick-col input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }

/* 批量操作条 */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.batch-bar .pick-count { font-weight: 700; color: var(--accent); }

.batch-bar .pick-count.has { color: var(--accent-2); }

.batch-bar select {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
}

.batch-bar .hint { font-size: 12px; color: var(--ink-3); margin-left: auto; }

/* 访问趋势条形图 */
.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 150px;
  padding: 8px 4px 0;
}

.trend-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }

.trend-chart .bar {
  width: 100%;
  max-width: 34px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  min-height: 3px;
  transition: opacity .15s;
}

.trend-chart .col:hover .bar { opacity: .78; }

.trend-chart .v { font-size: 11px; font-weight: 700; color: var(--ink-2); }

.trend-chart .d { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }

.trend-chart .col.today .d { color: var(--accent); font-weight: 700; }

/* 下载排行条形 */
.rank-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }

.rank-row:last-child { border-bottom: 0; }

.rank-row .meter { flex: 1; height: 8px; border-radius: 999px; background: #eef0f8; overflow: hidden; }

.rank-row .meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* FAQ（前台折叠 + 后台列表） */
.faq-page-head { text-align: center; padding: 52px 0 10px; }

.faq-page-head h1 { font-size: 32px; letter-spacing: -.5px; }

.faq-page-head .sub { color: var(--ink-2); margin-top: 10px; }

.faq-list { max-width: 780px; margin: 28px auto 70px; display: grid; gap: 12px; }

.faq-list details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color .15s;
}

.faq-list details[open] { border-color: rgba(79, 70, 229, .45); }

.faq-list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary .qn {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  display: grid; place-items: center;
}

.faq-list summary .caret { margin-left: auto; color: var(--ink-3); transition: transform .2s; flex: none; }

.faq-list details[open] summary .caret { transform: rotate(180deg); }

.faq-list .ans { padding: 0 20px 18px 58px; color: var(--ink-2); font-size: 14px; white-space: pre-wrap; }

.faq-admin-q { font-weight: 600; font-size: 14px; }

.faq-admin-a { font-size: 13px; color: var(--ink-2); margin-top: 4px; white-space: pre-wrap; word-break: break-word; }

.pill-off { background: #eef0f6; color: var(--ink-3); }

/* 版本历史 */
.ver-file { font-size: 12px; color: var(--ink-3); word-break: break-all; }

/* 导出按钮组 */
.export-btns { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .trend-chart { gap: 4px; height: 120px; }
  .trend-chart .v { display: none; }
  .faq-list .ans { padding-left: 20px; }
}

/* ============================================================
   v1.2 新增：后台表格与仪表盘细节 / 空状态变体 / 键盘焦点
   ============================================================ */

/* 后台表格单元格 */
.table .ta-r { text-align: right; }

.table .t-when { white-space: nowrap; color: var(--ink-3); }

.t-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }

.t-cell .t-cover {
  width: 56px; height: 38px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  background: var(--accent-soft);
}

.t-cell .t-cover img { width: 100%; height: 100%; object-fit: cover; }

.t-cell .t-cover .cover-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 14px; letter-spacing: 0;
}

.table .ver { color: var(--accent); font-weight: 700; }

.tag-xs { font-size: 11px; padding: 1px 8px; }

/* 空状态变体 */
.empty.compact { padding: 26px; }

.empty.flush { border: 0; }

/* 仪表盘细节 */
.trend-note { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }

.trend-note b { color: var(--accent); }

.rank-row .rank-idx { flex: none; }

.rank-row .rank-info { flex: 1; min-width: 0; }

.rank-row .rank-t { font-weight: 600; font-size: 13.5px; }

.rank-row .rank-t:hover { color: var(--accent); }

.rank-row .rank-s { font-size: 12px; color: var(--ink-3); }

.rank-row .meter { flex: none; width: 110px; }

.rank-row .rank-num { flex: none; text-align: right; }

.rank-row .rank-num b { font-weight: 800; color: var(--accent); }

.rank-row .num-lbl { font-size: 11.5px; color: var(--ink-3); }

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

.fb-item .txt { margin-top: 4px; }

/* 键盘可访问性 */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   后台增强（v1.4.0）
   ============================================================ */
.panel-note { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }

.search-bar { display: flex; align-items: center; gap: 6px; }

.search-bar input[type=search] {
  width: 200px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  background: #fff;
  transition: border-color .15s;
}

.search-bar input[type=search]:focus { border-color: var(--accent); }

.search-note { font-size: 12.5px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }

.ver-cur { color: var(--accent); font-weight: 700; }

.t-desc { max-width: 280px; }

.ver-file-title { font-size: 13px; }

.dim { color: var(--ink-3); }

.form-narrow { max-width: 520px; }

.side-note {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.9;
}

.side-note.compact-note { margin: 6px 0 0; padding: 0; border: 0; }

.msg-item .head .ops { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* 分类管理：行内编辑表单 */
.cat-cell { padding: 0; }

.cat-form { display: flex; align-items: center; gap: 10px; padding: 9px 14px; flex-wrap: wrap; }

.cat-form .cat-name { flex: 1; min-width: 120px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; }

.cat-form .cat-sort { width: 76px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }

.cat-ops { display: flex; gap: 6px; margin-left: auto; }

.cat-del-cell { padding: 0 14px 10px; border-bottom: 1px solid #f0f1f7; }

.cat-del { display: flex; align-items: center; }

.cat-note { font-size: 12px; color: var(--ink-3); margin-left: 8px; }

.icon-btn:disabled { opacity: .45; cursor: not-allowed; }

/* 仪表盘卡片质感 */
.stat-card { transition: transform .15s, box-shadow .15s; }

.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(17, 24, 39, .08); }

@media (max-width: 760px) {
  .admin-top .sync-badge { display: none; }
  .batch-bar .hint { display: none; }
  .search-note { display: none; }
  .search-bar input[type=search] { width: 130px; }
}

/* ============================================================
   v1.5.0：前台内联样式归位 / 返回顶部 / 后台收尾
   ============================================================ */

/* 通用 */
.section.tight { padding-top: 10px; }

.section.cta-sec { padding-top: 6px; padding-bottom: 66px; }

.page-end { height: 50px; }

.note { font-size: 13.5px; color: var(--ink-2); }

.note-sm { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-col { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.lnk { color: var(--accent); font-weight: 600; }

.lnk:hover { text-decoration: underline; }

[data-copy] { cursor: pointer; }

/* 页脚小 logo */
.footer .logo-mini { width: 26px; height: 26px; border-radius: 8px; background: var(--grad); display: inline-grid; place-items: center; color: #fff; }

/* 作品列表页底部留白 */
.works-page .works-grid, .works-page .empty { margin-bottom: 60px; }

/* 详情页侧栏 */
.kv .v.accent { color: var(--accent); }

.side-card.static { position: static; }

.side-card .note { margin-bottom: 14px; }

/* 关于页 */
.profile-hero .main { flex: 1; min-width: 240px; }

.profile-hero .aside { min-width: 200px; }

.about-side { display: grid; gap: 20px; }

.rank-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); align-items: center; }

.rank-item:last-child { border-bottom: 0; }

.rank-item .idx { flex: none; }

.rank-item .info { flex: 1; min-width: 0; }

.rank-item .t { font-size: 13.5px; font-weight: 600; }

.rank-item .m { font-size: 12px; color: var(--ink-3); }

/* 表单页（反馈/联系） */
.form-card .req { color: var(--bad); }

.form-card .sec-title { font-size: 16px; }

.form-card .note { margin-top: 8px; }

.form-side { display: grid; gap: 16px; }

.fb-list { margin-top: 14px; }

/* 错误页 */
.error-page .msg { color: var(--ink-2); margin: 10px 0 24px; }

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 22px; bottom: 26px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .22s, transform .22s, visibility .22s;
  z-index: 90;
}

.to-top.show { opacity: 1; visibility: visible; transform: none; }

.to-top:hover { color: var(--accent); border-color: var(--accent); }

.to-top svg { transform: rotate(180deg); }

/* 后台收尾 */
.admin-panel.narrow { max-width: 760px; }

.form-actions.bare { border: 0; padding-top: 4px; }

.toast.inline { position: static; transform: none; margin-bottom: 14px; }

.login-back { text-align: center; margin-top: 16px; }

.login-back a { font-size: 13px; color: var(--ink-3); }

.login-back a:hover { color: var(--accent); }

.avatar-preview { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin-top: 10px; }

.cover-preview.show { display: block; }

.textarea.sm { min-height: 70px; }

.textarea.md { min-height: 90px; }

.textarea.lg { min-height: 220px; }

.textarea.xl { min-height: 260px; }

/* ============================================================
   v1.6.0：FAQ CTA 按钮补类 / 后台答案全文换行
   ============================================================ */

/* 浅色按钮（渐变底 CTA 用） */
.btn-light { background: #fff; color: var(--accent); }

.btn-light:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(23, 26, 38, .18); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .65); }

.btn-outline-light:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }

/* 渐变条幅内需覆盖 .cta-band .btn 的白底默认 */
.cta-band .btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .65); }

.cta-band .btn-outline-light:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }

.hint.loose { margin-top: 16px; }

.checkbox-row.loose { margin-top: 8px; }

.w-120 { width: 120px; }

@media (max-width: 760px) {
  .to-top { right: 14px; bottom: 18px; }
}

/* ============ 在线购买页 ============ */
.buy-hero { background: linear-gradient(135deg, #eef0ff 0%, #f0fdf4 100%); padding: 48px 0 32px; }
.buy-card-main { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center; }
.buy-cover img, .buy-cover .cover-fallback { width: 200px; height: 200px; border-radius: 20px; object-fit: cover; box-shadow: 0 10px 30px rgba(99,102,241,0.15); }
.buy-cover .cover-fallback { display: grid; place-items: center; font-size: 60px; background: linear-gradient(135deg, #6366f1, #22c55e); color: #fff; font-weight: 800; }
.buy-badge { display: inline-block; padding: 5px 14px; background: rgba(99,102,241,0.1); color: #6366f1; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.buy-info h1 { font-size: 28px; margin: 0 0 8px; }
.buy-sub { color: #666; margin-bottom: 18px; }
.buy-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 14px; }
.buy-price .cur { font-size: 20px; font-weight: 700; color: #dc2626; }
.buy-price .num { font-size: 44px; font-weight: 800; color: #dc2626; line-height: 1; }
.buy-price .unit { color: #dc2626; font-weight: 600; }
.buy-price .ori { margin-left: 12px; font-size: 15px; color: #999; text-decoration: line-through; }
.buy-features { display: flex; flex-wrap: wrap; gap: 14px; }
.buy-features span { display: inline-flex; align-items: center; gap: 6px; color: #16a34a; font-weight: 600; font-size: 14px; }

.buy-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.buy-feature-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 18px; text-align: center; font-weight: 600; color: #333; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.buy-feature-card svg { color: #6366f1; }

.buy-flow { display: flex; align-items: center; justify-content: center; gap: 30px; margin: 30px 0 24px; }
.buy-step { display: flex; align-items: center; gap: 10px; color: #999; font-weight: 500; }
.buy-step .num { width: 30px; height: 30px; border-radius: 50%; background: #e5e7eb; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #6b7280; }
.buy-step.active { color: #6366f1; }
.buy-step.active .num { background: #6366f1; color: #fff; }

.buy-step-block { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 20px; }
.pay-title { font-size: 16px; font-weight: 700; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.pay-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.pay-tab { padding: 10px 20px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; }
.pay-tab.active { border-color: #6366f1; background: #eef0ff; color: #6366f1; }
.pay-qrcode-box { display: flex; justify-content: center; }
.pay-tab-pane { display: none; }
.pay-tab-pane.active { display: block; }
.pay-tab-pane img { width: 240px; height: 240px; border-radius: 12px; border: 1px solid var(--line); }
.pay-tip { margin-top: 16px; padding: 14px; background: #fef3c7; border-radius: 10px; font-size: 13px; color: #92400e; line-height: 1.7; }

.buy-form { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 20px; }
.buy-form-row { margin-bottom: 14px; }
.buy-form-row .req { color: #dc2626; font-weight: 600; }
.buy-submit { width: 100%; margin-top: 6px; background: linear-gradient(135deg, #6366f1, #22c55e) !important; }

.buy-service { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; text-align: center; }
.buy-service p { color: #666; font-size: 14px; line-height: 1.8; }
.service-contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 14px 0 8px; }
.service-contacts span { display: inline-flex; align-items: center; gap: 6px; color: #16a34a; font-weight: 600; font-size: 14px; }
.service-contacts b { cursor: pointer; }
.buy-query-link { margin-top: 12px; }
.buy-query-link a { color: #6366f1; font-weight: 600; }

.buy-faq-title { margin: 32px 0 16px; font-size: 20px; }
.buy-faq { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }
.buy-faq-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.buy-faq-item summary { padding: 16px 0; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.buy-faq-item summary::-webkit-details-marker { display: none; }
.buy-faq-item[open] summary { color: #6366f1; }
.buy-faq-item svg { transition: transform .2s; }
.buy-faq-item[open] svg { transform: rotate(180deg); }
.buy-faq-ans { padding: 0 0 16px; color: #555; line-height: 1.8; font-size: 14px; }

/* ==== 购买页增强（v1.6.0 第二批） ==== */
.buy-page .container { max-width: 1100px; }

/* hero 封面角标（折扣） */
.buy-cover { position: relative; }
.buy-cover-badge {
  position: absolute; top: 10px; right: 10px;
  background: linear-gradient(135deg, #dc2626, #f97316);
  color: #fff; padding: 4px 10px; border-radius: 6px;
  font-weight: 700; font-size: 13px; box-shadow: 0 4px 12px rgba(220,38,38,.3);
}

/* 价格区改造 */
.buy-price-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.buy-price-side { display: flex; flex-direction: column; gap: 2px; }
.buy-price .cur { font-size: 22px; }
.buy-price .num { font-size: 52px; }
.buy-price .unit { font-weight: 600; color: #16a34a; font-size: 14px; }
.buy-price .ori { font-size: 15px; color: #aaa; text-decoration: line-through; }
.save-tag {
  display: inline-block; padding: 2px 10px;
  background: #fef2f2; color: #dc2626; border-radius: 6px;
  font-weight: 600; font-size: 13px;
}

/* 步骤条箭头 */
.buy-flow { gap: 12px; }
.buy-flow-arrow { color: #d1d5db; font-weight: 700; }

/* 步骤圆圈数字（大号） */
.pay-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: #6366f1; color: #fff; font-weight: 700; font-size: 14px;
}

/* pay block 卡片更精致 */
.buy-step-block { box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.pay-block { border: 1px solid #e5e7eb; }

/* tab 按钮加图标 */
.pay-tab svg { margin-right: 6px; vertical-align: middle; }
.pay-tab { padding: 10px 18px; font-size: 14px; }

/* 收款码框：加标题+更精致 */
.pay-qrcode-box { gap: 20px; }
.qr-wrap { text-align: center; }
.qr-wrap img {
  width: 240px; height: 240px; border-radius: 14px;
  border: 2px solid #e5e7eb; padding: 10px; background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.qr-cap { margin-top: 10px; color: #6b7280; font-size: 13px; font-weight: 500; }

/* 无收款码：客服转账 fallback */
.pay-transfer {
  border: 2px dashed #c7d2fe; border-radius: 14px; padding: 20px;
  background: #f5f7ff;
}
.pay-transfer-title {
  font-weight: 700; font-size: 16px; color: #4338ca; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.pay-transfer-body p { color: #4b5563; font-size: 14px; line-height: 1.8; margin: 6px 0; }
.pay-transfer-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.pt-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #e0e7ff; border-radius: 10px;
  padding: 12px 16px;
}
.pt-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: #eef0ff; color: #6366f1;
  display: grid; place-items: center; flex-shrink: 0;
}
.pt-label { font-size: 12px; color: #6b7280; }
.pt-val { font-weight: 700; color: #1e293b; font-size: 16px; }
.pt-item .btn { flex-shrink: 0; }
.pay-transfer-hint { font-size: 12px; color: #92400e; background: #fef3c7; padding: 10px 12px; border-radius: 8px; }

/* ==== 付款两栏布局（v1.7.0） ==== */
.pay-price-off {
  margin-left: 8px; font-size: 12px; font-weight: 700;
  background: #dc2626; color: #fff; padding: 2px 8px; border-radius: 4px;
}
.pay-body {
  display: grid; grid-template-columns: 1fr 300px; gap: 28px;
  align-items: start;
}
.pay-left { display: flex; flex-direction: column; gap: 16px; }
.pay-right {
  background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
  border: 1px solid #e0e7ff; border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.pay-right .pay-qrcode-box { display: flex; justify-content: center; }
.qr-amount-badge {
  text-align: center;
  background: linear-gradient(135deg, #dc2626, #ea580c);
  color: #fff; padding: 10px 20px; border-radius: 12px;
  box-shadow: 0 4px 14px rgba(220,38,38,.25);
}
.qab-label { display: block; font-size: 12px; opacity: .9; margin-bottom: 2px; }
.qab-price { display: block; font-size: 26px; font-weight: 800; line-height: 1; }
.qr-label { text-align: center; color: #6366f1; font-weight: 600; font-size: 13px; margin-top: 6px; }

/* 左栏信息条 */
.pay-left-info {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 12px 14px;
}
.pli-item { display: flex; flex-direction: column; gap: 2px; }
.pli-label { font-size: 12px; color: #64748b; }
.pli-val { font-size: 15px; font-weight: 700; color: #1e293b; }
.pli-old { color: #94a3b8; text-decoration: line-through; font-weight: 500; }

/* 右侧二维码更大 */
.pay-right .qr-wrap img { width: 220px; height: 220px; }

/* 表单增强 */
.buy-form { background: #fff5f5; border: 1px solid #fecaca; }
.buy-form-row { margin-bottom: 18px; }
.buy-form-row label { display: block; font-weight: 600; color: #1f2937; margin-bottom: 6px; }
.buy-form-row .req { color: #dc2626; }
.form-tip { display: block; font-weight: 400; color: #6b7280; font-size: 12px; margin-top: 2px; }
.buy-form-note {
  margin: 10px 0 16px; padding: 10px 14px;
  background: #fffbeb; border-radius: 8px; font-size: 13px; color: #92400e;
  display: flex; gap: 6px; align-items: center;
}

.buy-submit {
  width: 100%; padding: 14px; font-size: 16px; font-weight: 700;
  background: linear-gradient(135deg, #dc2626, #ea580c) !important;
  border: none;
}
.buy-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(220,38,38,.25); }

/* 客服联系卡片 */
.buy-service-title { font-weight: 700; font-size: 15px; margin-bottom: 12px; color: #374151; display: flex; align-items: center; gap: 8px; }
.sc-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; background: #f3f4f6; border-radius: 999px;
  font-size: 13px; color: #4b5563; font-weight: 500;
}
.sc-item b { color: #6366f1; font-weight: 700; cursor: pointer; }

/* work_card 价格标签 */
.work-card .price-tag {
  display: inline-flex; align-items: baseline; gap: 4px;
  background: #fef2f2; color: #dc2626; padding: 4px 10px; border-radius: 8px;
  font-weight: 700; font-size: 15px;
}
.work-card .price-tag .price-old {
  color: #9ca3af; font-weight: 400; font-size: 12px; text-decoration: line-through;
}

/* work_card card-actions 布局：价格+按钮同行 */
.work-card .card-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.work-card .card-actions .btn { flex: 0 0 auto; padding: 6px 14px; }

/* 响应式：手机端 */
@media (max-width: 720px) {
  .buy-hero { padding: 24px 0 20px; }
  .buy-card-main { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  .buy-cover img, .buy-cover .cover-fallback { width: 140px; height: 140px; margin: 0 auto; }
  .buy-cover { text-align: center; }
  .buy-info h1 { font-size: 22px; }
  .buy-price-row { justify-content: center; }
  .buy-price .num { font-size: 40px; }
  .buy-features { justify-content: center; }
  .buy-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .buy-flow { gap: 8px; font-size: 13px; }
  .pay-body { grid-template-columns: 1fr; }
  .pay-right .qr-wrap img { width: 200px; height: 200px; }
  .pay-left-info { grid-template-columns: 1fr 1fr; }
  .pay-qrcode-box img { width: 200px; height: 200px; }
  .qr-wrap img { width: 200px; height: 200px; }
  .service-contacts { flex-direction: column; align-items: stretch; gap: 8px; }
}

/* 查询激活码结果卡片 */
.code-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 14px; }
.code-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.code-head .price { color: #dc2626; font-weight: 700; }
.code-block { display: flex; align-items: center; gap: 10px; background: #f4f6ff; border-radius: 10px; padding: 14px; font-family: monospace; }
.code-label { font-weight: 600; color: #666; }
.code-val { flex: 1; font-size: 18px; font-weight: 700; color: #1e293b; letter-spacing: 1px; }
.code-meta { margin-top: 10px; color: #999; font-size: 13px; }

/* 后台购买管理 */
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-title { font-size: 20px; font-weight: 700; }
.panel-title-sm { font-weight: 700; margin-bottom: 12px; }
.panel-sub { color: #888; font-size: 13px; margin-top: 4px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 14px; background: #eef0ff; color: #6366f1; border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 600; }
.chip:hover { background: #dde1fe; }
