:root {
  --bg: #1A0F2E;
  --surface: #26163F;
  --primary: #B6F2E8;
  --accent: #FF6FD8;
  --text: #F3EEFF;
  --muted: #9B8AB8;
  --radius: 14px;
  --font-heading: "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans", system-ui, sans-serif;
  --line: rgba(182, 242, 232, 0.14);
  --glow: 0 0 18px rgba(255, 111, 216, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(255, 111, 216, 0.16), transparent 55%),
    radial-gradient(ellipse at 85% 0%, rgba(182, 242, 232, 0.10), transparent 50%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: color .22s ease; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(26, 15, 46, 0.96), rgba(38, 22, 63, 0.88));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: var(--glow);
}

.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);
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid transparent;
}
.nav a:hover {
  color: var(--primary);
  border-color: var(--line);
  background: rgba(182, 242, 232, 0.06);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(182, 242, 232, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  min-width: 200px;
}
.search-box input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  min-width: 0;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: #1A0F2E;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  font-family: var(--font-body);
}

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

.hero-slide {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(26, 15, 46, 0.96) 6%, rgba(26, 15, 46, 0.35) 55%, rgba(26, 15, 46, 0.15)),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
}
.hero-slide::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 90px;
  background:
    linear-gradient(transparent, rgba(255, 111, 216, 0.10)),
    repeating-linear-gradient(90deg, rgba(182, 242, 232, 0.18) 0 1px, transparent 1px 60px);
  mask-image: linear-gradient(transparent, #000);
  -webkit-mask-image: linear-gradient(transparent, #000);
  pointer-events: none;
}

.hero-info {
  position: relative;
  z-index: 2;
  padding: 34px 38px;
  max-width: 640px;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: 1px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 9px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #1A0F2E;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
  transition: transform .22s ease, box-shadow .22s ease;
}
.btn:hover {
  color: #1A0F2E;
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(255, 111, 216, 0.55);
}

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

.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);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}

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

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

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 111, 216, 0.55);
  box-shadow: 0 10px 30px rgba(255, 111, 216, 0.18);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(160deg, #2e1a4d, #1A0F2E);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.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: 12px;
  font-weight: 700;
  color: #1A0F2E;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}

.card-info { padding: 10px 12px 13px; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ Cat list ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  letter-spacing: 1px;
  transition: border-color .22s ease, transform .22s ease;
}
.cat-item:hover {
  border-color: rgba(255, 111, 216, 0.5);
  transform: translateY(-3px);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ============ Rank list ============ */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 26px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border-bottom: 1px solid var(--line);
  transition: background .22s ease;
}
.rank-item:hover { background: rgba(182, 242, 232, 0.05); }

.rank-num {
  flex: 0 0 26px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

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

.rank-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* ============ Detail ============ */
.detail { margin: 30px 0 50px; }

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

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: 1px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -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: 500; }

.detail-score {
  display: inline-block;
  margin: 12px 0;
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #1A0F2E;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}

.detail-body {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body p { margin-bottom: 14px; }
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  letter-spacing: 1px;
  margin: 22px 0 12px;
  color: var(--primary);
}

/* ============ Tags ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--primary);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(182, 242, 232, 0.05);
  transition: border-color .22s ease, color .22s ease;
}
.tag:hover {
  color: var(--accent);
  border-color: rgba(255, 111, 216, 0.55);
}

/* ============ Pager ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0 10px;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: all .22s ease;
}
.pg:hover {
  color: var(--primary);
  border-color: rgba(182, 242, 232, 0.5);
}
.pg.current {
  color: #1A0F2E;
  font-weight: 700;
  border-color: transparent;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}
.pg.disabled {
  opacity: .38;
  pointer-events: none;
  cursor: default;
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.link-item {
  font-size: 13px;
  color: var(--muted);
}
.link-item:hover { color: var(--primary); }

/* ============ Footer ============ */
.footer {
  margin-top: 50px;
  padding: 34px 0 40px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
  background: linear-gradient(180deg, transparent, rgba(255, 111, 216, 0.05));
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

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

/* ============ Highlight ============ */
.hl {
  color: #1A0F2E;
  padding: 0 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  font-weight: 600;
}

/* ============ Responsive ============ */
@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: 19px; }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .search-box {
    order: 2;
    margin-left: auto;
    min-width: 0;
    width: 46%;
  }
  .search-box input { font-size: 12px; }

  .hero { margin: 16px 0 28px; }
  .hero-slide { min-height: 300px; }
  .hero-info { padding: 22px 18px; max-width: 100%; }
  .hero-info h2 { font-size: 24px; }
  .hero-info p { font-size: 13px; }

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

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

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

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 23px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { display: table; margin: 12px auto; }

  .pager { gap: 6px; }
  .pg { min-width: 34px; height: 34px; font-size: 13px; padding: 0 9px; }
}