:root {
  --bg: #141416;
  --bg-soft: #1c1c20;
  --card: #232328;
  --card-2: #2c2c33;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f2f5;
  --dim: #9b9ba6;
  --accent: #ff4d8d;
  --accent-2: #ff8a3d;
  --radius: 16px;
  --maxw: 880px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ===== 顶栏 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 20, 22, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  height: 60px;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16.5px; letter-spacing: .5px; flex-shrink: 0; }
.logo .mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: #fff;
}
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; min-width: 0; flex-shrink: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 7px 12px; border-radius: 9px; font-size: 14px; color: var(--dim);
  white-space: nowrap; transition: color .18s, background .18s;
}
.nav a:hover { color: var(--text); background: var(--card); }
.nav a[aria-current="page"] { color: var(--text); background: var(--card); }

/* ===== 面包屑 ===== */
.crumbs { font-size: 12.5px; color: var(--dim); padding: 18px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs li::after { content: "/"; margin-left: 6px; opacity: .4; }
.crumbs li:last-child::after { content: ""; }
.crumbs a:hover { color: var(--accent); }

/* ===== 通用区块 ===== */
main { flex: 1; padding-bottom: 64px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.section-head h2 { font-size: 19px; font-weight: 700; letter-spacing: .4px; }
.section-head .more { margin-left: auto; font-size: 13px; color: var(--dim); }
.section-head .more:hover { color: var(--accent); }

h1 { font-size: 25px; line-height: 1.35; font-weight: 800; letter-spacing: .3px; }

/* ===== 首页 hero ===== */
.hero { padding: 44px 0 8px; }
.hero h1 { font-size: 30px; }
.hero .brand { background: linear-gradient(135deg, #ff8fb0, var(--accent) 55%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { margin-top: 14px; color: var(--dim); font-size: 14.5px; max-width: 620px; }
.hero .cta { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), #ff6b9d);
  color: #fff; border: none; cursor: pointer; transition: transform .12s, filter .2s;
}
.btn:active { transform: scale(.98); filter: brightness(.92); }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: rgba(255,77,141,.4); }

/* ===== 作品网格 ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.work-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s;
  display: flex; flex-direction: column;
}
.work-card:hover { transform: translateY(-3px); border-color: rgba(255,77,141,.35); box-shadow: 0 14px 34px -16px rgba(255,77,141,.5); }
.work-card .cover { aspect-ratio: 3/4; overflow: hidden; background: var(--bg-soft); }
.work-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.work-card .body { padding: 13px 15px 15px; }
.work-card h3 { font-size: 15.5px; font-weight: 700; }
.work-card .meta { margin-top: 6px; font-size: 12px; color: var(--dim); }

/* ===== 章节列表 ===== */
.chapters { list-style: none; border-top: 1px solid var(--line); }
.chapters li { border-bottom: 1px solid var(--line); }
.chapters a, .chapters .chapter-off {
  display: flex; align-items: center; gap: 14px; padding: 15px 4px;
  font-size: 14.5px; transition: background .15s;
}
.chapters a:hover { background: var(--bg-soft); }
.chapters .chapter-off { color: var(--dim); }
.chapters .no { color: var(--dim); font-variant-numeric: tabular-nums; min-width: 46px; font-size: 13px; }
.chapters .t { flex: 1; }
.chapters .d { color: var(--dim); font-size: 12.5px; white-space: nowrap; }

/* ===== 作品详情头 ===== */
.work-head { display: flex; gap: 24px; padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.work-head .cover { width: 150px; flex-shrink: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.work-head .cover img { width: 100%; height: auto; }
.work-head .info { min-width: 0; }
.work-head .tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: rgba(255,77,141,.12); color: #ffb3cc; border: 1px solid rgba(255,77,141,.25); }
.work-head .summary { margin-top: 14px; color: var(--dim); font-size: 14px; }
.work-head .facts { margin-top: 14px; font-size: 13px; color: var(--dim); display: flex; gap: 18px; flex-wrap: wrap; }

/* ===== 阅读器 ===== */
.reader { margin: 26px auto 0; max-width: 660px; display: flex; flex-direction: column; gap: 14px; }
.panel {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-soft);
}
.panel img { width: 100%; height: auto; display: block; }
.panel .ph {
  aspect-ratio: 3/4; display: grid; place-items: center;
  text-align: center; color: var(--dim); font-size: 13px; padding: 20px;
}
.panel .ph b { display: block; color: var(--text); font-size: 14px; margin-bottom: 6px; }
.panel .idx { position: absolute; top: 10px; left: 12px; font-size: 12px; color: var(--dim); }

.chapter-note {
  margin-top: 26px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 14px; color: var(--dim);
}
.chapter-note h2 { font-size: 15px; color: var(--text); margin-bottom: 8px; font-weight: 700; }

.chapter-nav { margin-top: 26px; display: flex; gap: 12px; }
.chapter-nav a, .chapter-nav span {
  flex: 1; text-align: center; padding: 13px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); font-size: 14px;
}
.chapter-nav a:hover { border-color: rgba(255,77,141,.4); }
.chapter-nav .disabled { color: var(--dim); opacity: .45; }

/* ===== 正文页（关于/下载） ===== */
.prose { margin-top: 24px; font-size: 15px; color: #dcdce2; }
.prose h2 { font-size: 18px; margin: 30px 0 12px; font-weight: 700; color: var(--text); }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 14px 20px; }
.prose li { margin-bottom: 8px; color: var(--dim); }

.dl-card {
  margin-top: 22px; padding: 22px; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--line);
}
.dl-card h3 { font-size: 16px; margin-bottom: 6px; }
.dl-card .sub { font-size: 13px; color: var(--dim); margin-bottom: 16px; }

.note-box {
  margin-top: 22px; padding: 16px 18px; border-radius: 14px;
  background: rgba(255,138,61,.08); border: 1px solid rgba(255,138,61,.25);
  font-size: 13.5px; color: #ffcaa4;
}

/* ===== 讨论区二维码 ===== */
.qr-card {
  margin-top: 26px; padding: 22px; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--line);
  display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap;
}
.qr-card > img {
  width: 230px; height: auto; flex-shrink: 0; border-radius: 12px;
  background: #fff; padding: 8px; border: 1px solid var(--line);
}
.qr-info { flex: 1; min-width: 240px; }
.qr-info h2 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.qr-info ol { margin: 0 0 16px 20px; font-size: 14px; color: var(--dim); }
.qr-info li { margin-bottom: 8px; }
.qr-id { font-size: 14px; color: var(--text); }
.qr-id b { color: var(--accent); letter-spacing: 1px; }
.qr-tip { margin-top: 10px; font-size: 12.5px; color: var(--dim); }
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .92em; padding: 1px 6px; border-radius: 5px;
  background: var(--card-2); color: #ffb3cc;
}
.qr-inline { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr-inline img {
  width: 150px; height: auto; flex-shrink: 0; border-radius: 10px;
  background: #fff; padding: 6px; border: 1px solid var(--line);
}

/* ===== 页脚 ===== */
.site-footer {
  border-top: 1px solid var(--line); padding: 28px 0; margin-top: auto;
  font-size: 12.5px; color: var(--dim);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .hero { padding: 30px 0 4px; }
  .hero h1 { font-size: 24px; }
  .work-head { flex-direction: column; gap: 16px; }
  .work-head .cover { width: 118px; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .nav { gap: 0; }
  .site-header .wrap { height: 54px; gap: 8px; }
  .logo { font-size: 14.5px; }
}

/* ===================================================================
   首页单页落地版式
   =================================================================== */
.landing main { padding: 0 0 48px; }
.landing .wrap { max-width: 480px; }

.landing-inner {
  padding: 34px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 频道徽章 */
.channel-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500; letter-spacing: .5px;
  color: #ffd6e6;
  background: rgba(255, 77, 141, .12);
  border: 1px solid rgba(255, 77, 141, .28);
  transition: background .2s ease;
}
.channel-badge:hover { background: rgba(255, 77, 141, .2); }
.channel-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* App 图标 */
.icon-box { position: relative; margin: 30px 0 20px; }
.icon-box img {
  width: 112px; height: 112px; border-radius: 26px;
  object-fit: cover; display: block; background: var(--card);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06),
              0 18px 50px -12px rgba(255,77,141,.45),
              0 6px 24px rgba(0,0,0,.5);
}
.icon-box::after {
  content: ""; position: absolute; inset: -6px; border-radius: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  z-index: -1; filter: blur(18px); opacity: .45;
}

/* 标题 */
.app-name { font-size: 28px; font-weight: 800; letter-spacing: 1px; line-height: 1.2; }
.app-name .brand {
  background: linear-gradient(135deg, #ff7a9c, var(--accent) 55%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.app-cat { margin-top: 10px; font-size: 14px; color: var(--dim); letter-spacing: 1px; }
.app-cat b { color: var(--text); font-weight: 600; }

/* 简介 */
.app-intro {
  margin-top: 20px; font-size: 13.5px; color: var(--dim);
  letter-spacing: .3px; line-height: 1.85; max-width: 400px;
}

/* 作品链接条 */
.friends { margin-top: 24px; width: 100%; }
.friends-label {
  font-size: 12px; color: var(--dim); letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px; justify-content: center;
}
.friends-label::before, .friends-label::after {
  content: ""; width: 28px; height: 1px; background: var(--line);
}
.friends-list { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.friend-link {
  padding: 7px 14px; border-radius: 999px;
  font-size: 12.5px; color: var(--dim);
  background: var(--bg-soft); border: 1px solid var(--line);
  transition: color .2s, border-color .2s, background .2s;
}
.friend-link:hover {
  color: var(--text);
  border-color: rgba(255,77,141,.4);
  background: var(--card);
}

/* 数据卡 */
.stat {
  margin-top: 28px; width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,77,141,.14), rgba(255,122,0,.10));
  border: 1px solid rgba(255,77,141,.22);
  text-align: left;
}
.stat-num {
  font-size: 34px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, #ff7a9c, var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.stat-num small { font-size: 16px; font-weight: 700; -webkit-text-fill-color: var(--accent-2); }
.stat-txt { font-size: 13.5px; color: var(--text); letter-spacing: .5px; }
.stat-txt span { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }

/* 三宫格 */
.features {
  margin-top: 22px; width: 100%;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.feature {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 10px 16px; border-radius: 16px;
  background: var(--bg-soft); border: 1px solid var(--line);
  text-align: center;
}
.feature .fi {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-2);
}
.feature .fi svg { width: 22px; height: 22px; }
.feature .ft { font-size: 14px; font-weight: 600; letter-spacing: .5px; }
.feature .fs { font-size: 11px; color: var(--dim); letter-spacing: .3px; }
.fi-pink svg { color: #ff7a9c; }
.fi-blue svg { color: #7aa2ff; }
.fi-amber svg { color: #ffc56b; }

/* 下载按钮 */
.btns { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; width: 100%; }
.dlbtn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 16px 20px; border-radius: 16px;
  font-size: 17px; font-weight: 600; letter-spacing: .5px;
  color: #fff; text-align: left; position: relative;
  transition: transform .12s ease, filter .2s ease;
}
.dlbtn:active { transform: scale(.98); filter: brightness(.9); }
.dlbtn .bi {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px; background: rgba(255,255,255,.14);
}
.dlbtn .bi svg { width: 22px; height: 22px; }
.dlbtn .btx { display: flex; flex-direction: column; line-height: 1.25; }
.dlbtn .btx .sub { font-size: 12px; font-weight: 400; opacity: .85; letter-spacing: .5px; }
.dlbtn .arr { margin-left: auto; font-size: 20px; opacity: .8; flex-shrink: 0; }
.dlbtn-android {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 12px 30px -8px rgba(16,185,129,.5);
}
.dlbtn-ios {
  background: linear-gradient(135deg, #f472b6, #ff4d8d);
  box-shadow: 0 12px 30px -8px rgba(255,77,141,.5);
}
.dlbtn-web {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  box-shadow: 0 12px 30px -8px rgba(99,102,241,.5);
}

/* 版本信息 */
.meta {
  margin-top: 20px; font-size: 12px; color: var(--dim);
  letter-spacing: .5px; text-align: center;
}
.meta .sep { margin: 0 8px; opacity: .5; }

@media (max-width: 640px) {
  .landing-inner { padding-top: 26px; }
  .app-name { font-size: 24px; }
  .features { gap: 9px; }
  .feature { padding: 16px 6px 13px; }
}
