/* 哔咔漫画官网 - 专业二次元漫画阅读平台 · 哔咔哔咔漫画 */
:root {
  --bg: #fdf4ff;
  --bg-alt: #faf5ff;
  --card: #fff;
  --text: #581c87;
  --text-muted: #7c3aed;
  --accent: #a855f7;
  --accent-2: #ec4899;
  --border: #e9d5ff;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(168, 85, 247, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  color: var(--text);
  line-height: 1.7;
  font-size: 14px;
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 1040px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
}
.logo:hover { opacity: 0.9; }
.logo .badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.nav { list-style: none; display: flex; gap: 8px; }
.nav a {
  display: block;
  padding: 8px 14px;
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.nav a:hover { background: rgba(255,255,255,0.2); }

main { max-width: 1040px; margin: 0 auto; padding: 24px 20px; }

/* 斜角 Hero */
.hero-slant {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  padding: 28px 32px;
  margin: 0 -20px 24px;
  color: #fff;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}
.hero-slant h1 { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.hero-slant p { font-size: 0.9rem; opacity: 0.95; }

/* 不对称布局：主 65% + 侧 35% */
.layout-aside {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 840px) {
  .layout-aside { grid-template-columns: 1fr; }
}

.main-area { min-width: 0; }

.intro {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.intro h2 { font-size: 1.05rem; color: var(--accent); margin-bottom: 12px; font-weight: 600; }
.intro p { margin-bottom: 10px; font-size: 0.94rem; color: var(--text-muted); line-height: 1.85; }

/* 侧边 - 官网动态 */
.side-panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: sticky;
  top: 76px;
}
.side-panel h3 { font-size: 0.95rem; color: var(--text); margin-bottom: 12px; font-weight: 600; }
.side-panel ul { list-style: none; }
.side-panel li { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.side-panel li:last-child { border-bottom: none; }
.side-panel a { color: var(--text-muted); text-decoration: none; font-size: 13px; }
.side-panel a:hover { color: var(--accent); }

/* 大卡片横滑 */
.featured { margin-bottom: 24px; }
.featured h2 { font-size: 1rem; color: var(--text); margin-bottom: 14px; font-weight: 600; }
.featured-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}
.featured-row::-webkit-scrollbar { height: 8px; }
.featured-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.feat-card {
  flex: 0 0 180px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s;
}
.feat-card:hover { transform: scale(1.02); }
.feat-card a { text-decoration: none; color: inherit; display: block; }
.feat-card .cover { aspect-ratio: 3/4; overflow: hidden; }
.feat-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.feat-card .info { padding: 12px; }
.feat-card .t { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feat-card .tag { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* 网格 */
.section { margin-bottom: 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.section-head h2 { font-size: 1rem; color: var(--text); font-weight: 600; }
.section-head .more { color: var(--accent); text-decoration: none; font-size: 13px; }
.section-head .more:hover { text-decoration: underline; }

.manga-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 16px; }
.manga-card {
  background: var(--card);
  border-radius: var(--radius);
  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 24px rgba(168, 85, 247, 0.18); }
.manga-card a { text-decoration: none; color: inherit; display: block; }
.manga-card .cover { aspect-ratio: 3/4; overflow: hidden; }
.manga-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.manga-card .info { padding: 10px; }
.manga-card .t { font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manga-card .tag { font-size: 11px; color: var(--text-muted); }

.page-title { margin-bottom: 20px; }
.page-title h1 { font-size: 1.2rem; color: var(--text); margin-bottom: 6px; font-weight: 600; }
.page-title p { font-size: 13px; color: var(--text-muted); }

.article {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  padding: 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.article h1 { font-size: 1.2rem; margin-bottom: 12px; color: var(--text); font-weight: 600; }
.article .meta { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.article .content p { margin-bottom: 12px; font-size: 14px; color: var(--text-muted); line-height: 1.85; }
.article .content img { max-width: 100%; height: auto; border-radius: 12px; margin: 16px 0; }
.article .back { display: inline-block; margin-top: 18px; color: var(--accent); text-decoration: none; font-size: 13px; }
.article .back:hover { text-decoration: underline; }

footer {
  max-width: 1040px;
  margin: 32px auto 0;
  padding: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .manga-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .feat-card { flex: 0 0 140px; }
}
