:root {
  --bg: #1A1226;
  --surface: #2A1F3D;
  --primary: #FF8C42;
  --accent: #FF5E9C;
  --text: #F5EDE0;
  --muted: #9B8AA8;
  --radius: 24px;
  --radius-sm: 14px;
  --line: rgba(245, 237, 224, 0.12);
  --font-head: 'Georgia', 'Times New Roman', '宋体', serif;
  --font-body: 'Inter', 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --grad: linear-gradient(135deg, #FF8C42 0%, #FF5E9C 55%, #A855F7 100%);
}

* { 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.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 94, 156, 0.04) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 15% 0%, rgba(255, 140, 66, 0.14), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(168, 85, 247, 0.16), transparent 50%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: color .25s, opacity .25s; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 18, 38, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}
.logo {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(255, 94, 156, 0.35);
}
.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;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.nav a:hover, .nav a.active {
  color: var(--text);
  background: rgba(255, 140, 66, 0.16);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 6px 5px 16px;
  min-width: 220px;
}
.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--grad);
  color: #1A1226;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font-body);
  transition: transform .2s, filter .2s;
}
.search-box button:hover { transform: translateY(-1px); filter: brightness(1.08); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 999px;
  background: var(--grad);
  color: #1A1226;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 22px rgba(255, 94, 156, 0.28);
  transition: transform .22s, box-shadow .22s;
}
.btn:hover {
  color: #1A1226;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 94, 156, 0.42);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 28px 0 12px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-slide {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  padding: 40px;
  background-size: cover;
  background-position: center;
}
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26, 18, 38, 0.94) 0%, rgba(26, 18, 38, 0.55) 55%, rgba(26, 18, 38, 0.15) 100%),
              linear-gradient(0deg, rgba(26, 18, 38, 0.9), transparent 55%);
}
.hero-info {
  position: relative;
  z-index: 2;
  max-width: 560px;
}
.hero-info h2 {
  font-size: clamp(26px, 4vw, 42px);
  margin-bottom: 12px;
  color: var(--text);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-info .btn { margin-right: 10px; }

/* ---------- Sections ---------- */
.sec { margin: 46px 0; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.sec-title {
  position: relative;
  font-size: 22px;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 22px;
  border-radius: 4px;
  background: var(--grad);
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.sec-more:hover { color: var(--primary); }

/* ---------- Grid & Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .28s, box-shadow .28s, border-color .28s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(255, 140, 66, 0.45);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1A1226;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--grad);
  color: #1A1226;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.card-info { padding: 12px 14px 16px; }
.card-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

/* ---------- Categories ---------- */
.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: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  transition: border-color .25s, transform .25s, background .25s;
}
.cat-item:hover {
  border-color: var(--primary);
  background: rgba(255, 140, 66, 0.1);
  transform: translateY(-3px);
  color: var(--text);
}
.cat-count {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Rank ---------- */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 26px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--line);
  transition: background .25s;
}
.rank-item:hover { background: rgba(255, 94, 156, 0.08); }
.rank-num {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  background: var(--grad);
  color: #1A1226;
}
.rank-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  flex: none;
  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;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { display: flex; flex-direction: column; gap: 10px; }
.detail-meta h1 { font-size: clamp(22px, 3vw, 32px); }
.detail-meta p { font-size: 14px; color: var(--muted); }
.detail-meta p span { color: var(--text); }
.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.detail-score small { font-size: 13px; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.detail-body {
  margin-top: 26px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  line-height: 1.9;
  font-size: 15px;
}
.detail-body h2 { font-size: 19px; margin: 18px 0 10px; }
.detail-body h2:first-child { margin-top: 0; }
.detail-body p { color: #D9CFC2; margin-bottom: 12px; }

/* ---------- Tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 140, 66, 0.1);
  border: 1px solid var(--line);
  transition: color .25s, border-color .25s;
}
.tag:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- 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: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all .22s;
}
.pg:hover { color: var(--text); border-color: var(--primary); }
.pg.current {
  background: var(--grad);
  color: #1A1226;
  font-weight: 700;
  border-color: transparent;
}
.pg.disabled {
  opacity: .35;
  pointer-events: none;
}

/* ---------- Links / Footer ---------- */
.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 {
  margin-top: 50px;
  padding: 34px 0 40px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: linear-gradient(0deg, rgba(255, 94, 156, 0.06), transparent);
}
.footer p { margin: 4px 0; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ---------- Crumbs & Highlight ---------- */
.crumbs {
  padding: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--text); }

.hl {
  color: #1A1226;
  background: var(--primary);
  border-radius: 4px;
  padding: 0 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .wrap { padding: 0 14px; }
  .header .wrap {
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .search-box { min-width: 0; flex: 1; }
  .hero-slide {
    min-height: 320px;
    padding: 24px 20px;
  }
  .hero-info p { -webkit-line-clamp: 2; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-info { padding: 10px 12px 14px; }
  .card-title { font-size: 14px; }
  .cat-list { grid-template-columns: repeat(2, 1fr); }
  .rank-list { grid-template-columns: 1fr; }
  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }
  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-body { padding: 20px 18px; }
  .sec { margin: 34px 0; }
  .sec-title { font-size: 19px; }
  .btn { padding: 10px 20px; font-size: 13px; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hero-slide { min-height: 280px; }
}