:root {
  --bg: #F7F3EC;
  --surface: #FFFFFF;
  --primary: #D94F2A;
  --accent: #F2A65A;
  --text: #1E1C1A;
  --muted: #7A746E;
  --radius: 20px;
  --font-heading: 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --shadow: 0 12px 32px rgba(30, 28, 26, 0.08);
  --shadow-hover: 0 18px 42px rgba(217, 79, 42, 0.18);
}

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

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

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

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 {
  background: var(--surface);
  border-bottom: 1px solid rgba(30, 28, 26, 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 4px;
  transform: rotate(12deg);
}

.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;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav a:hover {
  color: var(--primary);
  background: rgba(217, 79, 42, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid rgba(30, 28, 26, 0.08);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  min-width: 220px;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  min-width: 0;
}

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

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

.search-box button:hover { background: #c0431f; }

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

.hero-slide {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 280px;
  background: linear-gradient(135deg, #2a2622, #4a3f36);
}

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

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

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217, 79, 42, 0.4);
}

/* ---------- Section ---------- */
.sec { margin-bottom: 48px; }

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

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
  padding-left: 16px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(8deg);
  width: 6px;
  height: 22px;
  background: var(--primary);
  border-radius: 3px;
}

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

.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;
  display: flex;
  flex-direction: column;
}

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

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e8e2d8;
}

.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: 10px;
  right: 10px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 8px;
  transform: rotate(6deg);
  box-shadow: 0 4px 12px rgba(217, 79, 42, 0.4);
}

.card-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

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

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.cat-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(217, 79, 42, 0.1);
  padding: 2px 10px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: 14px;
  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 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  min-width: 32px;
  text-align: center;
  font-style: italic;
}

.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.detail-head {
  display: flex;
  gap: 32px;
  margin-bottom: 28px;
}

.detail-cover {
  flex: 0 0 240px;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #e8e2d8;
  box-shadow: var(--shadow);
}

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

.detail-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

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

.detail-meta .meta-line b { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 12px;
  transform: rotate(-3deg);
  align-self: flex-start;
  box-shadow: 0 6px 16px rgba(217, 79, 42, 0.35);
}

.detail-body {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}

.detail-body p { margin-bottom: 14px; }
.detail-body h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  margin: 20px 0 10px;
  padding-left: 14px;
  position: relative;
}

.detail-body h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(8deg);
  width: 5px;
  height: 18px;
  background: var(--primary);
  border-radius: 3px;
}

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

.tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid rgba(30, 28, 26, 0.08);
  padding: 5px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.tag:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(217, 79, 42, 0.06);
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  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 6px 16px rgba(217, 79, 42, 0.35);
}

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

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  transition: color 0.2s ease;
}

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

/* ---------- Footer ---------- */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 36px 0 28px;
  margin-top: 40px;
  font-size: 13px;
}

.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.footer a { color: rgba(255, 255, 255, 0.85); }
.footer a:hover { color: var(--accent); }

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

.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(242, 166, 90, 0.25);
  padding: 0 2px;
  border-radius: 3px;
}

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

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

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

  .logo { font-size: 19px; }

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

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

  .search-box {
    order: 2;
    flex: 1;
    min-width: 0;
  }

  .hero { margin: 18px 0 28px; }
  .hero-slide { aspect-ratio: 4 / 3; min-height: 220px; }
  .hero-info { padding: 48px 20px 20px; }
  .hero-info h2 { font-size: 21px; }
  .hero-info p { font-size: 13px; }

  .sec { margin-bottom: 32px; }
  .sec-title { font-size: 20px; }

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

  .detail { padding: 20px 16px; margin: 18px 0 28px; }
  .detail-head { flex-direction: column; gap: 20px; }
  .detail-cover { flex: none; width: 160px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; }
  .detail-meta { text-align: center; align-items: center; }
  .detail-score { align-self: center; }

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

  .footer { padding: 28px 0 22px; }
}