/* ============================================================
   妖神记漫画下拉式免费观看 - diamf.cn 整站样式
   开发者文档风：冷白背景、等宽代码、蓝绿状态色、稳定侧栏
   ============================================================ */

/* ============================================================
   Base
   ============================================================ */
:root {
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-surface-alt: #eef1f5;
  --color-border: #e0e0e0;
  --color-border-light: #e8eaee;
  --color-text: #333333;
  --color-text-secondary: #5a6472;
  --color-text-muted: #7a8494;
  --color-primary: #1a73e8;
  --color-primary-dark: #1558b0;
  --color-primary-light: #e8f0fe;
  --color-success: #34a853;
  --color-success-light: #e6f4ea;
  --color-warning: #fbbc04;
  --color-warning-light: #fef7e0;
  --color-danger: #ea4335;
  --color-danger-light: #fce8e6;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo,
    monospace;
  --container-width: 1200px;
  --header-height: 64px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.07);
  --transition-base: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body,
.site-body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

ul,
ol {
  list-style: none;
}

figure {
  margin: 0;
}

figcaption {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-top: 8px;
}

/* ============================================================
   Layout
   ============================================================ */
.site-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-logo::before {
  content: "[ ";
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-weight: 400;
}

.brand-logo::after {
  content: " ]";
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-weight: 400;
}

.brand-logo:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.site-main {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* 内页统一骨架 */
.site-inner {
  background-color: var(--color-bg);
}

.inner-main {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.breadcrumb a {
  color: var(--color-text-secondary);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb-sep {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
}

/* 页面标题区 */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--color-border);
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 8px;
}

.page-description {
  font-size: 15px;
  color: var(--color-text-secondary);
  max-width: 720px;
}

/* 页脚 */
.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: 48px;
}

.footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 40px 20px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid var(--color-border-light);
  padding: 16px 0;
}

.footer-bottom p {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ============================================================
   Components
   ============================================================ */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-base),
    border-color var(--transition-base), color var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #ffffff;
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  text-decoration: none;
}

/* 区块通用 */
.section-block {
  margin-bottom: 48px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
}

.section-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  flex-basis: 100%;
}

.section-link {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

/* 等宽装饰元素 */
.section-title::before {
  content: "// ";
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-weight: 400;
}

/* 封面图容器 */
.update-cover,
.rank-cover,
.rank-media,
.content-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
}

.update-cover img,
.rank-cover img,
.rank-media img,
.content-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 更新状态标记 */
.update-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  line-height: 1.5;
}

.status-hot {
  background-color: var(--color-danger-light);
  color: var(--color-danger);
}

.status-new {
  background-color: var(--color-success-light);
  color: var(--color-success);
}

.status-pause {
  background-color: var(--color-warning-light);
  color: #b06000;
}

/* ============================================================
   Pages
   ============================================================ */

/* ---------- 首页 ---------- */
.home-main {
  padding: 0 0 48px;
}

/* Hero 区 */
.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 48px 0 40px;
  margin-bottom: 16px;
}

.hero-content {
  max-width: 560px;
}

.hero-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
  margin-bottom: 12px;
}

.hero-title::before {
  content: "> ";
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-weight: 400;
}

.hero-slogan {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-success);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

.hero-desc {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.hero-figure img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

/* 题材分类导航带 */
.genre-nav-section {
  padding: 24px 0;
}

.genre-nav-section .genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.genre-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
}

.genre-tag::before {
  content: "#";
  color: var(--color-primary);
  margin-right: 4px;
  font-family: var(--font-mono);
}

.genre-tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  text-decoration: none;
}

/* 最近更新列表 */
.update-list-section {
  padding: 24px 0;
}

.update-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.update-group {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.update-date {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--color-border);
}

.update-date::before {
  content: "▸ ";
  color: var(--color-success);
}

.update-items li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.update-items li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.update-cover {
  width: 72px;
  height: 96px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.update-info {
  flex: 1;
  min-width: 0;
}

.update-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.update-chapter {
  font-size: 13px;
  color: var(--color-text-secondary);
  display: block;
}

.update-info .update-status {
  margin-top: 4px;
}

/* 人气榜单预览 */
.rank-preview-section {
  padding: 24px 0;
}

.rank-preview-section .rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rank-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: box-shadow var(--transition-base);
}

.rank-item:hover {
  box-shadow: var(--shadow-md);
}

.rank-number {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-primary);
  line-height: 1;
  min-width: 28px;
  padding-top: 4px;
}

.rank-cover {
  width: 64px;
  height: 84px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.rank-reason {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 阅读指南入口 */
.guide-entry-section {
  padding: 24px 0;
}

.guide-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.guide-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.guide-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.guide-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}

.guide-card-title::before {
  content: "● ";
  color: var(--color-success);
  font-size: 14px;
}

.guide-card-text {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  flex: 1;
}

.guide-card-link {
  font-size: 14px;
  font-weight: 500;
  align-self: flex-start;
}

.guide-card-link::after {
  content: " →";
  font-family: var(--font-mono);
}

/* ---------- 题材分类页 ---------- */
.page-genre .genre-tags {
  margin-bottom: 32px;
  padding: 20px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.page-genre .genre-tags .section-title {
  width: 100%;
  margin-bottom: 16px;
}

.content-media-inline {
  max-width: 480px;
  margin: 20px 0;
}

.content-media-inline img {
  height: 280px;
  object-fit: cover;
}

.section-intro {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag-item a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
}

.tag-item a::before {
  content: "#";
  color: var(--color-primary);
  margin-right: 4px;
  font-family: var(--font-mono);
}

.tag-item a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  text-decoration: none;
}

.genre-description {
  padding: 24px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.genre-description .section-title {
  margin-bottom: 16px;
}

.genre-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.genre-block:last-child {
  border-bottom: none;
}

.genre-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.genre-subtitle::before {
  content: "## ";
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-weight: 400;
}

.genre-block p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.genre-related-links {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.aside-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
}

.aside-title::before {
  content: "> ";
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-weight: 400;
}

.related-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.related-list li:last-child {
  border-bottom: none;
}

.related-list a {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.related-list a:hover {
  color: var(--color-primary);
}

/* ---------- 阅读指南页 ---------- */
.guide-section {
  margin-bottom: 40px;
  padding: 24px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.guide-section > h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.guide-section > h2::before {
  content: "// ";
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-weight: 400;
}

.section-lead {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.guide-figure {
  max-width: 520px;
  margin: 16px 0 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
}

.guide-figure img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background-color: var(--color-bg);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
  flex-shrink: 0;
  min-width: 36px;
}

.step-body h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.step-body p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.tip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tip-card {
  padding: 16px;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

.tip-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.tip-card h3::before {
  content: "▸ ";
  color: var(--color-success);
}

.tip-card p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.section-note {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 16px;
  padding: 12px 16px;
  background-color: var(--color-primary-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background-color: var(--color-bg);
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-base);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--color-primary);
  font-family: var(--font-mono);
  transition: transform var(--transition-base);
}

.faq-item[open] summary {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  background-color: var(--color-surface);
}

.related-links {
  padding: 20px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.related-links h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
}

.related-links h2::before {
  content: "> ";
  color: var(--color-primary);
  font-family: var(--font-mono);
}

/* ---------- 最近更新页 ---------- */
.update-section {
  margin-bottom: 32px;
}

.update-section > h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.update-section > h2::before {
  content: "// ";
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-weight: 400;
}

.update-section .section-intro {
  margin-bottom: 20px;
}

.update-section .update-list {
  gap: 20px;
}

.update-section .update-group {
  padding: 20px;
}

.update-section .update-group h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--color-border);
}

.update-section .update-group h3::before {
  content: "▸ ";
  color: var(--color-success);
}

.update-section .update-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.update-section .update-item:last-child {
  border-bottom: none;
}

.update-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.update-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 4px;
}

.update-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aside-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.aside-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-light);
}

.aside-card h3::before {
  content: "> ";
  color: var(--color-primary);
  font-family: var(--font-mono);
}

.aside-card .tag-list {
  gap: 8px;
}

/* ---------- 人气榜单页 ---------- */
.rank-list-section {
  margin-bottom: 40px;
}

.rank-list-section .rank-list {
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rank-list-section .rank-item {
  padding: 16px;
}

.rank-media {
  width: 80px;
  height: 104px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.rank-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.rank-reason {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.rank-reason-section {
  margin-bottom: 40px;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.reason-card {
  padding: 20px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

.reason-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.reason-title::before {
  content: "● ";
  color: var(--color-success);
  font-size: 12px;
}

.reason-text {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.rank-links-section {
  padding: 20px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.links-intro {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.links-intro a {
  font-weight: 500;
}

/* ---------- 追更技巧页 ---------- */
.layout-shell {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

.main-content {
  min-width: 0;
  min-height: 0;
}

.main-content .breadcrumb {
  margin-bottom: 16px;
}

.main-content .page-header {
  margin-bottom: 24px;
}

.article-content {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.tips-section {
  margin-bottom: 32px;
}

.tips-section:last-child {
  margin-bottom: 0;
}

.tips-section .section-title {
  font-size: 20px;
  margin-bottom: 12px;
}

.tips-section p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.tips-item {
  padding: 14px 16px;
  background-color: var(--color-bg);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
}

.tips-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.tips-item p {
  margin-bottom: 0;
}

.tips-note {
  font-size: 14px;
  color: var(--color-text-secondary);
  padding: 12px 16px;
  background-color: var(--color-primary-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
}

.tool-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.tool-list li {
  font-size: 14px;
  color: var(--color-text-secondary);
  padding-left: 20px;
  position: relative;
}

.tool-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-family: var(--font-mono);
}

.inline-related {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.related-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-light);
}

.related-title::before {
  content: "> ";
  color: var(--color-primary);
  font-family: var(--font-mono);
}

.related-links li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.related-links li:last-child {
  border-bottom: none;
}

.related-links a {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.related-links a:hover {
  color: var(--color-primary);
}

.sidebar-right {
  min-width: 0;
}

.sidebar-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-light);
}

.sidebar-title::before {
  content: "> ";
  color: var(--color-primary);
  font-family: var(--font-mono);
}

.sidebar-links li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.sidebar-links li:last-child {
  border-bottom: none;
}

.sidebar-links a {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.sidebar-links a:hover {
  color: var(--color-primary);
}

/* ---------- 404 页 ---------- */
.error-main {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 80px 20px;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-section {
  text-align: center;
  max-width: 520px;
  padding: 40px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.error-code {
  font-family: var(--font-mono);
  font-size: 72px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 16px;
}

.error-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.error-desc {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 992px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-figure img {
    height: 300px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .layout-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-right {
    order: 2;
  }

  .tip-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
    gap: 16px;
  }

  .brand-logo {
    font-size: 16px;
  }

  .site-main {
    padding: 0 16px;
  }

  .inner-main {
    padding: 16px 16px 40px;
  }

  .hero-section {
    padding: 32px 0 24px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-figure img {
    height: 240px;
  }

  .rank-preview-section .rank-list {
    grid-template-columns: 1fr;
  }

  .reason-grid {
    grid-template-columns: 1fr;
  }

  .guide-cards {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 32px 16px 20px;
  }

  .page-title {
    font-size: 28px;
  }

  .update-section .update-item {
    flex-wrap: wrap;
  }

  .update-cover {
    width: 64px;
    height: 84px;
  }

  .rank-media {
    width: 64px;
    height: 84px;
  }

  .rank-list-section .rank-list {
    grid-template-columns: 1fr;
  }

  .step-item {
    flex-direction: column;
    gap: 8px;
  }

  .step-num {
    min-width: 0;
  }

  .tip-grid {
    grid-template-columns: 1fr;
  }

  .tag-list {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .genre-nav-section .genre-tags {
    gap: 8px;
  }

  .genre-tag {
    padding: 6px 12px;
    font-size: 13px;
  }

  .update-items li {
    gap: 12px;
  }

  .update-cover {
    width: 56px;
    height: 76px;
  }

  .rank-item {
    flex-wrap: wrap;
  }

  .rank-cover {
    width: 56px;
    height: 76px;
  }

  .footer-bottom p {
    padding: 0 16px;
    font-size: 12px;
  }
}

/* ============================================================
   移动端导航（全站统一）
   ============================================================ */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-base),
    background-color var(--transition-base);
}

.nav-link:hover {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  font-weight: 600;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: static;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px;
    gap: 0;
    z-index: 99;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-item {
    border-bottom: 1px solid var(--color-border-light);
  }

  .nav-item:last-child {
    border-bottom: none;
  }

  .nav-link {
    padding: 12px 8px;
    border-radius: 0;
  }
}

/* ============================================================
   滚动出现动画（渐进增强，不影响初始可见性）
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .section-block {
    animation: fadeInUp 0.4s ease both;
  }

  .section-block:nth-child(2) {
    animation-delay: 0.05s;
  }

  .section-block:nth-child(3) {
    animation-delay: 0.1s;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
