:root {
  --bg: #FBF0F5;
  --surface: rgba(255, 255, 255, 0.55);
  --primary: #FF6FA5;
  --accent: #8B6CFF;
  --text: #2E2436;
  --muted: #9A8BA6;
  --radius: 18px;
  --glass-border: rgba(255, 255, 255, 0.7);
  --shadow: 0 8px 30px rgba(139, 108, 255, 0.12);
  --font-heading: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', -apple-system, 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: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 12% 8%, rgba(255, 111, 165, 0.28), transparent 60%),
    radial-gradient(700px 500px at 88% 20%, rgba(139, 108, 255, 0.24), transparent 62%),
    radial-gradient(500px 500px at 50% 100%, rgba(255, 175, 205, 0.3), transparent 65%),
    var(--bg);
  pointer-events: none;
}

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 20px;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 240, 245, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 24px rgba(139, 108, 255, 0.08);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: linear-gradient(100deg, var(--primary), var(--accent) 55%, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  flex-shrink: 0;
}

.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: 7px 14px;
  font-size: 14px;
  color: var(--text);
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s;
}
.nav a:hover,
.nav a.active {
  background: rgba(255, 111, 165, 0.16);
  color: var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  width: 150px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  transition: filter 0.25s, transform 0.25s;
}
.search-box button:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 28px auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
  border: 1px solid var(--glass-border);
}

.hero-slide {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.hero-slide:hover img { transform: scale(1.03); }

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 30%, rgba(46, 36, 54, 0.72) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px 32px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 680px;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.hero-info p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 6px;
  padding: 10px 26px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: 0 6px 20px rgba(255, 111, 165, 0.4);
  transition: transform 0.25s, box-shadow 0.25s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(139, 108, 255, 0.45);
}

/* ---------- Section ---------- */
.sec { margin: 44px auto; }

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

.sec-title {
  position: relative;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  padding-left: 16px;
  letter-spacing: 0.5px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(139, 108, 255, 0.25);
  background: var(--surface);
  transition: color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.sec-more:hover { color: var(--primary); border-color: var(--primary); }

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

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(139, 108, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(139, 108, 255, 0.2);
}

.card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #f6dfe9, #e4dcff);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: 0 4px 12px rgba(255, 111, 165, 0.4);
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s;
}
.card:hover .card-title { color: var(--primary); }

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

/* ---------- Category ---------- */
.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: 8px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s, box-shadow 0.25s, color 0.25s;
}
.cat-item:hover {
  transform: translateY(-3px);
  color: var(--primary);
  box-shadow: 0 10px 24px rgba(139, 108, 255, 0.18);
}

.cat-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  padding: 1px 9px;
  border-radius: 999px;
  background: rgba(139, 108, 255, 0.1);
}

/* ---------- Rank ---------- */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s, box-shadow 0.25s;
}
.rank-item:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 22px rgba(139, 108, 255, 0.16);
}

.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  font-style: italic;
  color: var(--muted);
  border-radius: 10px;
  background: rgba(139, 108, 255, 0.1);
}
.rank-item:nth-child(1) .rank-num { color: #fff; background: linear-gradient(120deg, #FF6FA5, #FF9A6F); }
.rank-item:nth-child(2) .rank-num { color: #fff; background: linear-gradient(120deg, #8B6CFF, #B49AFF); }
.rank-item:nth-child(3) .rank-num { color: #fff; background: linear-gradient(120deg, #FFB36F, #FFD59A); }

.rank-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-item:hover .rank-title { color: var(--primary); }

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

/* ---------- Detail ---------- */
.detail { margin: 32px auto; }

.detail-head {
  display: flex;
  gap: 28px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.detail-cover {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(139, 108, 255, 0.22);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
}
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.detail-score small { font-size: 13px; -webkit-text-fill-color: var(--muted); color: var(--muted); }

.detail-body {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin: 18px 0 10px;
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body p { margin-bottom: 12px; }

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

.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--accent);
  border-radius: 999px;
  background: rgba(139, 108, 255, 0.1);
  border: 1px solid rgba(139, 108, 255, 0.2);
  transition: background 0.25s, color 0.25s;
}
.tag:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-color: transparent;
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 36px auto;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s, box-shadow 0.25s, color 0.25s;
}
.pg:hover {
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 108, 255, 0.16);
}
.pg.current {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: 0 8px 20px rgba(255, 111, 165, 0.35);
  pointer-events: none;
}
.pg.disabled {
  color: var(--muted);
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

/* ---------- Footer ---------- */
.footer {
  margin-top: 56px;
  padding: 32px 0 40px;
  border-top: 1px solid rgba(139, 108, 255, 0.14);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}
.footer a { color: var(--muted); transition: color 0.25s; }
.footer a:hover { color: var(--primary); }

/* ---------- Crumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 18px 0 4px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); transition: color 0.25s; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--muted); }

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(255, 111, 165, 0.14);
  border-radius: 4px;
  padding: 0 2px;
}

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

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

  .hero { margin-top: 16px; border-radius: 14px; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 18px 18px; max-width: 100%; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }
  .btn { padding: 8px 20px; font-size: 13px; }

  .sec { margin: 30px auto; }
  .sec-title { font-size: 17px; }

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

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

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

  .detail-head {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  .detail-cover {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 20px; }
  .detail-score { font-size: 24px; }
  .detail-body { padding: 16px; font-size: 14px; }

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

  .links { padding: 16px; }
  .footer { margin-top: 36px; padding: 24px 0 30px; }
}