:root {
  --bg: #F8F4F0;
  --surface: #FFFFFF;
  --primary: #B84A8F;
  --accent: #D9381E;
  --text: #2A2A2A;
  --muted: #8A7F7A;
  --radius: 12px;
  --font-heading: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --line: rgba(42, 42, 42, 0.08);
  --shadow: 0 6px 20px rgba(184, 74, 143, 0.12);
  --shadow-hover: 0 14px 32px rgba(184, 74, 143, 0.22);
}

* { 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:
    repeating-linear-gradient(0deg, rgba(42,42,42,0.025) 0, rgba(42,42,42,0.025) 1px, transparent 1px, transparent 3px),
    radial-gradient(circle at 12% 8%, rgba(184,74,143,0.10), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(217,56,30,0.07), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.6), rgba(248,244,240,0.9));
  line-height: 1.6;
  min-height: 100vh;
}

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

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; }

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 244, 240, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  flex-wrap: wrap;
}
.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 15px;
  color: var(--text);
  border-radius: 999px;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--primary); background: rgba(184, 74, 143, 0.08); }

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  min-width: 200px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  min-width: 0;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  cursor: pointer;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font-body);
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #fff;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 6px 16px rgba(184, 74, 143, 0.28);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 32px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #1a1a1a;
}
.hero-slide {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 240px;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26,26,26,0.82) 0%, rgba(26,26,26,0.35) 55%, transparent 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 4px);
}
.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 40px;
  max-width: 560px;
  color: #fff;
}
.hero-info h2 {
  font-size: 32px;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hero-info p {
  font-size: 15px;
  color: rgba(255,255,255,0.82);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ Sections ============ */
.sec { margin: 40px 0; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.sec-title {
  font-size: 22px;
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}
.sec-more {
  font-size: 14px;
  color: var(--muted);
  transition: color .2s;
}
.sec-more:hover { color: var(--primary); }

/* ============ Grid / Cards ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(184,74,143,0.15), rgba(217,56,30,0.1));
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.card:hover .card-cover img { transform: scale(1.05); }
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 9px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(217,56,30,0.4);
}
.card-info { padding: 12px 14px 16px; }
.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

/* ============ Categories ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-family: var(--font-heading);
  font-size: 16px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cat-item:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}
.cat-count {
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--primary);
  background: rgba(184,74,143,0.1);
  padding: 2px 10px;
  border-radius: 999px;
}

/* ============ Rank List ============ */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform .2s, border-color .2s;
}
.rank-item:hover { transform: translateX(4px); border-color: var(--primary); }
.rank-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.rank-item:nth-child(1) .rank-num { background: linear-gradient(135deg, #D9381E, #B84A8F); }
.rank-item:nth-child(2) .rank-num { background: linear-gradient(135deg, #B84A8F, #8A7F7A); }
.rank-item:nth-child(3) .rank-num { background: linear-gradient(135deg, #8A7F7A, #B84A8F); }
.rank-title {
  flex: 1;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

/* ============ Detail ============ */
.detail { margin: 32px 0; }
.detail-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(184,74,143,0.22);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { display: flex; flex-direction: column; gap: 14px; }
.detail-meta h1 {
  font-size: 30px;
  line-height: 1.25;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 18px;
  border-radius: var(--radius);
  background: rgba(217,56,30,0.08);
}
.detail-meta p { font-size: 14px; color: var(--muted); }
.detail-meta p strong { color: var(--text); font-weight: 600; margin-right: 6px; }
.detail-body {
  margin-top: 24px;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 { font-size: 20px; margin: 20px 0 12px; }
.detail-body p { margin-bottom: 12px; }

/* ============ Tags ============ */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--primary);
  background: rgba(184,74,143,0.08);
  border: 1px solid rgba(184,74,143,0.2);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.tag:hover { background: var(--primary); color: #fff; }

/* ============ Pager ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .2s;
}
.pg:hover { border-color: var(--primary); color: var(--primary); }
.pg.current {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(184,74,143,0.3);
}
.pg.disabled {
  color: var(--muted);
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0;
}
.link-item {
  font-size: 14px;
  color: var(--muted);
  transition: color .2s;
}
.link-item:hover { color: var(--primary); }

/* ============ Crumbs ============ */
.crumbs {
  padding: 18px 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { margin: 0 6px; opacity: 0.6; }

/* ============ Highlight ============ */
.hl {
  color: var(--accent);
  background: rgba(217,56,30,0.12);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}

/* ============ Footer ============ */
.footer {
  margin-top: 60px;
  padding: 40px 0 30px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(184,74,143,0.04));
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}
.footer a { color: var(--muted); transition: color .2s; }
.footer a:hover { color: var(--primary); }

/* ============ Responsive ============ */
@media (max-width: 768px) {
  .wrap { padding: 0 14px; }
  .header .wrap {
    gap: 10px;
    min-height: auto;
    padding: 10px 14px;
  }
  .logo { font-size: 20px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { padding: 6px 12px; font-size: 14px; }
  .search-box { min-width: 0; flex: 1; }

  .hero { margin: 20px 0; }
  .hero-slide { aspect-ratio: 16 / 10; min-height: 200px; }
  .hero-info { padding: 20px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }

  .sec { margin: 28px 0; }
  .sec-title { font-size: 18px; }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card-info { padding: 10px 12px 14px; }
  .card-title { font-size: 14px; }

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

  .rank-list { grid-template-columns: 1fr; }

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }
  .detail-cover { max-width: 220px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; }
  .detail-score { font-size: 22px; }
  .detail-body { padding: 18px; font-size: 14px; }

  .pg { min-width: 36px; height: 36px; padding: 0 10px; font-size: 13px; }
}