/* JMCOMIC - 深色蓝紫科技风 · 左侧分类栏 + 右侧内容 */
:root {
  --bg: #0f0f1a;
  --bg-card: #16162a;
  --bg-sidebar: #12121e;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --border: #2d2d44;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --max-w: 1200px;
}

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

header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { max-width: var(--max-w); margin: 0 auto; height: 52px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 700; font-size: 1.15rem; color: var(--accent); text-decoration: none; }
.logo:hover { color: var(--accent-hover); }
.nav { list-style: none; display: flex; gap: 18px; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--accent); }

/* 主布局：左侧分类栏 + 右侧内容 */
.main-wrap { display: flex; gap: 0; max-width: var(--max-w); margin: 0 auto; min-height: calc(100vh - 52px); }
.sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 18px 0;
  position: sticky;
  top: 52px;
  align-self: flex-start;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
}
@media (max-width: 860px) {
  .main-wrap { flex-direction: column; }
  .sidebar { width: 100%; position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--border); padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
  .sidebar a { flex: 1 1 auto; min-width: 100px; }
}
.sidebar a {
  display: block;
  padding: 10px 18px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.sidebar a:hover, .sidebar a.active { color: var(--accent); border-left-color: var(--accent); background: rgba(99, 102, 241, 0.08); }

.content-main { flex: 1; padding: 18px; min-width: 0; }

/* 顶部区 */
.top-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  padding: 20px 24px;
}
.top-banner h1 { font-size: 1.2rem; color: var(--text); margin-bottom: 8px; font-weight: 600; }
.top-banner p { font-size: 0.9rem; color: var(--text-muted); }

/* 简介区 */
.intro { background: var(--bg-card); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px; border: 1px solid var(--border); }
.intro h2 { font-size: 1.05rem; color: var(--accent); margin-bottom: 10px; font-weight: 600; }
.intro p { margin-bottom: 8px; font-size: 0.92rem; color: var(--text-muted); line-height: 1.75; }

.section { margin-bottom: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; 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(130px, 1fr)); gap: 14px; }
.manga-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}
.manga-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.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: 500; margin-bottom: 4px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manga-card .m { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

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

.article { max-width: 680px; margin: 0 auto; background: var(--bg-card); padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); }
.article h1 { font-size: 1.25rem; margin-bottom: 10px; color: var(--text); font-weight: 600; }
.article .meta { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.article .content p { margin-bottom: 10px; font-size: 14px; color: var(--text-muted); line-height: 1.75; }
.article .content img { max-width: 100%; height: auto; border-radius: 8px; margin: 14px 0; border: 1px solid var(--border); }
.article .back { display: inline-block; margin-top: 16px; color: var(--accent); text-decoration: none; font-size: 13px; }
.article .back:hover { text-decoration: underline; }

footer { max-width: var(--max-w); margin: 24px auto 0; padding: 16px; 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: 10px; }
  .manga-card .info { padding: 8px; }
  .manga-card .t { font-size: 12px; }
}
