/* 51漫画 - 漫画封面墙风格（SEO优化） */
:root {
  --bg: #faf8f5;
  --card: #fff;
  --coral: #e85d5d;
  --coral-dim: #c94a4a;
  --text: #2d2a26;
  --text-dim: #6b6560;
  --border: #e8e4de;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* 顶栏 */
header[role="banner"] {
  background: var(--card);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
}

.site-logo {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--coral);
}

nav[role="navigation"] {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

nav[role="navigation"] a {
  padding: 10px 16px;
  color: var(--text-dim);
  font-size: 14px;
  transition: color 0.2s;
}

nav[role="navigation"] a:hover { color: var(--coral); }

/* 主内容 */
main[role="main"] {
  max-width: 1140px;
  margin: 0 auto;
  padding: 26px 20px;
}

/* 焦点区 */
.hero-wrap {
  margin-bottom: 32px;
}

.hero-banner {
  position: relative;
  height: 340px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px 26px 22px;
  background: linear-gradient(transparent 15%, rgba(0,0,0,0.82) 100%);
}

.hero-overlay h1 {
  font-size: 1.55rem;
  color: #fff;
  margin-bottom: 10px;
}

.hero-overlay p {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  max-width: 540px;
}

/* 介绍区 */
.intro-area {
  background: var(--card);
  padding: 28px 32px;
  margin-bottom: 34px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border-left: 4px solid var(--coral);
}

.intro-area h2 {
  font-size: 1.15rem;
  color: var(--coral);
  margin-bottom: 18px;
}

.intro-area p {
  color: var(--text-dim);
  margin-bottom: 14px;
  line-height: 1.78;
}

.intro-area p:last-of-type { margin-bottom: 0; }

/* 区块标题 */
.block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.block-head h2 {
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 600;
}

.block-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* 漫画封面网格 - 3:4 竖版 */
.manga-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.manga-card {
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.manga-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.manga-card .cover {
  aspect-ratio: 3/4;
  overflow: hidden;
}

.manga-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manga-card .info {
  padding: 12px;
}

.manga-card .info h3 {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.manga-card .info h3:hover { color: var(--coral); }

.manga-card .info .tag {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* 内容页 */
.breadcrumb {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.breadcrumb a { color: var(--coral); }
.breadcrumb a:hover { text-decoration: underline; }

article {
  background: var(--card);
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

article h1 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.4;
}

.article-meta {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

article h2 {
  font-size: 1.1rem;
  color: var(--coral);
  margin: 22px 0 10px;
}

article p {
  margin-bottom: 12px;
  color: var(--text-dim);
  line-height: 1.78;
}

article .intro {
  font-size: 1.05rem;
  color: var(--text);
}

.article-img {
  margin: 22px 0;
  border-radius: 10px;
  overflow: hidden;
}

.article-img img { width: 100%; }

/* 列表页 */
.list-hero {
  height: 240px;
  position: relative;
  margin-bottom: 26px;
  border-radius: 12px;
  overflow: hidden;
}

.list-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-hero-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.82));
}

.list-hero-caption h1 { font-size: 1.3rem; color: #fff; margin-bottom: 6px; }
.list-hero-caption p { font-size: 13px; color: rgba(255,255,255,0.88); }

/* 页脚 */
footer[role="contentinfo"] {
  background: var(--card);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  padding: 24px 20px;
  margin-top: 42px;
  text-align: center;
}

footer nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

footer nav a { color: var(--text-dim); font-size: 13px; }
footer nav a:hover { color: var(--coral); }
footer p { font-size: 12px; }

/* 响应式 */
@media (max-width: 950px) {
  .manga-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 700px) {
  .manga-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .hero-banner { height: 260px; }
  .header-inner { flex-direction: column; align-items: stretch; padding: 12px 0; }
  nav[role="navigation"] { justify-content: center; }
}

@media (max-width: 480px) {
  .manga-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  main[role="main"] { padding: 20px 16px; }
  .intro-area { padding: 22px; }
  article { padding: 24px; }
  .list-hero { height: 200px; }
}
