:root {
  --bg: #FFFFFF;
  --surface: #FDF8FC;
  --primary: #FF4F9A;
  --accent: #9B5DE5;
  --text: #1A1A1A;
  --muted: #8E8A92;
  --border: #F0EAF2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(155, 93, 229, 0.08);
  --shadow-hover: 0 12px 32px rgba(255, 79, 154, 0.16);
  --glow: 0 0 0 1px rgba(255, 79, 154, 0.12), 0 8px 28px rgba(255, 79, 154, 0.14);
  --font: 'Inter', 'Helvetica Neue', 'PingFang SC', system-ui, sans-serif;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  vertical-align: middle;
}

.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: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 999px;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: var(--surface);
}

.search-box {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  transition: box-shadow .2s ease, border-color .2s ease;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 79, 154, 0.12);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  width: 140px;
}

.search-box input::placeholder { color: var(--muted); }

.search-box button {
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 79, 154, 0.28);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: var(--surface);
  box-shadow: var(--glow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
}

.hero-slide.active,
.hero-slide:first-child {
  opacity: 1;
  pointer-events: auto;
}

.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.78) 0%, rgba(26, 26, 26, 0.35) 45%, transparent 75%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 40px;
  max-width: 560px;
  color: #fff;
}

.hero-info h2 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.hero-info p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(255, 79, 154, 0.4);
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 79, 154, 0.5);
}

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

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.sec-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
  padding-left: 14px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 10px rgba(255, 79, 154, 0.5);
}

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

.sec-more:hover { color: var(--primary); }

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

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(255, 79, 154, 0.3);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--surface);
}

.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: 10px;
  right: 10px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 12px rgba(255, 79, 154, 0.55);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 79, 154, 0.4); }
  50% { box-shadow: 0 0 18px rgba(255, 79, 154, 0.85); }
}

.card-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.card-meta {
  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(140px, 1fr));
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all .2s ease;
}

.cat-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.cat-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  padding: 1px 9px;
  border-radius: 999px;
}

/* ===== Rank list ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .2s ease;
}

.rank-item:last-child { border-bottom: none; }
.rank-item:hover { background: var(--surface); }

.rank-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  background: var(--surface);
}

.rank-item:nth-child(1) .rank-num { background: linear-gradient(135deg, #FF4F9A, #FF8FBF); color: #fff; box-shadow: 0 0 12px rgba(255,79,154,.5); }
.rank-item:nth-child(2) .rank-num { background: linear-gradient(135deg, #9B5DE5, #C4A0F5); color: #fff; }
.rank-item:nth-child(3) .rank-num { background: linear-gradient(135deg, #FFB347, #FFD08A); color: #fff; }

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

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

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(155, 93, 229, 0.18);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.detail-meta h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 4px;
}

.detail-meta p { color: var(--muted); }
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 79, 154, 0.1);
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(255, 79, 154, 0.2);
}

.detail-body {
  margin-top: 28px;
  padding: 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}

.detail-body h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 10px;
  color: var(--text);
}

.detail-body h2:first-child { margin-top: 0; }
.detail-body p { margin-bottom: 12px; }

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(155, 93, 229, 0.08);
  border: 1px solid rgba(155, 93, 229, 0.18);
  border-radius: 999px;
  transition: all .2s ease;
}

.tag:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ===== 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: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all .2s ease;
}

.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(255, 79, 154, 0.16);
}

.pg.current {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(255, 79, 154, 0.35);
}

.pg.disabled {
  color: var(--muted);
  opacity: 0.45;
  pointer-events: none;
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .2s ease;
}

.link-item:hover {
  color: var(--primary);
  border-color: rgba(255, 79, 154, 0.3);
}

/* ===== Crumbs ===== */
.crumbs {
  padding: 18px 0;
  font-size: 13px;
  color: var(--muted);
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { margin: 0 6px; opacity: 0.6; }

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

/* ===== Footer ===== */
.footer {
  margin-top: 60px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer p { margin: 4px 0; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .wrap { padding: 0 16px; }

  .header .wrap {
    height: 58px;
    gap: 12px;
    flex-wrap: nowrap;
  }

  .logo { font-size: 17px; }

  .nav {
    order: 3;
    flex-basis: 100%;
    padding-bottom: 8px;
    gap: 2px;
  }

  .nav a { padding: 6px 10px; font-size: 13px; }

  .search-box { padding: 4px 4px 4px 12px; }
  .search-box input { width: 90px; font-size: 13px; }
  .search-box button { padding: 5px 10px; font-size: 12px; }

  .hero {
    aspect-ratio: 4 / 3;
    margin: 18px 0;
    border-radius: var(--radius-sm);
  }

  .hero-info { padding: 20px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; margin-bottom: 12px; }
  .btn { padding: 9px 20px; font-size: 13px; }

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

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

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

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

  .rank-item { padding: 12px 14px; gap: 12px; }
  .rank-title { font-size: 13px; }

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }

  .detail-meta h1 { font-size: 21px; }
  .detail-body { padding: 20px; font-size: 14px; }

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

  .footer { margin-top: 40px; padding: 26px 0; font-size: 12px; }
}