:root {
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --primary: #C43A2F;
  --accent: #1A1816;
  --text: #1A1816;
  --muted: #8C857C;
  --radius: 4px;
  --font-heading: 'Helvetica Neue', 'Arial Black', 'Noto Sans SC', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --shadow: 0 2px 8px rgba(26, 24, 22, 0.06), 0 8px 24px rgba(26, 24, 22, 0.04);
  --shadow-hover: 0 4px 12px rgba(26, 24, 22, 0.1), 0 12px 32px rgba(26, 24, 22, 0.08);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(196, 58, 47, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(26, 24, 22, 0.02) 0%, transparent 50%);
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

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

/* ===== Header ===== */
.header {
  background: var(--surface);
  border-bottom: 1px solid rgba(26, 24, 22, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  padding-left: 14px;
}

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

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

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

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

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

.nav a:hover { color: var(--primary); background: rgba(196, 58, 47, 0.06); }

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid rgba(26, 24, 22, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.search-box:focus-within { border-color: var(--primary); }

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

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

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

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

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 32px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--accent);
  aspect-ratio: 21 / 9;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-slide.active { opacity: 1; }

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

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26, 24, 22, 0.85) 0%, rgba(26, 24, 22, 0.4) 50%, transparent 100%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 40px;
  max-width: 560px;
  color: #fff;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.hero-info p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.btn:hover { background: #a82f26; transform: translateY(-1px); }

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

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(26, 24, 22, 0.08);
  position: relative;
}

.sec-head::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 2px;
  background: var(--primary);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--accent);
}

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

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

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

.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: #e8e4dc;
}

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  letter-spacing: 0.3px;
  z-index: 2;
}

.card-info { padding: 10px 12px 12px; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.card:hover .card-title { color: var(--primary); }

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

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: all 0.2s;
}

.cat-item:hover { transform: translateX(3px); color: var(--primary); }

.cat-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  font-family: var(--font-heading);
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.rank-item:hover { background: rgba(196, 58, 47, 0.05); }

.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: var(--muted);
  min-width: 32px;
  text-align: center;
  font-style: italic;
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num { color: var(--primary); }

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

.rank-item:hover .rank-title { color: var(--primary); }

.rank-score {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #e8e4dc;
  box-shadow: var(--shadow);
}

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

.detail-meta { display: flex; flex-direction: column; gap: 4px; }

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.2;
  color: var(--accent);
  margin-bottom: 8px;
}

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 12px;
}

.detail-score small { font-size: 13px; color: var(--muted); font-weight: 400; }

.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
}

.detail-meta p strong { color: var(--accent); font-weight: 600; margin-right: 6px; }

.detail-body {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}

.detail-body h2:first-child { margin-top: 0; }

.detail-body p { margin-bottom: 12px; }

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

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 4px 12px;
  background: rgba(196, 58, 47, 0.08);
  color: var(--primary);
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s;
}

.tag:hover { background: var(--primary); color: #fff; }

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(26, 24, 22, 0.08);
  border-radius: var(--radius);
  transition: all 0.2s;
}

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

.pg.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 700;
}

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

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 24px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}

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

/* ===== Footer ===== */
.footer {
  margin-top: 64px;
  padding: 40px 0 32px;
  background: var(--accent);
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  text-align: center;
}

.footer a { color: rgba(255, 255, 255, 0.8); }
.footer a:hover { color: var(--primary); }
.footer p { margin-bottom: 8px; line-height: 1.8; }

/* ===== Crumbs ===== */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin: 24px 0 8px;
  line-height: 1.8;
}

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

/* ===== Highlight ===== */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(196, 58, 47, 0.08);
  padding: 0 2px;
  border-radius: 2px;
}

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

@media (max-width: 768px) {
  .wrap { padding: 0 16px; }

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .logo { font-size: 19px; }

  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .nav a { padding: 6px 10px; font-size: 13px; }

  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero {
    aspect-ratio: 16 / 10;
    margin: 20px 0;
  }

  .hero-info { padding: 20px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }

  .sec { margin: 32px 0; }
  .sec-title { font-size: 19px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

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

  .rank-list { grid-template-columns: 1fr; gap: 4px; }

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-meta h1 { font-size: 24px; }
  .detail-body { padding: 20px; }

  .pg { min-width: 34px; height: 34px; padding: 0 8px; }
}