:root {
  --bg: #ffffff;
  --surface: #f7f7f5;
  --primary: #c9a227;
  --accent: #1a1a1a;
  --text: #1a1a1a;
  --muted: #8a8a8a;
  --radius: 8px;
  --font: 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  --shadow-hover: 0 12px 32px rgba(0,0,0,.14);
  --gold-grad: linear-gradient(135deg, #e0c04a, #c9a227 60%, #a8841a);
}

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

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

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button, input { font-family: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #c9a22788; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  white-space: nowrap;
  color: var(--accent);
}
.logo::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: 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 {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav a:hover, .nav a.active {
  color: var(--accent);
  background: var(--surface);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.search-box input {
  width: 180px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, width .2s;
}
.search-box input:focus { border-color: var(--primary); width: 220px; }
.search-box button {
  height: 38px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
.search-box button:hover { background: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--primary); transform: translateY(-2px); }
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(0,0,0,.18);
}
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 32px 0 56px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--accent);
}
.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 21 / 9;
  background: #111;
}
.hero-slide.active { display: block; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
}
.hero-info {
  position: absolute;
  left: 0; bottom: 0;
  padding: 48px;
  max-width: 640px;
  background: linear-gradient(to top, rgba(0,0,0,.78), transparent);
  color: #fff;
}
.hero-info h2 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero-info p {
  font-size: 14px;
  color: rgba(255,255,255,.78);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Sections ---------- */
.sec { margin-bottom: 64px; }
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.sec-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.6px;
  line-height: 1.1;
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 22px;
  border-radius: 2px;
  background: var(--gold-grad);
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s;
}
.sec-more:hover { color: var(--primary); }

/* ---------- Grid & Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px 22px;
}
.card {
  display: block;
  border-radius: var(--radius);
  transition: transform .28s ease;
}
.card:hover { transform: translateY(-5px); }
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: box-shadow .28s ease;
}
.card:hover .card-cover { box-shadow: var(--shadow-hover); }
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-score {
  position: absolute;
  top: 8px; right: 8px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--gold-grad);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .3px;
  box-shadow: 0 2px 8px rgba(201,162,39,.4);
}
.card-info { padding: 12px 2px 0; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.card:hover .card-title { color: var(--primary); }
.card-meta {
  margin-top: 5px;
  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(6, 1fr);
  gap: 16px;
}
.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 10px;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: background .2s, transform .2s, color .2s;
}
.cat-item:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}
.cat-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.cat-item:hover .cat-count { color: rgba(255,255,255,.6); }

/* ---------- Ranking ---------- */
.rank-list { display: flex; flex-direction: column; gap: 2px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 12px;
  border-radius: var(--radius);
  transition: background .2s;
}
.rank-item:hover { background: var(--surface); }
.rank-num {
  flex-shrink: 0;
  width: 30px;
  font-size: 18px;
  font-weight: 800;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}
.rank-item:nth-child(-n+3) .rank-num { color: var(--primary); }
.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .2s;
}
.rank-item:hover .rank-title { color: var(--primary); }
.rank-score {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
}

/* ---------- Detail ---------- */
.detail { padding: 32px 0 64px; }
.detail-head {
  display: flex;
  gap: 40px;
  margin-bottom: 48px;
}
.detail-cover {
  flex-shrink: 0;
  width: 300px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  background: var(--surface);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { flex: 1; min-width: 0; }
.detail-meta h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 16px;
}
.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius);
  background: var(--gold-grad);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 22px;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.detail-meta p strong { color: var(--text); font-weight: 600; }
.detail-body {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}
.detail-body h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 36px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
}
.detail-body p { margin-bottom: 14px; }

/* ---------- Tags ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.tag {
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  transition: background .2s, color .2s;
}
.tag:hover { background: var(--accent); color: #fff; }

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 48px 0;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  color: var(--text);
  transition: background .2s, color .2s;
}
.pg:hover { background: var(--accent); color: #fff; }
.pg.current {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  pointer-events: none;
}
.pg.disabled {
  opacity: .35;
  pointer-events: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.link-item {
  padding: 6px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.link-item:hover { color: var(--primary); background: #faf6e8; }

/* ---------- Crumbs ---------- */
.crumbs {
  padding: 20px 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { margin: 0 6px; }

/* ---------- Highlight ---------- */
.hl { color: var(--primary); font-weight: 700; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 40px;
  padding: 48px 0 36px;
  border-top: 1px solid rgba(0,0,0,.08);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}
.footer a { color: var(--muted); transition: color .2s; }
.footer a:hover { color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(4, 1fr); }
  .hero-info { padding: 32px; }
  .hero-info h2 { font-size: 26px; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .logo { font-size: 19px; }
  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .nav a { padding: 7px 12px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 130px; height: 34px; }
  .search-box input:focus { width: 150px; }
  .search-box button { height: 34px; padding: 0 12px; }

  .hero { margin: 20px 0 40px; border-radius: var(--radius); }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 20px; max-width: 100%; }
  .hero-info h2 { font-size: 20px; margin-bottom: 8px; }
  .hero-info p { font-size: 13px; margin-bottom: 14px; }
  .btn { padding: 9px 20px; font-size: 13px; }

  .sec { margin-bottom: 44px; }
  .sec-title { font-size: 19px; }
  .sec-head { margin-bottom: 20px; }

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

  .detail-head { flex-direction: column; gap: 22px; margin-bottom: 32px; }
  .detail-cover { width: 100%; max-width: 220px; margin: 0 auto; }
  .detail-meta h1 { font-size: 24px; }
  .detail-score { font-size: 17px; padding: 5px 14px; }

  .rank-item { padding: 12px 8px; gap: 12px; }
  .rank-num { width: 24px; font-size: 16px; }

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