:root {
  --bg: #F3EBDD;
  --surface: #FFF8EC;
  --primary: #B4308F;
  --accent: #E94E9C;
  --text: #241A2E;
  --muted: #7A6B84;
  --radius: 10px;
  --shadow: 6px 6px 0 rgba(36, 26, 46, 0.9);
  --shadow-sm: 3px 3px 0 rgba(36, 26, 46, 0.85);
  --border: 2px solid var(--text);
  --font-heading: 'Arial Black', 'Helvetica Neue', Impact, 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(233, 78, 156, 0.18), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(180, 48, 143, 0.16), transparent 40%),
    repeating-linear-gradient(0deg, rgba(36, 26, 46, 0.035) 0, rgba(36, 26, 46, 0.035) 1px, transparent 1px, transparent 4px);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: var(--border);
  box-shadow: 0 4px 0 rgba(36, 26, 46, 0.12);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #fff 0%, #E94E9C 45%, #B4308F 70%, #6b1a55 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px var(--text);
  text-shadow: 2px 2px 0 rgba(36, 26, 46, 0.15);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  display: inline-block;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.nav a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--text);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-sm);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.search-box input {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px 12px;
  width: 180px;
  color: var(--text);
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  outline: none;
}
.search-box input:focus {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary);
}
.search-box button {
  font-family: var(--font-heading);
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  color: #fff;
  background: var(--primary);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.search-box button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(36, 26, 46, 0.9);
}

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  margin: 24px 0;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}
.hero-slide:first-child,
.hero-slide.active { display: block; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 20px 20px;
  background: linear-gradient(0deg, rgba(36, 26, 46, 0.92), rgba(36, 26, 46, 0.55) 60%, transparent);
  color: #fff;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1.25;
  margin-bottom: 6px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}
.hero-info p {
  font-size: 13px;
  color: #f3e6f0;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  padding: 9px 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(36, 26, 46, 0.9);
}

/* ===== Section ===== */
.sec { margin: 36px 0; }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--text);
}
.sec-title {
  position: relative;
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: 1px;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 22px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  border: 2px solid var(--text);
  border-radius: 3px;
}
.sec-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  padding: 4px 10px;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.sec-more:hover { background: var(--primary); color: #fff; }

/* ===== Grid & Card ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e6dccb;
  border-bottom: var(--border);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover .card-cover img { transform: scale(1.05); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  padding: 2px 8px;
  color: #fff;
  background: var(--primary);
  border: 2px solid var(--text);
  border-radius: 6px;
  box-shadow: 2px 2px 0 rgba(36, 26, 46, 0.8);
}

.card-info { padding: 10px 12px 12px; }
.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.card-meta span { white-space: nowrap; }

/* ===== 分类 ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  font-weight: 700;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.cat-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
  background: #fff;
}
.cat-count {
  font-family: var(--font-heading);
  font-size: 12px;
  padding: 1px 8px;
  color: #fff;
  background: var(--accent);
  border: 2px solid var(--text);
  border-radius: 20px;
}

/* ===== 排行榜 ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.rank-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}
.rank-num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border: 2px solid var(--text);
  border-radius: 8px;
}
.rank-title {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--primary);
}

/* ===== 详情页 ===== */
.detail { margin: 28px 0; }

.detail-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.detail-cover {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1.3;
}
.detail-meta p { color: var(--muted); }
.detail-meta p strong { color: var(--text); }
.detail-score {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-heading);
  font-size: 16px;
  padding: 4px 14px;
  color: #fff;
  background: var(--primary);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.detail-body {
  padding: 20px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  line-height: 1.85;
}
.detail-body p { margin-bottom: 12px; }
.detail-body img { border-radius: var(--radius); margin: 12px 0; }

/* ===== 标签 ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  color: var(--primary);
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: 20px;
  transition: background 0.15s, color 0.15s;
}
.tag:hover { background: var(--primary); color: #fff; }

/* ===== 分页 ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 32px 0;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-family: var(--font-heading);
  font-size: 13px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
}
.pg:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
  background: var(--accent);
  color: #fff;
}
.pg.current {
  background: var(--primary);
  color: #fff;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}
.pg.disabled {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

/* ===== 友情链接 ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 10px;
  border: 2px dashed rgba(122, 107, 132, 0.5);
  border-radius: var(--radius);
  transition: color 0.15s, border-color 0.15s;
}
.link-item:hover { color: var(--primary); border-color: var(--primary); }

/* ===== 页脚 ===== */
.footer {
  margin-top: 48px;
  padding: 28px 0 36px;
  background: var(--surface);
  border-top: 3px solid var(--text);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.footer a { color: var(--primary); font-weight: 700; }
.footer p { margin: 4px 0; }

/* ===== 面包屑 ===== */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0 0;
}
.crumbs a { color: var(--primary); font-weight: 700; }
.crumbs a:hover { text-decoration: underline; }

/* ===== 搜索高亮 ===== */
.hl {
  background: linear-gradient(180deg, transparent 55%, rgba(233, 78, 156, 0.45) 55%);
  color: var(--text);
  font-weight: 700;
  padding: 0 1px;
  border-radius: 2px;
}

/* ===== 响应式 ===== */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .cat-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-head { flex-direction: row; align-items: flex-start; }
  .hero-slide { aspect-ratio: 21 / 8; }
  .hero-info h2 { font-size: 32px; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cat-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  body { font-size: 14px; }

  .header .wrap {
    flex-wrap: nowrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .logo { font-size: 18px; }
  .nav {
    flex: 1 1 auto;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .nav a { padding: 5px 10px; font-size: 13px; }
  .search-box { flex: 0 0 auto; }
  .search-box input { width: 110px; padding: 6px 8px; font-size: 13px; }
  .search-box button { padding: 6px 10px; font-size: 12px; }

  .hero { margin: 16px 0; box-shadow: var(--shadow-sm); }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 16px 14px 14px; }
  .hero-info h2 { font-size: 19px; }
  .hero-info p { font-size: 12px; -webkit-line-clamp: 2; }

  .sec { margin: 24px 0; }
  .sec-title { font-size: 17px; }
  .sec-title::before { height: 18px; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-item { padding: 11px 12px; font-size: 13px; }

  .card-info { padding: 8px 10px 10px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; }
  .card-score { font-size: 11px; padding: 1px 6px; top: 6px; right: 6px; }

  .rank-item { padding: 8px 10px; gap: 8px; }
  .rank-num { width: 28px; height: 28px; font-size: 13px; }
  .rank-title { font-size: 13px; }

  .detail-head { padding: 14px; }
  .detail-cover { max-width: 180px; margin: 0 auto; }
  .detail-meta h1 { font-size: 20px; }
  .detail-body { padding: 14px; font-size: 14px; }

  .pg { min-width: 34px; height: 34px; font-size: 12px; padding: 0 9px; }

  .footer { margin-top: 32px; padding: 22px 0 28px; }
}