:root {
  --bg: #FFF6EC;
  --surface: #FFFFFF;
  --primary: #FF7A3D;
  --accent: #C86BFF;
  --text: #2A1E2E;
  --muted: #9A8AA0;
  --radius: 22px;
  --radius-sm: 12px;
  --font-heading: 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
  --shadow: 0 8px 28px rgba(255, 122, 61, 0.12);
  --shadow-hover: 0 16px 40px rgba(200, 107, 255, 0.22);
}

* { 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.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 122, 61, 0.10), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(200, 107, 255, 0.10), transparent 40%);
  background-attachment: fixed;
}

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, 246, 236, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(200, 107, 255, 0.14);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(255, 122, 61, 0.28));
}

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

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.25s ease;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: 0 6px 18px rgba(255, 122, 61, 0.28);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(200, 107, 255, 0.16);
}

.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: 8px 18px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  transition: transform 0.2s ease;
}
.search-box button:hover { transform: scale(1.05); }

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  margin: 28px 0 12px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #2A1E2E, #4a2a52);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.hero-slide:hover img { transform: scale(1.04); }

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(42, 30, 46, 0.92) 0%, rgba(42, 30, 46, 0.25) 45%, transparent 70%);
  pointer-events: none;
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px 36px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-info h2,
.hero-info .hero-title {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 10px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: 0 8px 24px rgba(255, 122, 61, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(200, 107, 255, 0.5);
}

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

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

.sec-title {
  position: relative;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding-left: 16px;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(200, 107, 255, 0.24);
  transition: all 0.25s ease;
}
.sec-more:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-color: transparent;
}

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

.card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #f3e6ff, #ffe8d6);
}
.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: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: 0 4px 12px rgba(255, 122, 61, 0.4);
}

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

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

.card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ===== Cat list ===== */
.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  border: 1px solid rgba(200, 107, 255, 0.14);
  transition: all 0.25s ease;
}
.cat-item:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-color: transparent;
  transform: translateY(-2px);
}

.cat-count {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(200, 107, 255, 0.14);
  color: var(--accent);
}
.cat-item:hover .cat-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

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

.rank-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
}

.rank-num {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  min-width: 48px;
  text-align: center;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0.9;
}

.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 122, 61, 0.12);
}

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

.detail-head {
  display: flex;
  gap: 28px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-cover {
  flex: 0 0 240px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, #f3e6ff, #ffe8d6);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
.detail-meta p span { color: var(--text); }

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: 0 6px 18px rgba(255, 122, 61, 0.35);
}

.detail-body {
  margin-top: 24px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2,
.detail-body h3 {
  font-family: var(--font-heading);
  margin: 18px 0 10px;
  font-size: 18px;
  color: var(--text);
}
.detail-body p { margin-bottom: 12px; }
.detail-body img { border-radius: var(--radius-sm); margin: 12px 0; }

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

.tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent);
  background: rgba(200, 107, 255, 0.10);
  border: 1px solid rgba(200, 107, 255, 0.22);
  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;
  justify-content: center;
  gap: 8px;
  margin: 36px 0;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid rgba(200, 107, 255, 0.14);
  transition: all 0.22s ease;
}
.pg:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-color: transparent;
}
.pg.current {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(255, 122, 61, 0.35);
}
.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(200, 107, 255, 0.14);
  transition: all 0.22s ease;
}
.link-item:hover {
  color: var(--primary);
  border-color: rgba(255, 122, 61, 0.4);
}

/* ===== Footer ===== */
.footer {
  margin-top: 56px;
  padding: 36px 0 44px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid rgba(200, 107, 255, 0.14);
  background:
    linear-gradient(to top, rgba(200, 107, 255, 0.06), transparent),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(200, 107, 255, 0.05) 39px 40px);
}
.footer p { margin-bottom: 6px; }
.footer a { color: var(--primary); }
.footer a:hover { text-decoration: underline; }

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

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

/* ===== 扫描线装饰 ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(42, 30, 46, 0.015) 0px,
    rgba(42, 30, 46, 0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.5;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .rank-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 12px;
  }
  .logo { font-size: 19px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { padding: 7px 12px; font-size: 13px; }
  .search-box {
    flex: 1;
    min-width: 0;
  }
  .search-box input { width: 100%; }

  .hero { margin-top: 18px; border-radius: 18px; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 20px; gap: 8px; }
  .hero-info h2,
  .hero-info .hero-title { font-size: 20px; }
  .hero-info p { font-size: 12px; -webkit-line-clamp: 2; }
  .btn { padding: 8px 20px; font-size: 13px; }

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

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

  .cat-list { gap: 8px; }
  .cat-item { padding: 8px 14px; font-size: 13px; }

  .rank-list { grid-template-columns: 1fr; gap: 10px; }
  .rank-num { font-size: 26px; min-width: 38px; }

  .detail-head {
    flex-direction: column;
    padding: 18px;
    gap: 18px;
  }
  .detail-cover {
    flex: none;
    width: 160px;
    align-self: center;
  }
  .detail-meta h1 { font-size: 20px; }
  .detail-body { padding: 20px; font-size: 14px; }

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

  .footer { margin-top: 36px; padding: 26px 0 32px; }
}

@media (max-width: 400px) {
  .grid { gap: 10px; }
  .hero-info h2,
  .hero-info .hero-title { font-size: 17px; }
}