:root {
  --bg: #EEF1F4;
  --surface: #FCFAF5;
  --primary: #B84A2F;
  --accent: #7C9BAE;
  --text: #25282C;
  --muted: #7E858D;
  --radius: 18px;
  --font: 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --line: rgba(37, 40, 44, 0.08);
  --shadow: 0 6px 20px rgba(37, 40, 44, 0.06);
  --shadow-hover: 0 14px 32px rgba(37, 40, 44, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(rgba(37, 40, 44, 0.035) 1px, transparent 1px);
  background-size: 3px 3px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: var(--primary); }

img { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-weight: 300;
  letter-spacing: 0.02em;
  margin: 0;
}

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 250, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 10px;
  vertical-align: middle;
}

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

.nav::-webkit-scrollbar { display: none; }

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

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(184, 74, 47, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 14px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  width: 140px;
}

.search-box input::placeholder { color: var(--muted); }

.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.search-box button:hover { opacity: 0.85; }

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

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}

.hero-slide.active { display: block; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 32px 28px;
  background: linear-gradient(to top, rgba(20, 22, 25, 0.85), transparent);
  color: #fff;
}

.hero-info h2 {
  font-size: 26px;
  font-weight: 300;
  margin-bottom: 8px;
}

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

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  padding: 9px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(184, 74, 47, 0.3);
}

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

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sec-title {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.06em;
  position: relative;
  padding-left: 14px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--primary);
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.sec-more:hover { color: var(--primary); }

/* ---------- Grid & Card ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-cover img { transform: scale(1.04); }

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

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

.card-title {
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* ---------- Cat List ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.cat-count {
  font-size: 12px;
  color: var(--primary);
  background: rgba(184, 74, 47, 0.08);
  padding: 2px 10px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
}

.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  color: var(--muted);
  background: var(--bg);
}

.rank-item:nth-child(1) .rank-num { background: var(--primary); color: #fff; }
.rank-item:nth-child(2) .rank-num { background: var(--accent); color: #fff; }
.rank-item:nth-child(3) .rank-num { background: rgba(184, 74, 47, 0.5); color: #fff; }

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

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

/* ---------- Detail ---------- */
.detail {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 28px 0;
}

.detail-head {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-cover {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  flex: 1;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-meta h1 {
  font-size: 24px;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 4px;
}

.detail-score {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 14px;
  border-radius: 999px;
  align-self: flex-start;
}

.detail-body {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}

.detail-body p { margin: 0 0 14px; }

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

.tag {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 4px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.tag:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ---------- 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: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.pg:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.pg.current {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(184, 74, 47, 0.3);
}

.pg.disabled {
  color: var(--muted);
  opacity: 0.45;
  pointer-events: none;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 5px 14px;
  background: var(--surface);
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: all 0.2s ease;
}

.link-item:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ---------- Crumbs ---------- */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 0;
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  background: rgba(184, 74, 47, 0.1);
  padding: 0 3px;
  border-radius: 4px;
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cat-list { grid-template-columns: repeat(3, 1fr); }
  .detail-head { flex-direction: row; }
  .detail-cover { max-width: 240px; }
  .hero-info h2 { font-size: 32px; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(4, 1fr); }
  .hero-slide { aspect-ratio: 21 / 8; }
  .hero-info { padding: 80px 48px 36px; }
  .hero-info h2 { font-size: 38px; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 14px; }
  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }
  .logo { font-size: 18px; }
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .search-box { margin-left: auto; }
  .search-box input { width: 100px; }
  .hero { margin: 18px 0; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 44px 18px 18px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; }
  .sec { margin: 28px 0; }
  .sec-title { font-size: 17px; }
  .grid { grid-template-columns: 1fr; }
  .cat-list { grid-template-columns: 1fr 1fr; }
  .detail { padding: 16px; }
  .detail-cover { max-width: 160px; }
  .detail-meta h1 { font-size: 20px; }
  .footer { font-size: 12px; }
}