:root {
  --bg: #FFF4E8;
  --surface: rgba(255, 248, 240, 0.72);
  --primary: #FF7B3A;
  --accent: #FF4D9E;
  --text: #35211A;
  --muted: #9C7B6A;
  --radius: 28px;
  --radius-sm: 16px;
  --glass-border: rgba(255, 255, 255, 0.65);
  --glow: 0 12px 32px rgba(255, 123, 58, 0.18);
  --glow-strong: 0 18px 46px rgba(255, 77, 158, 0.22);
  --font-heading: 'Playfair Display', 'Ma Shan Zheng', 'Noto Serif SC', serif;
  --font-body: 'Nunito', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 123, 58, 0.22), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(255, 77, 158, 0.20), transparent 46%),
    radial-gradient(circle at 50% 100%, rgba(168, 120, 255, 0.16), transparent 55%);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
}

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(255, 248, 240, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 6px 24px rgba(255, 123, 58, 0.08);
}

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

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

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
  transition: all 0.25s ease;
}
.nav a:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 8px 6px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  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-family: var(--font-body);
  font-size: 14px;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  transition: transform 0.2s ease;
}
.search-box button:hover { transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--glow-strong);
  background: linear-gradient(135deg, #2a1533, #4a1f45);
}

.hero-slide {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(42, 21, 51, 0.92) 0%, rgba(42, 21, 51, 0.35) 55%, transparent 100%);
  z-index: -1;
}

.hero-info {
  padding: 40px;
  max-width: 640px;
  color: #fff;
}
.hero-info h1, .hero-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.2;
  margin-bottom: 12px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.hero-info p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: none;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-strong);
}

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

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

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

.sec-more {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s ease;
  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 {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 22px rgba(255, 123, 58, 0.10);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--glow-strong);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #f3d9c8, #e8c2d8);
}
.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: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: 0 4px 12px rgba(255, 77, 158, 0.4);
}

.card-info { padding: 12px 14px 16px; }

.card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Categories ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-weight: 700;
  transition: all 0.25s ease;
}
.cat-item:hover {
  transform: translateY(-4px);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--glow-strong);
}

.cat-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.cat-item:hover .cat-count { color: rgba(255,255,255,0.85); }

/* ---------- Ranking ---------- */
.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--glow);
}

.rank-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.rank-item:nth-child(1) .rank-num { background: linear-gradient(135deg, #FF7B3A, #FFB03A); }
.rank-item:nth-child(2) .rank-num { background: linear-gradient(135deg, #FF4D9E, #FF7B3A); }
.rank-item:nth-child(3) .rank-num { background: linear-gradient(135deg, #A878FF, #FF4D9E); }

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

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

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

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

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(53, 33, 26, 0.18);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
  margin-bottom: 14px;
}

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
  margin-bottom: 18px;
}

.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.detail-meta p strong { color: var(--text); }

.detail-body {
  margin-top: 28px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 15px;
  line-height: 1.9;
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin: 20px 0 12px;
}
.detail-body p { margin-bottom: 14px; }

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

.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  background: rgba(255, 123, 58, 0.12);
  border: 1px solid rgba(255, 123, 58, 0.25);
  transition: all 0.2s ease;
}
.tag:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-color: transparent;
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.22s ease;
}
.pg:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: var(--glow);
}
.pg.current {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: var(--glow);
  cursor: default;
}
.pg.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 123, 58, 0.08);
  transition: all 0.2s ease;
}
.link-item:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 56px;
  padding: 36px 0 28px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--glass-border);
  background: rgba(255, 248, 240, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.footer a { color: var(--primary); }
.footer a:hover { color: var(--accent); }
.footer p { margin: 6px 0; }

/* ---------- Crumbs ---------- */
.crumbs {
  margin: 20px 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); transition: color 0.2s ease; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--text); font-weight: 700; }

/* ---------- Highlight ---------- */
.hl {
  color: var(--accent);
  font-weight: 800;
  background: rgba(255, 77, 158, 0.12);
  border-radius: 4px;
  padding: 0 2px;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 12px;
  }
  .logo { font-size: 22px; }
  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero { margin: 18px 0; border-radius: 22px; }
  .hero-slide { min-height: 300px; }
  .hero-info { padding: 24px 20px; }

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

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }
  .detail-body { padding: 20px; }

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