/* ============================================================
   段子星 Hugo 主题 - 灰色基调 + Google 四色 + 星球视觉
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --bg: #F5F5F6;
  --bg-alt: #EDEDEF;
  --card: #FFFFFF;
  --card-hover: #FAFAFB;
  --text: #212121;
  --text-secondary: #757575;
  --text-tertiary: #9E9E9E;
  --border: #E8E8EA;
  --border-light: #F0F0F2;

  --blue: #4285F4;
  --red: #EA4335;
  --yellow: #FBBC05;
  --green: #34A853;

  --blue-light: rgba(66,133,244,0.1);
  --red-light: rgba(234,67,53,0.1);
  --yellow-light: rgba(251,188,5,0.12);
  --green-light: rgba(52,168,83,0.1);

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;

  --container: 720px;
  --container-wide: 1100px;
  --header-height: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--blue); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ---------- 容器 ---------- */
.container {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 20px;
}
.single-container { max-width: var(--container); }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: var(--container-wide);
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}
.logo:hover { color: var(--text); }
.logo-img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}
.logo-divider {
  width: 2px;
  height: 44px;
  background: var(--border);
  border-radius: 1px;
  flex-shrink: 0;
}
.logo-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.3px;
}
.logo-tagline {
  font-size: 12px;
  font-weight: 500;
  color: #424242;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* 星球 Logo */
.planet-logo {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-block;
}
.planet-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, #6B9DF7 50%, var(--green) 100%);
  box-shadow: 0 0 8px rgba(66,133,244,0.4);
}
.planet-orbit {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-20deg);
  width: 34px; height: 34px;
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: 50%;
}
.planet-dot {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
}
.dot-blue { top: 2px; left: 50%; transform: translateX(-50%); background: var(--blue); }
.dot-red { bottom: 4px; right: 2px; background: var(--red); }
.dot-yellow { top: 50%; left: 0; transform: translateY(-50%); background: var(--yellow); }
.dot-green { bottom: 2px; left: 6px; background: var(--green); }

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all .2s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg-alt); }
.nav-link.active { color: var(--blue); background: var(--blue-light); font-weight: 600; }

/* 分类导航专属颜色 */
.nav-link[data-cat="段子"] { color: #EA4335; }
.nav-link[data-cat="段子"]:hover { background: rgba(234,67,53,0.08); }
.nav-link[data-cat="段子"].active { background: #EA4335; color: #fff; }
.nav-link[data-cat="微段子"] { color: #4285F4; }
.nav-link[data-cat="微段子"]:hover { background: rgba(66,133,244,0.08); }
.nav-link[data-cat="微段子"].active { background: #4285F4; color: #fff; }
.nav-link[data-cat="毒鸡汤"] { color: #34A853; }
.nav-link[data-cat="毒鸡汤"]:hover { background: rgba(52,168,83,0.08); }
.nav-link[data-cat="毒鸡汤"].active { background: #34A853; color: #fff; }
.nav-link[data-cat="神秘现象"] { color: #FBBC05; }
.nav-link[data-cat="神秘现象"]:hover { background: rgba(251,188,5,0.1); }
.nav-link[data-cat="神秘现象"].active { background: #FBBC05; color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
}

/* ---------- 主内容 ---------- */
.main { min-height: calc(100vh - var(--header-height) - 120px); padding: 24px 0 48px; }

/* ---------- 首页布局 ---------- */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
.home-main { min-width: 0; }

/* 今日星选 */
.featured-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.featured-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--red), var(--yellow), var(--green));
}
.featured-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--yellow);
  background: var(--yellow-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.featured-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text);
}
.featured-excerpt {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}
.featured-meta { font-size: 13px; color: var(--text-tertiary); }

/* 卡片流 */
.stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.stream-title { font-size: 20px; font-weight: 700; }
.stream-hot-link { font-size: 14px; color: var(--red); font-weight: 600; }
.stream-hot-link:hover { color: var(--red); text-decoration: underline; }

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

/* 文章卡片 */
.post-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all .25s ease;
  border: 1px solid var(--border-light);
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.card-link { display: block; height: 100%; }
.card-link:hover { color: inherit; }
.card-cat-bar { height: 3px; width: 100%; }
.card-body { padding: 18px 20px; }
.card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.card-cat { font-size: 12px; font-weight: 600; }
.card-date { font-size: 12px; color: var(--text-tertiary); }
.card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.card-meta-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-views { font-size: 12px; color: var(--text-tertiary); }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-dot { font-size: 11px; color: var(--text-tertiary); }

/* 广告位 */
.ad-slot {
  width: 100%;
  min-height: 60px;
  margin: 8px 0;
  text-align: center;
  overflow: hidden;
}
.ad-infeed-wrapper {
  grid-column: 1 / -1;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  border: 1px dashed var(--border);
}
.ad-sidebar { padding: 0; }

/* ---------- 侧边栏 ---------- */
.home-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-widget {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.widget-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.random-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--red), #F06B5E);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.random-btn:hover { transform: scale(1.02); box-shadow: 0 4px 12px rgba(234,67,53,0.3); }
.random-btn:active { transform: scale(0.98); }

.hot-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 8px;
}
.hot-list li:last-child { border-bottom: none; }
.hot-list a {
  font-size: 13px;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hot-list a:hover { color: var(--blue); }
.hot-views { font-size: 11px; color: var(--text-tertiary); flex-shrink: 0; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 8px;
  background: var(--bg-alt);
  border-radius: 12px;
  transition: all .2s;
}
.tag-item:hover { color: var(--blue); background: var(--blue-light); }

/* ---------- 单篇文章 ---------- */
.single-post { position: relative; }
.single-cat-bar {
  height: 4px;
  width: 100%;
  position: sticky;
  top: var(--header-height);
  z-index: 50;
}
.single-container { padding-top: 32px; }
.single-header { margin-bottom: 28px; text-align: center; }
.single-cat {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border: 1.5px solid;
  border-radius: 20px;
  margin-bottom: 16px;
}
.single-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}
.single-post.title-as-content .single-title {
  font-size: 26px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--text);
}
.single-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-tertiary);
}
.single-content {
  font-size: 18px;
  line-height: 2;
  color: var(--text);
  padding: 24px 0;
}
.single-content p { margin-bottom: 1.2em; }
.single-content p:last-child { margin-bottom: 0; }
.single-content h2, .single-content h3 { margin: 1.5em 0 0.8em; font-weight: 700; }
.single-content ul, .single-content ol { margin: 1em 0; padding-left: 1.5em; }
.single-content li { margin-bottom: 0.5em; }
.single-content blockquote {
  border-left: 3px solid var(--blue);
  padding: 8px 16px;
  margin: 1em 0;
  color: var(--text-secondary);
  background: var(--blue-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.single-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
}
.single-content img { border-radius: var(--radius); margin: 1em auto; }

/* 标签 */
.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}
.single-tag {
  font-size: 13px;
  color: var(--green);
  background: var(--green-light);
  padding: 5px 12px;
  border-radius: 16px;
  font-weight: 500;
  transition: all .2s;
}
.single-tag:hover { background: var(--green); color: #fff; }

/* 文章导航 */
.post-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  margin: 36px 0 16px;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all .25s;
  min-height: 72px;
}
.nav-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.nav-prev { border-left: 4px solid var(--blue); }
.nav-prev:hover { border-left-color: var(--blue); background: var(--blue-light); }
.nav-next { border-right: 4px solid var(--green); justify-content: flex-end; text-align: right; }
.nav-next:hover { border-right-color: var(--green); background: var(--green-light); }
.nav-random {
  border-top: 4px solid var(--red);
  flex-direction: column;
  gap: 4px;
  text-align: center;
  padding: 14px 16px;
}
.nav-random:hover { border-top-color: var(--red); background: var(--red-light); }
.nav-arrow { font-size: 20px; flex-shrink: 0; }
.nav-text { display: flex; flex-direction: column; min-width: 0; }
.nav-label { font-size: 11px; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.nav-btn.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* 键盘提示 */
.keyboard-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}
.keyboard-hint kbd {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--border);
  margin: 0 2px;
}

/* ---------- 列表页 ---------- */
.list-header { text-align: center; margin-bottom: 28px; }
.list-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.list-desc { font-size: 15px; color: var(--text-secondary); margin-bottom: 8px; }
.list-count { font-size: 13px; color: var(--text-tertiary); }

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.page-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all .2s;
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.page-numbers { display: flex; gap: 4px; }
.page-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all .2s;
}
.page-num:hover { border-color: var(--blue); color: var(--blue); }
.page-num.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.page-ellipsis { display: flex; align-items: center; color: var(--text-tertiary); padding: 0 4px; }

/* ---------- 分类/标签索引 ---------- */
.terms-container { padding-top: 20px; }
.terms-title { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 28px; }
.terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.term-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all .2s;
}
.term-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.term-name { font-size: 15px; font-weight: 600; }
.term-count { font-size: 12px; color: var(--text-tertiary); background: var(--bg-alt); padding: 2px 8px; border-radius: 10px; }

/* ---------- 热门页 ---------- */
.hots-container { padding-top: 20px; max-width: var(--container); }
.hots-title { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.hots-subtitle { text-align: center; font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }
.hots-list { display: flex; flex-direction: column; gap: 2px; }
.hots-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--card);
  border-radius: var(--radius-sm);
  transition: background .2s;
}
.hots-item:hover { background: var(--card-hover); }
.hots-rank {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.hots-rank.rank-top:nth-child(1) { background: var(--yellow); color: #fff; }
.hots-item:nth-child(1) .hots-rank { background: #FFD700; color: #fff; }
.hots-item:nth-child(2) .hots-rank { background: #C0C0C0; color: #fff; }
.hots-item:nth-child(3) .hots-rank { background: #CD7F32; color: #fff; }
.hots-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.hots-item-title {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hots-item-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-tertiary); }
.hots-cat { color: var(--blue); font-weight: 600; }

/* ---------- 标签云页 ---------- */
.tagcloud-container { padding-top: 20px; }
.tagcloud-title { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.tagcloud-subtitle { text-align: center; font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }
.tag-cloud-full {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.tag-cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all .2s;
}
.tag-cloud-item:hover { border-color: var(--yellow); color: var(--yellow); background: var(--yellow-light); }
.tag-cloud-count {
  font-size: 11px;
  color: var(--text-tertiary);
  background: var(--bg-alt);
  padding: 1px 6px;
  border-radius: 8px;
}

/* ---------- 404 ---------- */
.error-container {
  text-align: center;
  padding: 60px 20px;
  max-width: 500px;
}
.error-planet {
  position: relative;
  width: 120px; height: 120px;
  margin: 0 auto 32px;
}
.error-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 0 30px rgba(66,133,244,0.3);
  animation: float 3s ease-in-out infinite;
}
.error-orbit {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  width: 110px; height: 110px;
  border: 2px dashed var(--border);
  border-radius: 50%;
}
@keyframes float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-8px); }
}
.error-code {
  font-size: 72px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--red), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.error-text { font-size: 17px; color: var(--text-secondary); margin-bottom: 28px; }
.error-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.error-btn {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all .2s;
}
.error-btn:hover { border-color: var(--blue); color: var(--blue); }
.error-random { background: var(--red); border-color: var(--red); color: #fff; }
.error-random:hover { background: #D93A2C; color: #fff; }
.error-suggestion { font-size: 14px; color: var(--text-secondary); }
.error-suggest-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--blue);
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 48px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 14px; color: var(--text-secondary); }
.footer-links a:hover { color: var(--blue); }
.footer-friends {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  font-size: 13px;
}
.friends-label { color: var(--text-tertiary); }
.footer-friends a { color: var(--text-secondary); }
.footer-friends a:hover { color: var(--blue); }
.footer-copyright p { font-size: 13px; color: var(--text-tertiary); margin-bottom: 4px; }
.footer-copyright a { color: var(--text-tertiary); }
.footer-copyright a:hover { color: var(--blue); }
.icp { font-size: 12px; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--text); font-weight: 500; }

/* ---------- 相关文章 ---------- */
.related-posts {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.related-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.related-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.related-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card-meta { font-size: 12px; color: var(--text-tertiary); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-sidebar { position: static; order: 2; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 64px; }
  .logo-img { width: 44px; height: 44px; }
  .logo-divider { height: 36px; }
  .logo-name { font-size: 15px; }
  .logo-tagline { font-size: 11px; }
  .container { padding: 0 16px; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--card);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    gap: 2px;
  }
  .site-nav.open { display: flex; }
  .nav-link { padding: 10px 14px; font-size: 15px; }
  .nav-toggle { display: flex; }

  .featured-card { padding: 24px 20px; }
  .featured-title { font-size: 22px; }
  .single-title { font-size: 24px; }
  .single-content { font-size: 17px; }

  .post-nav {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .nav-next { justify-content: flex-start; text-align: left; border-right: none; border-left: 4px solid var(--green); }
  .nav-random { order: -1; }
  .nav-title { max-width: none; }

  .single-meta { gap: 12px; flex-wrap: wrap; }
  .keyboard-hint { display: none; }

  .hots-item { padding: 12px 14px; gap: 12px; }
  .hots-item-title { font-size: 14px; }

  .terms-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .logo-name { font-size: 16px; }
  .logo-tagline { font-size: 11px; }
  .featured-title { font-size: 20px; }
  .card-title { font-size: 16px; }
  .single-title { font-size: 22px; }
  .single-content { font-size: 16px; line-height: 1.9; }
  .error-code { font-size: 56px; }
  .terms-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}

/* ---------- 打印 ---------- */
@media print {
  .site-header, .site-footer, .post-nav, .ad-slot, .single-share, .keyboard-hint { display: none; }
  .single-content { font-size: 14px; }
}

/* ---------- SEO优化：操作栏 & 今日星选 & 404推荐 ---------- */
.single-actions {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #4285F4;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.action-btn:hover {
  background: #4285F4;
  color: #fff;
  border-color: #4285F4;
}
.action-btn.copied {
  background: #34A853;
  color: #fff;
  border-color: #34A853;
}
.action-icon { font-size: 16px; }

/* 单篇页今日星选 */
.single-featured {
  margin: 24px 0;
  padding: 20px;
  background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
  border-radius: 12px;
  border: 1px solid #FFE082;
}
.single-featured .featured-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #F57F17;
  margin-bottom: 8px;
}
.single-featured .featured-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.featured-title-sm {
  font-size: 17px;
  font-weight: 600;
  color: #212121;
  margin: 0 0 6px 0;
  line-height: 1.6;
}
.single-featured .featured-meta {
  font-size: 12px;
  color: #9E9E9E;
}

/* 404 热门推荐 */
.error-suggestions {
  margin-top: 32px;
  text-align: left;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.error-suggest-title {
  font-size: 15px;
  font-weight: 600;
  color: #616161;
  margin-bottom: 12px;
  text-align: center;
}
.error-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.error-suggest-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eee;
  text-decoration: none;
  transition: all 0.2s;
}
.error-suggest-link:hover {
  border-color: #4285F4;
  box-shadow: 0 2px 8px rgba(66,133,244,0.1);
}
.error-suggest-text {
  font-size: 14px;
  color: #424242;
  flex: 1;
  margin-right: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.error-suggest-views {
  font-size: 12px;
  color: #9E9E9E;
  flex-shrink: 0;
}
