:root {
  --bg: #FFFDF8;
  --surface: #FFFFFF;
  --primary: #FF6B35;
  --accent: #2EC4B6;
  --text: #1F1B16;
  --muted: #7A7168;
  --radius: 20px;
  --radius-sm: 12px;
  --border: 2px solid var(--text);
  --shadow: 0 6px 20px rgba(31, 27, 22, .08);
  --shadow-hover: 0 14px 32px rgba(31, 27, 22, .16);
  --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; }

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

/* ---------- Header ---------- */
.header {
  background: var(--surface);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
  flex-wrap: nowrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo img { height: 32px; width: auto; }
.logo::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent);
  border: var(--border);
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: all .2s ease;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--text);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: var(--bg);
  border: var(--border);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  width: 140px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  transition: transform .15s ease;
}
.search-box button:hover { transform: scale(1.05); }

/* ---------- Hero 轮播 ---------- */
.hero {
  position: relative;
  margin: 24px auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow);
}
.hero-slide {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, #FFE8DE 0%, #DFF7F4 100%);
  overflow: hidden;
}
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(31, 27, 22, .78) 0%, rgba(31, 27, 22, .1) 55%, transparent 100%);
}
.hero-info {
  position: relative;
  z-index: 2;
  padding: 32px;
  max-width: 620px;
  color: #fff;
}
.hero-info h2 {
  font-size: 30px;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .3);
}
.hero-info p {
  margin: 0 0 18px;
  font-size: 14px;
  opacity: .9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 var(--text);
  transition: all .18s ease;
  cursor: pointer;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--text);
}
.btn:active {
  transform: translate(0, 0);
  box-shadow: 1px 1px 0 var(--text);
}
.btn.ghost {
  background: var(--surface);
  color: var(--text);
}

/* ---------- Section ---------- */
.sec { margin: 40px auto; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.sec-title {
  position: relative;
  font-size: 22px;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 24px;
  border-radius: 4px;
  background: var(--primary);
  border: 2px solid var(--text);
}
.sec-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: all .2s ease;
  white-space: nowrap;
}
.sec-more:hover {
  color: var(--text);
  border-color: var(--text);
  background: var(--surface);
}

/* ---------- Grid & Card ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid transparent;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--text);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #FFE8DE, #DFF7F4);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: var(--accent);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  border: 2px solid var(--text);
  box-shadow: 2px 2px 0 var(--text);
}
.card-info { padding: 12px 14px 16px; }
.card-title {
  font-size: 15px;
  font-weight: 700;
  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 8px;
}

/* ---------- Cat list ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: var(--border);
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--text);
  transition: all .18s ease;
}
.cat-item:nth-child(4n+1) { background: #FFE8DE; }
.cat-item:nth-child(4n+2) { background: #DFF7F4; }
.cat-item:nth-child(4n+3) { background: #FFF3C4; }
.cat-item:nth-child(4n+4) { background: #E8E4FF; }
.cat-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--text);
}
.cat-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border-radius: 999px;
  padding: 1px 10px;
  border: 1.5px solid var(--text);
}

/* ---------- Rank list ---------- */
.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  transition: all .2s ease;
}
.rank-item:hover {
  border-color: var(--text);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.rank-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  border-radius: 8px;
  background: var(--bg);
  border: 2px solid var(--text);
}
.rank-item:nth-child(1) .rank-num { background: var(--primary); color: #fff; }
.rank-item:nth-child(2) .rank-num { background: var(--accent); }
.rank-item:nth-child(3) .rank-num { background: #FFF3C4; }
.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}

/* ---------- Detail ---------- */
.detail { margin: 28px auto; }
.detail-head {
  display: flex;
  gap: 28px;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.detail-cover {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: var(--border);
  background: linear-gradient(135deg, #FFE8DE, #DFF7F4);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta { flex: 1; min-width: 0; }
.detail-meta h1 { font-size: 26px; margin-bottom: 8px; }
.detail-meta p { margin: 4px 0; font-size: 14px; color: var(--muted); }
.detail-meta p strong { color: var(--text); font-weight: 600; }
.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
  padding: 4px 16px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  background: var(--accent);
  border-radius: 999px;
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 var(--text);
}
.detail-body {
  background: var(--surface);
  border-radius: var(--radius);
  border: var(--border);
  padding: 28px;
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.9;
}
.detail-body h2 {
  font-size: 18px;
  margin: 24px 0 12px;
  padding-left: 14px;
  position: relative;
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 18px;
  border-radius: 3px;
  background: var(--primary);
}

/* ---------- Tags ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--bg);
  border: 1.5px solid var(--text);
  color: var(--text);
  transition: all .18s ease;
}
.tag:hover { background: var(--primary); color: #fff; }

/* ---------- 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: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  background: var(--surface);
  border: 2px solid var(--text);
  box-shadow: 2px 2px 0 var(--text);
  transition: all .18s ease;
}
.pg:hover { background: var(--bg); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--text); }
.pg.current {
  background: var(--primary);
  color: #fff;
  cursor: default;
}
.pg.disabled {
  opacity: .4;
  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 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid #E5E0D8;
  transition: all .18s ease;
}
.link-item:hover {
  color: var(--text);
  border-color: var(--text);
  background: var(--bg);
}

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

/* ---------- Crumbs ---------- */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(255, 107, 53, .12);
  border-radius: 4px;
  padding: 0 2px;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .wrap { padding: 0 14px; }
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }
  .logo { font-size: 18px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .nav a { padding: 5px 12px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 100px; }

  .hero { margin: 16px auto; }
  .hero-slide { min-height: 220px; }
  .hero-info { padding: 20px; }
  .hero-info h2 { font-size: 20px; }

  .sec { margin: 28px auto; }
  .sec-title { font-size: 18px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-info { padding: 10px 10px 12px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; }

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

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

  .detail-head {
    flex-direction: column;
    padding: 18px;
    gap: 18px;
  }
  .detail-cover { width: 160px; margin: 0 auto; }
  .detail-meta h1 { font-size: 20px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { display: flex; justify-content: center; width: fit-content; margin: 12px auto; }
  .detail-body { padding: 18px; }

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