:root {
  --bg: #FFF8E7;
  --surface: #FFFFFF;
  --primary: #F25C3B;
  --accent: #2EC4B6;
  --text: #1F1B16;
  --muted: #7A6E62;
  --radius: 18px;
  --border: 3px solid var(--text);
  --shadow: 6px 6px 0 var(--text);
  --shadow-sm: 4px 4px 0 var(--text);
  --font-head: "Arial Black", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { 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;
  min-height: 100vh;
}

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

.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;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 1px;
  flex-shrink: 0;
  transform: rotate(-2deg);
  text-shadow: 2px 2px 0 var(--text);
}

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

.nav a {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: all .2s ease;
  white-space: nowrap;
}
.nav a:hover {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--text);
  transform: translateY(-2px) rotate(-2deg);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.search-box input {
  width: 160px;
  padding: 8px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.search-box input:focus { border-color: var(--primary); }
.search-box button {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--surface);
  background: var(--primary);
  border: 2px solid var(--text);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--text);
  transition: all .15s ease;
}
.search-box button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--text); }
.search-box button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--text); }

/* ============ HERO ============ */
.hero {
  position: relative;
  margin: 24px 0;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
  aspect-ratio: 16 / 7;
  min-height: 220px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: heroFade 15s infinite;
  display: flex;
  align-items: flex-end;
}
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 5s; }
.hero-slide:nth-child(3) { animation-delay: 10s; }
.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,.85) 0%, rgba(31,27,22,.1) 55%, transparent 100%);
}

@keyframes heroFade {
  0%, 28% { opacity: 1; z-index: 2; }
  33%, 95% { opacity: 0; z-index: 1; }
  100% { opacity: 1; z-index: 2; }
}

.hero-info {
  position: relative;
  z-index: 3;
  padding: 24px 28px;
  color: #fff;
  max-width: 70%;
}
.hero-info h2 {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 8px;
  text-shadow: 3px 3px 0 var(--text);
}
.hero-info p {
  font-size: 14px;
  opacity: .92;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  background: var(--accent);
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: all .15s ease;
}
.btn:hover { transform: translate(-2px, -2px) rotate(-2deg); box-shadow: 6px 6px 0 var(--text); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--text); }
.btn.primary { background: var(--primary); color: #fff; }

/* ============ SECTION ============ */
.sec { margin: 36px 0; }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 3px dashed var(--text);
}

.sec-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(-8deg);
  width: 8px;
  height: 24px;
  background: var(--primary);
  border-radius: 4px;
}

.sec-more {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  padding: 4px 12px;
  border: 2px solid var(--primary);
  border-radius: 999px;
  transition: all .2s ease;
  flex-shrink: 0;
}
.sec-more:hover { background: var(--primary); color: #fff; transform: rotate(-3deg); }

/* ============ GRID / CARD ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px) rotate(-1.5deg);
  box-shadow: 8px 8px 0 var(--text);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg);
  border-bottom: var(--border);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 8px;
  right: -6px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 900;
  padding: 3px 10px 3px 12px;
  border: 2px solid var(--text);
  border-radius: 6px 0 0 6px;
  transform: skewX(-8deg);
  box-shadow: 2px 2px 0 var(--text);
}

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

.card-title {
  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:hover .card-title { color: var(--primary); }

.card-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px 12px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  transition: all .2s ease;
}
.cat-item:nth-child(3n+1) { background: var(--primary); color: #fff; }
.cat-item:nth-child(3n+2) { background: var(--accent); color: #fff; }
.cat-item:nth-child(3n+3) { background: var(--surface); }
.cat-item:hover {
  transform: translateY(-4px) rotate(-2deg);
  box-shadow: 7px 7px 0 var(--text);
}

.cat-count {
  font-size: 12px;
  font-weight: 600;
  opacity: .8;
}

/* ============ RANK LIST ============ */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
}
.rank-item:hover {
  transform: translateX(6px) rotate(-.5deg);
  box-shadow: 7px 7px 0 var(--text);
}

.rank-num {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 900;
  font-style: italic;
  color: var(--primary);
  min-width: 48px;
  text-align: center;
  transform: skewX(-10deg);
  line-height: 1;
  flex-shrink: 0;
}
.rank-item:nth-child(1) .rank-num { color: #E8A600; }
.rank-item:nth-child(2) .rank-num { color: #8A8A8A; }
.rank-item:nth-child(3) .rank-num { color: #B5651D; }

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

.rank-score {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 900;
  color: var(--accent);
  flex-shrink: 0;
}

/* ============ DETAIL ============ */
.detail { margin: 28px 0; }

.detail-head {
  display: flex;
  gap: 24px;
  padding: 20px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.detail-cover {
  width: 220px;
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
  border: var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }

.detail-meta {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-meta h1 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.25;
}
.detail-meta p { font-size: 14px; color: var(--muted); }
.detail-meta p strong { color: var(--text); }

.detail-score {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  background: var(--primary);
  padding: 4px 16px;
  border: 2px solid var(--text);
  border-radius: 8px;
  transform: skewX(-8deg);
  box-shadow: 3px 3px 0 var(--text);
}

.detail-body {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  line-height: 1.8;
}
.detail-body h2 {
  font-family: var(--font-head);
  font-size: 20px;
  margin: 20px 0 10px;
  padding-left: 14px;
  border-left: 6px solid var(--accent);
}
.detail-body p { margin-bottom: 12px; }
.detail-body img { border-radius: 12px; margin: 12px 0; }

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

.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg);
  border: 2px solid var(--text);
  border-radius: 999px;
  transition: all .15s ease;
}
.tag:hover { background: var(--accent); color: #fff; transform: rotate(-3deg); }

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--text);
  transition: all .15s ease;
}
.pg:hover { background: var(--accent); color: #fff; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--text); }
.pg.current {
  background: var(--primary);
  color: #fff;
  transform: skewX(-6deg);
}
.pg.disabled {
  opacity: .4;
  pointer-events: none;
  box-shadow: none;
}

/* ============ LINKS / FOOTER ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border: 2px dashed var(--muted);
  border-radius: 999px;
  transition: all .15s ease;
}
.link-item:hover { color: var(--primary); border-color: var(--primary); transform: rotate(-2deg); }

.footer {
  margin-top: 48px;
  padding: 28px 0;
  background: var(--text);
  color: var(--bg);
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  border-top: 4px solid var(--primary);
}
.footer a { color: var(--accent); }
.footer a:hover { text-decoration: underline; }

/* ============ CRUMBS ============ */
.crumbs {
  padding: 16px 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.crumbs a { color: var(--text); font-weight: 600; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--muted); }

/* ============ HIGHLIGHT ============ */
.hl {
  background: var(--accent);
  color: var(--text);
  padding: 0 3px;
  border-radius: 4px;
  font-weight: 800;
}

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

  .header .wrap { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .logo { font-size: 20px; }
  .nav { order: 3; width: 100%; padding-bottom: 4px; }
  .nav a { padding: 5px 12px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 120px; }

  .hero { aspect-ratio: 4 / 3; margin: 16px 0; }
  .hero-info { max-width: 100%; padding: 16px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }
  .btn { padding: 8px 18px; font-size: 14px; }

  .sec { margin: 24px 0; }
  .sec-title { font-size: 18px; }
  .sec-more { font-size: 13px; }

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

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

  .rank-num { font-size: 24px; min-width: 38px; }
  .rank-title { font-size: 14px; }
  .rank-item { padding: 8px 12px; gap: 10px; }

  .detail-head { flex-direction: column; padding: 14px; gap: 16px; }
  .detail-cover { width: 140px; }
  .detail-meta h1 { font-size: 20px; }
  .detail-body { padding: 16px; }

  .pager { gap: 6px; }
  .pg { min-width: 34px; height: 34px; font-size: 13px; padding: 0 8px; }
}