/* 9.1漫画 - 杂志分栏式 · 粉紫少女漫风格（区别于封面墙/横向行/瀑布流） */
:root {
  --bg: #fdf8fc;
  --bg-alt: #f8f4fb;
  --card: #fff;
  --text: #2d2233;
  --text-muted: #6b5b73;
  --accent: #c2185b;
  --accent-soft: #e91e8c;
  --accent-hover: #ad1457;
  --border: #f0e6ef;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(194, 24, 91, 0.08);
  --max-w: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "PingFang SC", "Hiragino Kaku Gothic ProN", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); line-height: 1.65; min-height: 100vh; }

header {
  background: linear-gradient(135deg, #fff 0%, #fef7fc 100%);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { max-width: var(--max-w); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.logo { font-weight: 700; color: var(--accent); text-decoration: none; font-size: 1.05rem; }
.logo:hover { color: var(--accent-hover); }
.nav { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.nav a:hover { color: var(--accent); }

main { max-width: var(--max-w); margin: 0 auto; padding: 1rem; }

/* 杂志式双栏：主内容 + 侧边栏 */
.magazine { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; }
@media (max-width: 900px) { .magazine { grid-template-columns: 1fr; } }

.hero {
  background: linear-gradient(135deg, #fef7fc 0%, #f8f4fb 50%, #fef7fc 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.hero h1 { font-size: clamp(0.95rem, 3vw, 1.2rem); color: var(--text); margin-bottom: 0.4rem; font-weight: 600; }
.hero .tagline { color: var(--text-muted); font-size: 0.88rem; }

.intro { margin-bottom: 1.5rem; }
.intro h2 { font-size: 1.05rem; color: var(--accent); margin-bottom: 0.65rem; border-left: 4px solid var(--accent); padding-left: 0.65rem; }
.intro p { margin-bottom: 0.65rem; font-size: 0.92rem; color: var(--text-muted); }

.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.85rem; }
.section-head h2 { font-size: 1rem; color: var(--text); }
.section-head .more { color: var(--accent); text-decoration: none; font-size: 0.85rem; }
.section-head .more:hover { text-decoration: underline; }

/* 漫画卡片 - 书脊/竖封风格 */
.manga-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.manga-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.manga-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(194, 24, 91, 0.12); }
.manga-card a { text-decoration: none; color: inherit; display: block; }
.manga-card .cover {
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;
}
.manga-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.manga-card .cover .tag { position: absolute; top: 0.4rem; left: 0.4rem; font-size: 0.65rem; background: var(--accent); color: #fff; padding: 0.15rem 0.4rem; border-radius: 6px; }
.manga-card .info { padding: 0.6rem 0.5rem; }
.manga-card .t { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.2rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manga-card .m { font-size: 0.75rem; color: var(--text-muted); }

/* 侧边栏 */
.sidebar { position: sticky; top: 4rem; align-self: start; }
.sidebar .block { background: var(--card); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--border); }
.sidebar .block h3 { font-size: 0.9rem; color: var(--text); margin-bottom: 0.65rem; border-bottom: 2px solid var(--accent); padding-bottom: 0.4rem; display: inline-block; }
.sidebar .rank-list { list-style: none; }
.sidebar .rank-list li { margin-bottom: 0.5rem; }
.sidebar .rank-list a { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text-muted); font-size: 0.85rem; }
.sidebar .rank-list a:hover { color: var(--accent); }
.sidebar .rank-list .num { width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.7rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar .rank-list .cov { width: 36px; height: 48px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.sidebar .rank-list .cov img { width: 100%; height: 100%; object-fit: cover; }

.page-title { margin-bottom: 1rem; }
.page-title h1 { font-size: 1.15rem; color: var(--text); margin-bottom: 0.2rem; }
.page-title p { font-size: 0.88rem; color: var(--text-muted); }

/* 列表页无侧边栏时全宽网格 */
.list-main .manga-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

.article { max-width: 680px; margin: 0 auto; }
.article h1 { font-size: 1.25rem; margin-bottom: 0.85rem; color: var(--text); }
.article .meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1rem; }
.article .content p { margin-bottom: 0.8rem; font-size: 0.92rem; color: var(--text-muted); }
.article .content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 1rem 0; border: 1px solid var(--border); }
.article .back { display: inline-block; margin-top: 1.25rem; color: var(--accent); text-decoration: none; font-size: 0.88rem; }
.article .back:hover { text-decoration: underline; }

footer { max-width: var(--max-w); margin: 2rem auto 0; padding: 1rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.82rem; color: var(--text-muted); }

@media (max-width: 600px) {
  .manga-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .manga-card .info { padding: 0.5rem 0.4rem; }
  .manga-card .t { font-size: 0.8rem; }
}
