:root {
  --bg: #FFF8F2;
  --surface: #FFFFFF;
  --primary: #FF4D6D;
  --accent: #2EC4B6;
  --text: #2B2D42;
  --muted: #8D99AE;
  --radius: 20px;
  --border: 2px solid var(--text);
  --shadow: 6px 6px 0 rgba(43, 45, 66, 0.12);
  --shadow-hover: 10px 10px 0 rgba(255, 77, 109, 0.25);
  --font-heading: 'Archivo Black', 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  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 16px;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: var(--border);
  box-shadow: 0 4px 0 rgba(43, 45, 66, 0.06);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--primary);
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg);
  border: var(--border);
  border-radius: 12px;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 var(--accent);
}

.logo:hover { transform: rotate(0deg); }

.nav {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.nav a {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid transparent;
  transition: all .2s;
}

.nav a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--text);
  transform: translateY(-2px);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 3px 3px 0 rgba(46, 196, 182, 0.4);
}

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

.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
}

.search-box button:hover { background: var(--accent); }

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 7;
  background: var(--text);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide:first-child { opacity: 1; }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(43,45,66,.85) 0%, rgba(43,45,66,.2) 70%, transparent 100%);
}

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

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 34px);
  margin-bottom: 8px;
  text-shadow: 2px 2px 0 rgba(0,0,0,.3);
}

.hero-info p {
  color: #f0f0f0;
  font-size: 14px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border: var(--border);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--accent);
  cursor: pointer;
  transition: all .2s;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--accent);
}

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

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

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px;
  background: var(--accent);
  color: #fff;
  border: var(--border);
  border-radius: 10px;
  transform: rotate(-1.5deg);
  box-shadow: 3px 3px 0 var(--primary);
}

.sec-more {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

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

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

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

.card:hover {
  transform: translate(-4px, -4px) rotate(-1deg);
  box-shadow: var(--shadow-hover);
}

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 2px 8px;
  border: 2px solid var(--text);
  border-radius: 8px;
  transform: rotate(4deg);
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* ===== 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;
  padding: 12px 16px;
  background: var(--surface);
  border: var(--border);
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 3px 3px 0 rgba(46,196,182,.3);
  transition: all .2s;
}

.cat-item:hover {
  background: var(--accent);
  color: #fff;
  transform: translate(-2px, -2px);
}

.cat-count {
  font-size: 12px;
  background: var(--primary);
  color: #fff;
  padding: 1px 8px;
  border-radius: 8px;
  border: 2px solid var(--text);
}

/* ===== Rank List ===== */
.rank-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: var(--border);
  border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(255,77,109,.2);
  transition: all .2s;
}

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

.rank-num {
  font-family: var(--font-heading);
  font-size: 18px;
  min-width: 32px;
  text-align: center;
  color: var(--primary);
}

.rank-item:nth-child(-n+3) .rank-num { color: var(--accent); }

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

.rank-score {
  font-weight: 800;
  color: var(--primary);
  font-size: 14px;
}

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

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

.detail-cover {
  width: 200px;
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
  border: var(--border);
  border-radius: 14px;
  overflow: hidden;
}

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

.detail-meta { flex: 1; min-width: 220px; }

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: 12px;
}

.detail-meta p { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.detail-meta p b { color: var(--text); }

.detail-score {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  padding: 4px 14px;
  border: var(--border);
  border-radius: 10px;
  margin: 10px 0;
  transform: rotate(-2deg);
}

.detail-body {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.8;
}

.detail-body h3 {
  font-family: var(--font-heading);
  margin: 16px 0 10px;
  color: 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;
  background: var(--bg);
  border: 2px solid var(--text);
  border-radius: 20px;
  transition: all .2s;
}

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

/* ===== 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: 38px;
  height: 38px;
  padding: 0 12px;
  font-weight: 700;
  font-size: 14px;
  background: var(--surface);
  border: var(--border);
  border-radius: 10px;
  box-shadow: 2px 2px 0 rgba(43,45,66,.12);
  transition: all .2s;
}

.pg:hover { background: var(--accent); color: #fff; transform: translate(-1px,-1px); }

.pg.current {
  background: var(--primary);
  color: #fff;
  box-shadow: 3px 3px 0 var(--accent);
}

.pg.disabled {
  opacity: .4;
  pointer-events: none;
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.link-item {
  font-size: 13px;
  padding: 4px 12px;
  background: var(--bg);
  border: 2px solid var(--text);
  border-radius: 8px;
  transition: all .2s;
}

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

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

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

/* ===== Crumbs ===== */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0;
  padding: 8px 14px;
  background: var(--surface);
  border: 2px dashed var(--muted);
  border-radius: 10px;
}

.crumbs a { color: var(--primary); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

/* ===== Highlight ===== */
.hl {
  background: var(--accent);
  color: #fff;
  padding: 0 3px;
  border-radius: 4px;
  font-weight: 700;
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .cat-list { grid-template-columns: repeat(3, 1fr); }
  .rank-list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .cat-list { grid-template-columns: repeat(4, 1fr); }
  .rank-list { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-title { font-size: 15px; }
}

@media (max-width: 768px) {
  .header .wrap { gap: 10px; }
  .logo { font-size: 18px; padding: 4px 10px; }
  .nav { flex: 1 1 100%; order: 3; }
  .search-box { flex: 1 1 auto; }
  .search-box input { width: 100%; min-width: 0; }
  .hero { aspect-ratio: 4 / 3; margin: 18px 0; }
  .hero-info { max-width: 100%; padding: 18px; }
  .hero-info h2 { font-size: 20px; }
  .sec { margin: 28px 0; }
  .sec-title { font-size: 18px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-list { grid-template-columns: 1fr; }
  .rank-list { grid-template-columns: 1fr; }
  .detail-head { padding: 16px; gap: 16px; }
  .detail-cover { width: 130px; }
  .detail-body { padding: 16px; }
  .card-title { font-size: 13px; }
  .card-info { padding: 8px 10px 12px; }
}