:root {
  --bg: #0C0714;
  --surface: #171022;
  --primary: #FF4FA3;
  --accent: #39D9FF;
  --text: #F4EFFF;
  --muted: #8B7FA8;
  --radius: 6px;
  --line: rgba(139, 127, 168, 0.22);
  --font-heading: 'Playfair Display', 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-body: 'Space Grotesk', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button, input { font-family: inherit; }

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 7, 20, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 66px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: linear-gradient(100deg, #fff 0%, var(--accent) 45%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 22px rgba(255, 79, 163, 0.35);
}

.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: 6px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: all 0.2s ease;
}
.nav a:hover {
  color: var(--text);
  background: rgba(255, 79, 163, 0.12);
}
.nav a.active {
  color: var(--text);
  background: linear-gradient(120deg, rgba(255, 79, 163, 0.28), rgba(57, 217, 255, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 79, 163, 0.4);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.search-box input {
  width: 170px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  padding: 8px 14px;
  background: linear-gradient(120deg, var(--primary), #b13bff);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.search-box button:hover { filter: brightness(1.15); }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 28px 0 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 21 / 9;
  animation: heroFade 0.6s ease both;
}
.hero-slide.active { display: block; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 7, 20, 0.95) 0%, rgba(12, 7, 20, 0.35) 45%, transparent 80%);
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px 32px;
  max-width: 640px;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 1.25;
  margin-bottom: 10px;
  background: linear-gradient(100deg, #fff 0%, #ffd6ec 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--primary), #b13bff);
  box-shadow: 0 0 18px rgba(255, 79, 163, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(255, 79, 163, 0.55), 0 0 14px rgba(57, 217, 255, 0.35);
}

/* ============ Section ============ */
.sec { margin-bottom: 48px; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 12px rgba(255, 79, 163, 0.6);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.sec-more:hover { color: var(--accent); }

/* ============ Grid & Card ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px 18px;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 79, 163, 0.5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 22px rgba(255, 79, 163, 0.28), 0 0 12px rgba(57, 217, 255, 0.22);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0a0510;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #0C0714;
  background: linear-gradient(120deg, var(--accent), var(--primary));
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(57, 217, 255, 0.4);
}

.card-info {
  padding: 10px 12px 12px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ Cat list ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.2s ease;
}
.cat-item:hover {
  border-color: rgba(57, 217, 255, 0.5);
  box-shadow: 0 0 16px rgba(57, 217, 255, 0.2);
  transform: translateY(-3px);
}
.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 79, 163, 0.12);
  padding: 1px 8px;
  border-radius: 10px;
}

/* ============ Rank list ============ */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 28px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}
.rank-item:hover { background: rgba(255, 79, 163, 0.06); }

.rank-num {
  flex-shrink: 0;
  width: 30px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(120deg, var(--accent), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rank-item:nth-child(-n+3) .rank-num {
  text-shadow: 0 0 16px rgba(255, 79, 163, 0.5);
}

.rank-title {
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

/* ============ Detail ============ */
.detail {
  margin: 28px 0 48px;
}

.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 0 26px rgba(255, 79, 163, 0.18);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta { padding-top: 4px; }
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.3;
  margin-bottom: 12px;
  background: linear-gradient(100deg, #fff 0%, #ffd6ec 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-block;
  margin: 10px 0 16px;
  padding: 4px 14px;
  font-size: 18px;
  font-weight: 700;
  color: #0C0714;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--accent), var(--primary));
  box-shadow: 0 0 18px rgba(57, 217, 255, 0.4);
}

.detail-body {
  padding: 28px 0;
  font-size: 15px;
  line-height: 1.9;
  color: #d9d0ee;
}
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  color: var(--text);
  margin: 24px 0 12px;
}
.detail-body p { margin-bottom: 14px; }
.detail-body img { border-radius: var(--radius); margin: 14px 0; }

/* ============ Tags ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: all 0.2s ease;
}
.tag:hover {
  color: var(--text);
  border-color: rgba(255, 79, 163, 0.55);
  box-shadow: 0 0 12px rgba(255, 79, 163, 0.25);
}

/* ============ Pager ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}
.pg {
  display: inline-block;
  min-width: 38px;
  padding: 7px 12px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}
.pg:hover {
  color: var(--text);
  border-color: rgba(57, 217, 255, 0.5);
}
.pg.current {
  color: #0C0714;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent), var(--primary));
  border-color: transparent;
  box-shadow: 0 0 16px rgba(255, 79, 163, 0.4);
}
.pg.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.link-item {
  font-size: 13px;
  color: var(--muted);
}
.link-item:hover { color: var(--accent); }

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

/* ============ Highlight ============ */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(255, 79, 163, 0.12);
  padding: 0 2px;
  border-radius: 3px;
}

/* ============ Footer ============ */
.footer {
  margin-top: 40px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, transparent, rgba(23, 16, 34, 0.6));
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .hero-info h2 { font-size: 26px; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 14px; }

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .logo { font-size: 20px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    gap: 2px;
    padding-bottom: 2px;
  }
  .nav a { padding: 5px 10px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 120px; }

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

  .sec { margin-bottom: 34px; }
  .sec-title { font-size: 20px; }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 12px;
  }

  .cat-list { grid-template-columns: repeat(2, 1fr); }

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; }

  .pager { gap: 6px; margin: 28px 0; }
  .pg { min-width: 34px; padding: 6px 10px; font-size: 13px; }
}