/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #f5f5f0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #c0392b;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.5em;
  color: #1a1a1a;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 1em;
}

figure {
  margin: 0;
}

figcaption {
  font-size: 0.875rem;
  color: #666;
  text-align: center;
  margin-top: 0.5em;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.site-header {
  background-color: #fff;
  border-bottom: 1px solid #e5e5e0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.brand-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

.brand-slogan {
  font-size: 0.8125rem;
  color: #888;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #1a1a1a;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav .nav-list {
  display: flex;
  gap: 4px;
  align-items: center;
}

.site-nav .nav-list li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.9375rem;
  color: #2c3e50;
  border-radius: 4px;
  line-height: 1.4;
}

.site-nav .nav-list li a:hover {
  background-color: #f0f0eb;
  color: #c0392b;
}

.site-nav .nav-list li a.is-current {
  color: #c0392b;
  font-weight: 600;
  background-color: #faf5f0;
}

.site-main {
  min-height: 60vh;
}

.site-main.inner-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

/* 面包屑 */
.breadcrumb {
  font-size: 0.875rem;
  color: #888;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb a {
  color: #2c3e50;
}

.breadcrumb a:hover {
  color: #c0392b;
}

.breadcrumb-sep {
  color: #bbb;
}

.breadcrumb-current {
  color: #888;
}

/* 页面标题区 */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e5e0;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.page-description {
  font-size: 1rem;
  color: #555;
  max-width: 720px;
  margin-bottom: 0;
  line-height: 1.7;
}

/* 页脚 */
.site-footer {
  background-color: #1a1a1a;
  color: #ccc;
  margin-top: 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.footer-brand {
  margin-bottom: 32px;
}

.footer-brand-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 0.875rem;
  color: #999;
  max-width: 480px;
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #333;
}

.footer-link-group h3 {
  font-size: 0.9375rem;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-link-group ul li {
  margin-bottom: 8px;
}

.footer-link-group ul li a {
  color: #aaa;
  font-size: 0.875rem;
  line-height: 1.5;
}

.footer-link-group ul li a:hover {
  color: #e67e22;
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 0.8125rem;
  color: #777;
}

.footer-bottom p {
  margin-bottom: 0;
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* 区块标题通用 */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0;
}

.section-heading p {
  font-size: 0.875rem;
  color: #888;
  margin-bottom: 0;
}

.section-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
}

/* 按钮 */
.btn-primary,
.btn-secondary,
.btn-home {
  display: inline-block;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
  min-height: 44px;
  line-height: 1.4;
}

.btn-primary {
  background-color: #c0392b;
  color: #fff;
}

.btn-primary:hover {
  background-color: #a93226;
  color: #fff;
}

.btn-secondary {
  background-color: transparent;
  color: #2c3e50;
  border: 1px solid #2c3e50;
}

.btn-secondary:hover {
  border-color: #c0392b;
  color: #c0392b;
  background-color: #faf5f0;
}

.btn-home {
  background-color: #c0392b;
  color: #fff;
  margin-top: 8px;
}

.btn-home:hover {
  background-color: #a93226;
  color: #fff;
}

/* ============================================================
   首页
   ============================================================ */
.site-main.home-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

/* Hero */
.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0 48px;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.hero-desc {
  font-size: 1.0625rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-media img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* 分类导航带 */
.category-nav-section {
  padding: 40px 0;
  border-top: 1px solid #e5e5e0;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-tag {
  display: inline-block;
  padding: 10px 20px;
  background-color: #fff;
  border: 1px solid #e0e0d8;
  border-radius: 6px;
  font-size: 0.9375rem;
  color: #2c3e50;
  min-height: 44px;
  line-height: 1.4;
}

.category-tag:hover {
  border-color: #c0392b;
  color: #c0392b;
  background-color: #faf5f0;
}

/* 最近更新 */
.recent-updates-section {
  padding: 40px 0;
  border-top: 1px solid #e5e5e0;
}

.update-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.update-item {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e2;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.update-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.update-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.update-info {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.update-info h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.4;
}

.update-meta {
  font-size: 0.8125rem;
  color: #999;
  margin-bottom: 0;
}

.update-desc {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 人气榜单预览 */
.rank-preview-section {
  padding: 40px 0;
  border-top: 1px solid #e5e5e0;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.rank-item {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e8e8e2;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: box-shadow 0.2s ease;
}

.rank-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.rank-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: #e67e22;
  line-height: 1;
  flex-shrink: 0;
  min-width: 32px;
}

.rank-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.rank-tags {
  font-size: 0.8125rem;
  color: #c0392b;
  margin-bottom: 8px;
}

.rank-reason {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0;
  line-height: 1.6;
}

/* 阅读指南入口 */
.guide-entry-section {
  padding: 40px 0;
  border-top: 1px solid #e5e5e0;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.guide-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 28px;
  border: 1px solid #e8e8e2;
  transition: box-shadow 0.2s ease;
}

.guide-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.guide-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.guide-card p {
  font-size: 0.9375rem;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.6;
}

.guide-card a {
  color: #c0392b;
  font-weight: 600;
  font-size: 0.9375rem;
}

/* 长尾推荐预告 */
.longtail-preview-section {
  padding: 40px 0;
  border-top: 1px solid #e5e5e0;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e2;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}

.feature-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.feature-content {
  padding: 20px 24px 24px;
}

.feature-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-content p {
  font-size: 0.9375rem;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.6;
}

.feature-content a {
  color: #c0392b;
  font-weight: 600;
  font-size: 0.9375rem;
}

/* ============================================================
   题材分类页
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.category-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e2;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.category-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.category-cover img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.category-info {
  padding: 16px 20px 20px;
}

.category-name {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.category-desc {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.6;
}

.category-info a {
  color: #c0392b;
  font-weight: 600;
  font-size: 0.875rem;
}

.category-note {
  background-color: #fff;
  border-radius: 8px;
  padding: 28px;
  border: 1px solid #e8e8e2;
}

.category-note .section-title {
  margin-bottom: 16px;
}

.category-note p {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 12px;
}

.category-note p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   阅读指南页
   ============================================================ */
.guide-content {
  max-width: 860px;
}

.guide-section {
  background-color: #fff;
  border-radius: 8px;
  padding: 28px;
  border: 1px solid #e8e8e2;
  margin-bottom: 24px;
}

.guide-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1a1a1a;
}

.guide-section p {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 16px;
}

.guide-section p:last-child {
  margin-bottom: 0;
}

.guide-media {
  margin-bottom: 20px;
}

.guide-media img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
}

.guide-media figcaption {
  font-size: 0.8125rem;
  color: #999;
}

/* ============================================================
   推荐页（恋爱 / 热血）
   ============================================================ */
.page-layout,
.layout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.main-content {
  min-width: 0;
}

/* 推荐列表 */
.recommend-list .section-intro {
  font-size: 0.9375rem;
  color: #666;
  margin-bottom: 24px;
}

.recommend-card {
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e2;
  overflow: hidden;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  transition: box-shadow 0.2s ease;
}

.recommend-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card-media img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.4;
}

.card-tags {
  font-size: 0.8125rem;
  color: #c0392b;
  margin-bottom: 0;
}

.card-desc {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0;
}

.card-reason {
  font-size: 0.875rem;
  color: #666;
  background-color: #faf5f0;
  border-left: 3px solid #e67e22;
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 0;
  line-height: 1.6;
}

/* 推荐汇总 */
.recommend-summary,
.reason-block {
  background-color: #fff;
  border-radius: 8px;
  padding: 28px;
  border: 1px solid #e8e8e2;
  margin-top: 8px;
}

.recommend-summary p,
.reason-block p {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 12px;
}

.recommend-summary p:last-child,
.reason-block p:last-child {
  margin-bottom: 0;
}

/* 侧栏 */
.aside-content,
.aside-bar {
  min-width: 0;
}

.aside-inner,
.aside-section {
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e2;
  padding: 24px;
  margin-bottom: 24px;
}

.aside-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1a1a1a;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e2;
}

.aside-list li {
  margin-bottom: 8px;
}

.aside-list li:last-child {
  margin-bottom: 0;
}

.aside-list li a {
  display: block;
  padding: 8px 0;
  color: #2c3e50;
  font-size: 0.9375rem;
  line-height: 1.5;
  border-bottom: 1px solid #f0f0eb;
}

.aside-list li a:hover {
  color: #c0392b;
}

/* ============================================================
   404 页
   ============================================================ */
.site-main.error-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px;
  min-height: 60vh;
}

.error-section {
  text-align: center;
  padding: 48px 0 40px;
}

.error-code {
  font-size: 4rem;
  font-weight: 700;
  color: #e67e22;
  margin-bottom: 8px;
  line-height: 1;
}

.error-section h1 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 1rem;
  color: #666;
  max-width: 480px;
  margin: 0 auto 24px;
}

.error-links {
  max-width: 640px;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e2;
  padding: 28px;
}

.error-links h2 {
  font-size: 1.125rem;
  margin-bottom: 16px;
}

.error-links ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}

.error-links ul li a {
  display: block;
  padding: 8px 0;
  color: #2c3e50;
  font-size: 0.9375rem;
}

.error-links ul li a:hover {
  color: #c0392b;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .update-list,
  .rank-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-layout,
  .layout-shell {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
    height: 56px;
  }

  .brand-slogan {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background-color: #fff;
    border-bottom: 1px solid #e5e5e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
  }

  .site-nav .nav-list {
    display: none;
    flex-direction: column;
    padding: 8px 16px 16px;
    gap: 0;
  }

  .site-nav .nav-list.is-open {
    display: flex;
  }

  .site-nav .nav-list li {
    width: 100%;
  }

  .site-nav .nav-list li a {
    padding: 12px 8px;
    border-bottom: 1px solid #f0f0eb;
    font-size: 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .site-nav .nav-list li:last-child a {
    border-bottom: none;
  }

  .site-main.inner-main,
  .site-main.home-main {
    padding: 24px 16px 40px;
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0 24px;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-media img {
    height: 220px;
  }

  .section-heading {
    flex-direction: column;
    gap: 4px;
  }

  .category-tags {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .category-tag {
    flex-shrink: 0;
  }

  .update-list,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .guide-cards,
  .feature-cards {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .page-layout,
  .layout-shell {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .main-content {
    order: 1;
  }

  .aside-content,
  .aside-bar {
    order: 2;
    margin-top: 8px;
  }

  .recommend-card {
    grid-template-columns: 1fr;
  }

  .card-media img {
    height: 200px;
    min-height: 0;
  }

  .footer-inner {
    padding: 32px 16px 20px;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 4px;
  }

  .error-links ul {
    grid-template-columns: 1fr;
  }

  .error-code {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    text-align: center;
  }

  .guide-card,
  .category-note,
  .recommend-summary,
  .reason-block,
  .aside-inner,
  .aside-section {
    padding: 20px;
  }

  .page-title {
    font-size: 1.5rem;
  }
}
