/* ==========================================================================
   soupiancili.com「磁力搜片」- 前台样式
   版式：左侧固定功能栏 + 右侧内容区（骨架参考 cldq，配色与装饰独立设计）
   主题色：墨绿 #0b3b36 / 青碧 #0f766e → #14b8a6 ＋ 琥珀金 #d97706（暖砂纸底）
   内容全部由 PHP 服务端渲染，样式层不依赖任何 JS 框架
   ========================================================================== */

:root {
  /* 主色：墨绿 / 青碧（与参考站的紫粉系完全区分） */
  --accent: #0f766e;
  --accent-2: #0d9488;
  --accent-soft: #14b8a6;
  --accent-deep: #115e59;
  --accent-dark: #0b3b36;
  /* 点缀色：琥珀金（暖砂纸底 + 原木质感） */
  --gold: #d97706;
  --gold-2: #f59e0b;
  --gold-soft: #fdf5e6;
  --dark: #0b3b36;
  --dark-2: #061815;
  --text: #1f302c;
  --muted: #5f6f6a;
  --faint: #94a39d;
  --card: #fffdf8;
  --border: #e9e1d2;
  --border-strong: #d9cbb2;
  --bg-1: #faf7f0;
  --bg-2: #f4efe3;
  --sidebar-w: 226px;
  --radius: 18px;
  --shadow: 0 18px 42px -30px rgba(11, 59, 54, .38);
  --grad: linear-gradient(90deg, #0f766e 0%, #14b8a6 100%);
  --grad-gold: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  --grad-deep: linear-gradient(135deg, #0d9488 0%, #0f766e 55%, #0b3b36 100%);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  background:
    repeating-linear-gradient(135deg, rgba(11, 59, 54, .035) 0 1px, transparent 1px 9px),
    radial-gradient(680px 380px at 84% 2%, rgba(217, 119, 6, .13), transparent 64%),
    radial-gradient(820px 460px at 98% 44%, rgba(13, 148, 136, .11), transparent 62%),
    radial-gradient(640px 460px at 14% 88%, rgba(11, 59, 54, .09), transparent 66%),
    linear-gradient(160deg, #faf7f0 0%, #f3eee2 48%, #f8f4ea 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; border: 0; }
h1, h2, h3 { line-height: 1.35; }
ol, ul { margin: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.muted { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 26px 4px; text-align: center; }
code { background: #e8f3ef; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: var(--accent); }

/* ==========================================================
   左侧固定功能栏
   ========================================================== */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 14px 16px;
  background: linear-gradient(180deg, #123a33 0%, var(--dark) 46%, var(--dark-2) 100%);
  box-shadow: 8px 0 34px -26px rgba(3, 16, 13, .95);
  overflow-y: auto;
}
/* 顶部琥珀细线 + 底部暖光：与参考站区分的视觉记号 */
.sidebar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #f59e0b, #0f766e 72%);
  opacity: .9; pointer-events: none;
}
.sidebar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 210px;
  background: radial-gradient(circle at 18% 100%, rgba(245, 158, 11, .11), transparent 72%);
  pointer-events: none;
}
@media (max-width: 900px) {
  .sidebar::before, .sidebar::after { display: none; }
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 4px; }

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 15px; margin-bottom: 10px; border-bottom: 1px solid rgba(245, 158, 11, .2); }
.brand-img {
  flex: none; width: 38px; height: 38px; border-radius: 50%; object-fit: contain;
  background: var(--grad-gold);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 22px -12px rgba(234, 88, 12, .9);
}
.brand-glyph { font-size: 19px; font-weight: 800; color: #fffaf0; line-height: 1; }
.brand-text { font-size: 17px; font-weight: 800; color: #fff; letter-spacing: .5px; line-height: 1.2; }
.brand-text::after { content: "RESOURCE INDEX"; display: block; font-size: 8.5px; letter-spacing: 1.5px; color: rgba(245, 158, 11, .72); font-weight: 500; }

.side-nav { display: flex; flex-direction: column; gap: 3px; }
.sn-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: 12px;
  font-size: 14.5px; color: #a9c6bd;
  transition: background .16s, color .16s, transform .16s;
}
.sn-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sn-item.active {
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  color: #fff; font-weight: 600;
  box-shadow: 0 12px 24px -14px rgba(20, 184, 166, .8);
}
.sn-ico { flex: none; width: 20px; text-align: center; font-size: 14px; line-height: 1; filter: saturate(1.2); }
.sn-label { white-space: nowrap; }

.side-search { margin: 16px 2px 0; }
.side-search form {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px; padding: 3px 3px 3px 12px;
}
.side-search input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
  color: #fff; font-size: 13px; height: 30px; font-family: inherit;
}
.side-search input::placeholder { color: #7f9a92; }
.side-search button {
  flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.side-search button:hover { filter: brightness(1.08); }

.side-foot { margin-top: auto; padding: 18px 8px 0; display: flex; flex-direction: column; gap: 6px; }
.side-foot a { font-size: 12.5px; color: #7f9a92; }
.side-foot a:hover { color: #fff; }

/* ==========================================================
   右侧内容区
   ========================================================== */
.content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 26px 34px 0;
}
.content > * { max-width: 1160px; margin-left: auto; margin-right: auto; }

/* 锚点跳转时给固定顶栏留出空间 */
section[id] { scroll-margin-top: 14px; }
@media (max-width: 900px) {
  section[id] { scroll-margin-top: 66px; }
}

/* ---------- 首屏 ---------- */
.hero { position: relative; text-align: center; padding: 46px 10px 40px; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: -50px; width: min(780px, 98%); height: 400px;
  transform: translateX(-50%); pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 48% 38%, rgba(13, 148, 136, .16), transparent 62%),
    radial-gradient(ellipse at 64% 20%, rgba(217, 119, 6, .13), transparent 58%);
}
.hero > * { position: relative; z-index: 1; }
.hero-title {
  margin: 0 0 16px;
  font-size: clamp(38px, 5.2vw, 62px);
  font-weight: 800; letter-spacing: 4px;
  background: linear-gradient(92deg, #0b3b36 0%, #0f766e 46%, #0d9488 88%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--accent);
}
.hero-sub {
  margin: 0 auto; max-width: 780px;
  font-size: 14.5px; line-height: 2; color: #5f6f6a;
}
.hero-search {
  display: flex; align-items: center; gap: 10px;
  max-width: 760px; margin: 30px auto 0;
  background: var(--card); border: 1px solid #efe7d8; border-radius: 999px;
  padding: 8px 8px 8px 20px;
  box-shadow: 0 20px 44px -26px rgba(15, 118, 110, .55), 0 2px 6px rgba(15, 118, 110, .05);
}
.hs-icon { flex: none; color: var(--faint); display: inline-flex; }
.hs-input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
  height: 46px; font-size: 15px; color: var(--text); font-family: inherit;
}
.hs-input::placeholder { color: #a9b7b1; }
.hs-btn {
  flex: none; min-width: 46px; height: 46px; padding: 0 16px;
  border: 0; border-radius: 999px; cursor: pointer; font-family: inherit;
  background: var(--grad-gold); color: #fff; font-size: 14.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 14px 26px -14px rgba(217, 119, 6, .6);
}
.hs-btn:hover { filter: brightness(1.07); }
.hs-btn span { display: none; }

.hero-quick { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-quick a {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid #efe7d8; border-radius: 999px;
  padding: 9px 21px; font-size: 14.5px; color: #2f423c;
  box-shadow: 0 12px 26px -22px rgba(15, 118, 110, .65);
  transition: transform .16s, box-shadow .16s, color .16s;
}
.hero-quick a:hover { transform: translateY(-2px); color: var(--accent); box-shadow: 0 18px 30px -22px rgba(15, 118, 110, .8); }
.hero-quick span { font-size: 15px; }
.hero-stats { margin: 18px 0 0; font-size: 13px; color: #7d8f89; }
.hero-stats b { color: var(--accent); font-size: 15px; margin: 0 2px; }

/* ---------- 区块通用 ---------- */
.block { margin-bottom: 40px; }
.block-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.block-title {
  margin: 0; font-size: 21px; font-weight: 700; display: inline-flex; align-items: center; gap: 10px;
}
.block-title::before {
  content: ""; width: 6px; height: 20px; border-radius: 4px; background: var(--grad-gold); display: inline-block;
}
.block-sub { font-size: 13px; color: var(--faint); }
.block-more { margin-left: auto; font-size: 13px; color: var(--accent); }
.block-more:hover { color: var(--gold); }
.sub-title { font-size: 15px; margin: 0 0 12px; color: #2f423c; padding-left: 10px; border-left: 3px solid var(--accent-2); }

/* ---------- 题材分类 ---------- */
.genre-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.genre-card {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 18px; box-shadow: var(--shadow);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.genre-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: 0 24px 40px -30px rgba(15, 118, 110, .7); }
.gc-ico { font-size: 20px; line-height: 1.2; }
.gc-name { font-size: 15.5px; font-weight: 700; color: var(--text); }
.genre-card:hover .gc-name { color: var(--accent); }
.gc-terms { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 热门推荐 ---------- */
.hot-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 18px; }
.hot-list { list-style: none; margin: 0; padding: 0; }
.hot-item {
  display: grid; grid-template-columns: 26px auto minmax(0, 1fr) auto auto;
  align-items: center; gap: 10px;
  padding: 12px 4px; border-bottom: 1px dashed var(--border);
}
.hot-item:last-child { border-bottom: none; }
.hot-no {
  width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 8px;
  background: #eef7f4; color: var(--faint); font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.hot-no.top { background: var(--grad); color: #fff; }
.hot-badge {
  display: inline-block; text-align: center; font-size: 12px; line-height: 20px;
  border-radius: 6px; padding: 0 7px; white-space: nowrap;
  background: #e8f3ef; color: var(--accent);
}
.hot-badge.is-tool { background: #fdf5e6; color: var(--gold); }
.hot-name { font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-name:hover { color: var(--accent); }
.hot-type { font-size: 12.5px; color: #87968f; white-space: nowrap; }
.hot-score { font-size: 12.5px; color: #a9b6b1; white-space: nowrap; }

.hot-arts { margin-top: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.hot-list.compact .hot-item { grid-template-columns: 26px minmax(0, 1fr) auto auto; padding: 9px 2px; }
.hot-list.compact .hot-name { font-size: 14px; }

/* ---------- 磁力站卡片 ---------- */
.site-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.site-card {
  display: flex; align-items: center; gap: 11px; min-width: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px; box-shadow: 0 10px 26px -26px rgba(11, 59, 54, .8);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.site-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: 0 20px 32px -28px rgba(11, 59, 54, .85); }
.sc-ico {
  flex: none; width: 36px; height: 36px; border-radius: 11px; background: #e8f3ef;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.sc-ico img { width: 22px; height: 22px; object-fit: contain; }
.ico-char { font-size: 16px; line-height: 1; }
.sc-body { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.sc-name { font-size: 14.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-desc { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-tags { font-size: 11.5px; color: var(--accent-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-go { flex: none; color: var(--border-strong); font-size: 18px; }
.site-card:hover .sc-go { color: var(--gold); }

/* ---------- 网站简介 ---------- */
.about-text p { margin: 0 0 12px; color: #4d5f59; font-size: 14.5px; line-height: 2; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 20px 18px; box-shadow: var(--shadow);
}
.fc-ico { font-size: 22px; }
.fc-title { margin: 8px 0 6px; font-size: 15.5px; }
.fc-desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.85; }
.tool-box { margin-top: 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }

/* ---------- 精选资源 ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feat-card {
  display: flex; flex-direction: column; overflow: hidden; background: #fff;
  border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
  transition: transform .16s, box-shadow .16s;
}
.feat-card:hover { transform: translateY(-3px); box-shadow: 0 26px 44px -32px rgba(11, 59, 54, .8); }
.feat-cover {
  height: 104px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(135deg, #0d9488, #0f766e 65%, #0b3b36);
  color: #fff; font-size: 15px; letter-spacing: 1px; position: relative;
}
.feat-cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(2px 2px at 22% 30%, rgba(255,255,255,.5), transparent),
                    radial-gradient(2px 2px at 70% 66%, rgba(255,255,255,.38), transparent),
                    radial-gradient(1.6px 1.6px at 44% 76%, rgba(255,255,255,.3), transparent);
}
.feat-cover em { position: relative; z-index: 1; font-style: normal; font-weight: 700; }
.feat-cover img { width: 100%; height: 100%; object-fit: cover; }
.feat-card:nth-child(2n) .feat-cover { background: linear-gradient(135deg, #f59e0b, #d97706 70%, #b45309); }
.feat-card:nth-child(3n) .feat-cover { background: linear-gradient(135deg, #115e59, #0b3b36 70%, #06201c); }
.feat-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 4px; }
.feat-title { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.55; }
.feat-card:hover .feat-title { color: var(--accent); }
.feat-meta { font-size: 12px; color: var(--faint); }
.feat-tags { font-size: 11.5px; color: var(--accent-2); }

/* ---------- 相关资讯 ---------- */
.news-list { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 20px; }
.news-item {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center; gap: 16px; padding: 15px 2px; border-bottom: 1px dashed var(--border);
}
.news-item:last-child { border-bottom: none; }
.news-date { font-size: 12.5px; color: var(--faint); }
.news-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.news-title { font-size: 15px; font-weight: 600; color: var(--text); }
.news-item:hover .news-title { color: var(--accent); }
.news-desc { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-more { font-size: 13px; color: var(--accent-2); white-space: nowrap; }
.news-tip { margin: 14px 2px 0; font-size: 13px; color: #7d8f89; }
.news-tip a { color: var(--accent); text-decoration: underline; }

/* ---------- 用户评价 ---------- */
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.review-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 18px; box-shadow: var(--shadow);
}
.rv-head { display: flex; align-items: center; gap: 10px; }
.rv-avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-size: 15px; font-weight: 700;
}
.rv-who { display: flex; flex-direction: column; min-width: 0; }
.rv-nick { font-size: 14px; font-weight: 600; color: var(--text); }
.rv-time { font-size: 12px; color: var(--faint); }
.rv-tag { margin-left: auto; font-size: 12px; color: var(--gold); background: #fdf5e6; border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.rv-text { margin: 10px 0 8px; font-size: 13.5px; line-height: 1.85; color: #4d5f59; }
.rv-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }

/* ==========================================================
   内页通用组件
   ========================================================== */
.page-hero {
  border-radius: 20px; padding: 26px 26px 24px; margin-bottom: 20px;
  color: #fff; background:
    radial-gradient(circle at 88% 0%, rgba(245, 158, 11, .4), transparent 52%),
    linear-gradient(120deg, #0b3b36 0%, #0f766e 52%, #14b8a6 100%);
  box-shadow: 0 26px 48px -36px rgba(11, 59, 54, .95);
}
.page-hero h1 { margin: 0 0 6px; font-size: 23px; }
.page-hero p { margin: 0; font-size: 13.5px; color: #d7ece5; }
.page-hero .ph-tags { margin-top: 13px; display: flex; gap: 8px; flex-wrap: wrap; }
.page-hero .ph-tags a {
  font-size: 12.5px; color: #fff; background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .24); border-radius: 999px; padding: 3px 13px;
}
.page-hero .ph-tags a:hover { background: #fff; color: var(--accent); }

.mod {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.mod-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.mod-title { font-size: 18px; margin: 0; display: flex; align-items: center; gap: 9px; }
.mod-title .bar { width: 4px; height: 17px; border-radius: 3px; background: var(--grad); display: inline-block; }
.mod-title .mod-ico { font-style: normal; font-size: 16px; }
.mod-tip { font-size: 12px; color: var(--faint); }
.mod-more { font-size: 13px; color: var(--accent); }
.mod-sub { margin: -6px 0 14px; font-size: 13px; color: var(--muted); }

.link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 26px; }
.link-group { min-width: 0; }
.lg-title { font-size: 13px; margin: 0 0 10px; display: flex; align-items: baseline; gap: 6px; padding-bottom: 6px; border-bottom: 1px dashed var(--border); }
.lg-main { color: var(--faint); font-weight: 400; }
.lg-sub { color: var(--accent); font-weight: 700; }
.lg-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; }
.lg-list li { min-width: 0; }
.lg-list a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; font-size: 14px; color: #2f423c; }
.lg-list a:hover { background: #eef7f4; color: var(--accent); }
.lg-ico { flex: none; width: 28px; height: 28px; border-radius: 9px; background: #e8f3ef; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.lg-ico img { width: 20px; height: 20px; object-fit: contain; }
.lg-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.col-main { min-width: 0; }
.col-side { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px;
  background: #eef7f4; color: #6f6390; border: 1px solid transparent; white-space: nowrap;
}
.chip:hover { background: #e6f2ee; color: var(--accent); border-color: var(--border-strong); }
.chip-cat { background: #eef7f4; color: var(--accent); }
.chip.current { background: var(--accent); color: #fff; }
.chip .cnt { margin-left: 5px; color: var(--faint); font-size: 11px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }

.art-list { display: grid; gap: 12px; }
.art-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 15px 17px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.art-card:hover { border-color: var(--border-strong); box-shadow: 0 18px 32px -30px rgba(11, 59, 54, .8); }
.art-title { font-size: 16px; margin: 0 0 5px; font-weight: 600; }
.art-title a { color: var(--text); }
.art-title a:hover { color: var(--accent); }
.art-summary { margin: 0 0 8px; color: var(--muted); font-size: 13.5px; }
.art-meta { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--faint); flex-wrap: wrap; }
.art-views { color: var(--faint); }

.pager { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 20px 0 4px; flex-wrap: wrap; }
.pg-btn {
  min-width: 36px; padding: 6px 11px; border-radius: 10px; background: #fff;
  border: 1px solid var(--border); font-size: 14px; text-align: center; color: #2f423c;
}
.pg-btn:hover { border-color: var(--accent-2); color: var(--accent); }
.pg-btn.current { background: var(--grad); color: #fff; border-color: transparent; }
.pg-btn.disabled { color: #c2cec8; background: #fbf8ff; }
.pg-gap { color: var(--faint); }
.pg-info { color: var(--faint); font-size: 12.5px; margin-left: 6px; }

.side-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.side-title { font-size: 15px; margin: 0 0 11px; padding-left: 9px; border-left: 3px solid var(--gold); }
.side-cats { list-style: none; margin: 0; padding: 0; }
.side-cats li + li { border-top: 1px dashed var(--border); }
.side-cats a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 2px; font-size: 14px; color: #2f423c; }
.side-cats a:hover, .side-cats a.current { color: var(--accent); }
.side-cats .cnt { font-size: 12px; color: var(--faint); }
.side-arts { list-style: none; margin: 0; padding: 0; }
.side-arts li { padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.side-arts li:last-child { border-bottom: none; }
.side-arts a { color: #2f423c; }
.side-arts a:hover { color: var(--accent); }

.detail {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 26px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.detail-title { font-size: 23px; margin: 0 0 10px; }
.detail-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; color: var(--faint); }
.detail-summary {
  margin: 0 0 16px; padding: 11px 14px; background: #f5faf8; border-left: 3px solid var(--gold);
  color: #4d5f59; border-radius: 0 10px 10px 0; font-size: 14px;
}

.rich { font-size: 15px; color: #26332f; }
.rich p { margin: 0 0 12px; }
.rich h2 { font-size: 17.5px; margin: 22px 0 9px; padding-left: 10px; border-left: 3px solid var(--accent-2); }
.rich h3 { font-size: 15.5px; margin: 17px 0 7px; color: var(--accent); }
.rich ul, .rich ol { padding-left: 22px; margin: 0 0 12px; }
.rich li { margin-bottom: 4px; }
.rich blockquote { margin: 0 0 12px; padding: 8px 14px; background: #f5faf8; border-left: 3px solid var(--border-strong); color: #4d5f59; }
.rich img { border-radius: 10px; margin: 8px 0; }
.rich table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 14px; }
.rich th, .rich td { border: 1px solid var(--border); padding: 7px 10px; }
.rich th { background: #f5faf8; }

.art-btn-wrap { margin: 0 0 22px; }
.art-so {
  display: inline-block; padding: 10px 22px; border-radius: 12px;
  background: var(--grad-gold); color: #fff; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 14px 26px -18px rgba(217, 119, 6, .85);
}
.art-so:hover { color: #fff; filter: brightness(1.06); }

.sd-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.sd-ico { flex: none; width: 54px; height: 54px; border-radius: 15px; background: #e8f3ef; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.sd-ico img { width: 34px; height: 34px; object-fit: contain; }
.sd-titling { min-width: 0; }
.sd-name { font-size: 22px; margin: 0 0 4px; }
.sd-sub { font-size: 13px; color: var(--faint); margin: 0; }
.sd-actions { margin: 16px 0 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-go {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: 12px;
  background: var(--grad); color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 16px 30px -20px rgba(217, 119, 6, .9);
}
.btn-go:hover { color: #fff; filter: brightness(1.06); }
.btn-ghost {
  display: inline-flex; align-items: center; padding: 11px 20px; border-radius: 12px;
  border: 1px solid var(--border-strong); color: var(--accent); font-size: 14px; background: #fff;
}
.btn-ghost:hover { border-color: var(--accent-2); }

.magnet-box { margin: 18px 0 0; border: 1px dashed var(--border-strong); border-radius: 14px; padding: 14px 16px; background: #f7fbf9; }
.magnet-box h3 { margin: 0 0 6px; font-size: 14px; color: var(--accent); }
.magnet-box p { margin: 0 0 8px; font-size: 12.5px; color: var(--faint); }
.magnet-code {
  display: block; font-family: Consolas, Menlo, monospace; font-size: 12.5px; line-height: 1.6;
  word-break: break-all; background: #fff; border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 11px; color: #2f423c;
}

.breadcrumb { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: '/'; color: #c2cec8; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

.inline-search { display: flex; gap: 8px; margin-bottom: 16px; }
.inline-search input {
  flex: 1 1 auto; min-width: 0; border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; font-size: 14px; font-family: inherit; outline: none; background: #fff;
}
.inline-search input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(13, 148, 136, .13); }
.inline-search button {
  flex: none; border: 0; border-radius: 12px; padding: 0 22px; cursor: pointer;
  font-family: inherit; font-size: 14px; background: var(--grad); color: #fff;
}
.nf-wrap { text-align: center; }
.nf-wrap .inline-search { max-width: 480px; margin: 0 auto 4px; }

.site-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.site-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; min-width: 0; background: #fff; }
.site-item:hover { border-color: var(--border-strong); background: #f7fbf9; }
.site-ico { flex: none; width: 30px; height: 30px; border-radius: 9px; background: #e8f3ef; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.site-body { min-width: 0; flex: 1 1 auto; }
.site-name { display: block; font-size: 14.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-url { display: block; font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rank-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.rank-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--border); }
.rank-title { font-size: 16px; margin: 0; display: flex; align-items: center; gap: 9px; font-weight: 700; }
.rank-title .bar { width: 4px; height: 15px; border-radius: 3px; background: var(--grad); display: inline-block; }
.rank-more { font-size: 13px; color: var(--accent); white-space: nowrap; }
.rank-tip { font-size: 12px; color: var(--faint); white-space: nowrap; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-item { border-bottom: 1px dashed var(--border); }
.rank-item:last-child { border-bottom: none; }
.rank-item a { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; min-width: 0; }
.rank-item a:hover { background: #f2f9f6; }
.rank-no { flex: none; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 6px; background: #eef7f4; color: var(--faint); font-size: 11.5px; font-weight: 600; }
.rank-no.top { background: var(--grad); color: #fff; }
.rank-name { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; color: var(--text); }
.rank-item a:hover .rank-name { color: var(--accent); }
.rank-meta { flex: none; font-size: 12px; color: var(--faint); }

/* ==========================================================
   页脚（与内容区对齐）
   ========================================================== */
.site-footer {
  margin-left: var(--sidebar-w); padding: 30px 34px 24px;
  background: linear-gradient(180deg, #0d302b 0%, #071a17 100%);
  color: #cfe2db; border-top: 3px solid rgba(217, 119, 6, .45);
}
.footer-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 24px;
}
.foot-title { font-size: 14px; color: #fff; margin: 0 0 10px; }
.foot-about p { margin: 0; font-size: 12.8px; color: #9dbcb2; line-height: 1.8; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.foot-links a { font-size: 13px; color: #9dbcb2; }
.foot-links a:hover { color: #f5b64a; }
.foot-bottom { max-width: 1160px; margin: 22px auto 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); text-align: center; color: #7fa199; font-size: 12.5px; }
.foot-bottom p { margin: 4px 0; }
.foot-bottom a { color: #9dbcb2; }

/* ==========================================================
   响应式
   ========================================================== */
@media (max-width: 1100px) {
  .genre-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .col-side { order: 2; }
  .news-item { grid-template-columns: 84px minmax(0, 1fr); }
  .news-more { display: none; }
}

@media (max-width: 900px) {
  .sidebar {
    position: sticky; top: 0; bottom: auto; width: 100%; height: auto;
    flex-direction: row; align-items: center; gap: 10px;
    padding: 8px 12px; overflow-x: auto;
  }
  .brand { padding: 0; margin: 0; border-bottom: 0; flex: none; gap: 8px; }
  .brand-text::after { display: none; }
  .brand-img { width: 30px; height: 30px; border-radius: 50%; }
  .brand-text { font-size: 15px; }
  .side-nav { flex-direction: row; gap: 4px; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .sn-item { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
  .sn-ico { width: auto; font-size: 13px; }
  .side-search, .side-foot { display: none; }
  .content { margin-left: 0; padding: 16px 14px 0; }
  .site-footer { margin-left: 0; padding: 24px 16px 22px; }
  .hero { padding: 26px 4px 30px; }
  .hero-title { letter-spacing: 2px; }
  .hero-sub { font-size: 13.5px; }
  .hero-search { padding: 6px 6px 6px 16px; }
  .hs-input { height: 42px; font-size: 14px; }
  .hs-btn { min-width: 42px; height: 42px; }
  .hero-quick a { padding: 8px 16px; font-size: 13.5px; }
  .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .review-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hot-item { grid-template-columns: 24px 46px minmax(0, 1fr); row-gap: 2px; }
  .hot-type, .hot-score { display: none; }
  .mod { padding: 16px 15px; }
  .detail { padding: 18px 16px; }
  .detail-title { font-size: 19px; }
  .page-hero { padding: 22px 18px; }
  .layout-side .two-col .col-side { order: 2; }
  .site-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .hero-quick a { padding: 7px 13px; font-size: 13px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
}

/* 工具分组：条目多时占满整行 */
.link-group.wide { grid-column: 1 / -1; }
.link-group.wide .lg-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .link-group.wide .lg-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .link-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .link-group.wide .lg-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
