:root {
  --bg: #ECEDF0;
  --surface: #F7F8FA;
  --primary: #1B3FD8;
  --accent: #FF5A1F;
  --text: #16181C;
  --muted: #6B7079;
  --radius: 4px;
  --font-heading: 'Helvetica Neue', 'Arial Black', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --line: #D5D7DD;
  --shadow-hard: 4px 4px 0 var(--primary);
  --shadow-accent: 4px 4px 0 var(--accent);
}

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

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

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

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
}

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

/* ===== Header ===== */
.header {
  background: var(--surface);
  border-bottom: 2px solid var(--text);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover { color: var(--primary); }
.logo::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--primary);
  margin-right: 8px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  border-radius: var(--radius);
  transition: background .2s, color .2s;
}
.nav a:hover,
.nav a.active {
  background: var(--primary);
  color: #fff;
}

.search-box {
  display: flex;
  align-items: center;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  flex-shrink: 0;
  height: 38px;
}
.search-box input {
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 13px;
  font-family: var(--font-body);
  width: 160px;
  height: 100%;
  background: transparent;
  color: var(--text);
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  padding: 0 16px;
  height: 100%;
  cursor: pointer;
  transition: background .2s;
}
.search-box button:hover { background: var(--accent); }

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  margin: 24px 0;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-hard);
}
.hero-slide {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 40px 32px 28px;
  background: linear-gradient(to top, rgba(22,24,28,.92) 0%, rgba(22,24,28,.55) 55%, transparent 100%);
  color: #fff;
}
.hero-info h2 {
  font-size: 30px;
  margin-bottom: 10px;
  color: #fff;
}
.hero-info p {
  font-size: 14px;
  color: #C9CCD4;
  max-width: 640px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: var(--primary);
  border: 2px solid var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover {
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--accent);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--accent);
}
.btn.accent { background: var(--accent); box-shadow: var(--shadow-hard); }
.btn.accent:hover { box-shadow: 6px 6px 0 var(--primary); }

/* ===== Section ===== */
.sec { margin: 36px 0; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--text);
}
.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 22px;
  background: var(--primary);
}
.sec-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.sec-more:hover { color: var(--accent); }
.sec-more::after { content: ' →'; }

/* ===== Grid & Card ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s, box-shadow .18s;
  box-shadow: 2px 2px 0 var(--text);
}
.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--primary);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #D5D7DD;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.card:hover .card-cover img { transform: scale(1.05); }

.card-score {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  padding: 4px 10px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%);
  border-left: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  line-height: 1.2;
}
.card-info { padding: 10px 12px 12px; }
.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  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;
  white-space: nowrap;
  overflow: hidden;
}

/* ===== 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: 14px 16px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  transition: background .18s, color .18s, transform .18s, box-shadow .18s;
}
.cat-item:hover {
  background: var(--primary);
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent);
}
.cat-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: var(--radius);
}
.cat-item:hover .cat-count { background: rgba(255,255,255,.2); color: #fff; }

/* ===== Rank list ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.rank-item:last-child { border-bottom: none; }
.rank-item:hover { background: #fff; }
.rank-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  color: var(--primary);
  width: 32px;
  flex-shrink: 0;
  text-align: center;
}
.rank-item:nth-child(-n+3) .rank-num { color: var(--accent); }
.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ===== Detail ===== */
.detail { margin: 24px 0; }
.detail-head {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}
.detail-cover {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  flex-shrink: 0;
  margin: 0 auto;
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta { flex: 1; min-width: 0; }
.detail-meta h1 {
  font-size: 24px;
  margin-bottom: 10px;
}
.detail-meta p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.detail-meta p b { color: var(--text); font-weight: 600; }
.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  background: var(--accent);
  padding: 4px 14px;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  margin: 10px 0;
}
.detail-body {
  margin-top: 24px;
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}
.detail-body h2 {
  font-size: 18px;
  margin: 20px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body p { margin-bottom: 10px; }
.detail-body img { border-radius: var(--radius); margin: 10px 0; }

/* ===== Tags ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background .15s, color .15s, border-color .15s;
}
.tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== 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: 38px;
  height: 38px;
  padding: 0 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius);
  transition: background .15s, color .15s, transform .15s, box-shadow .15s;
}
.pg:hover {
  background: var(--primary);
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--accent);
}
.pg.current {
  background: var(--primary);
  color: #fff;
  box-shadow: 3px 3px 0 var(--accent);
  cursor: default;
}
.pg.disabled {
  color: var(--muted);
  border-color: var(--line);
  background: var(--bg);
  pointer-events: none;
  opacity: .6;
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 16px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color .15s;
}
.link-item:hover { color: var(--primary); }

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  background: var(--text);
  color: #C9CCD4;
  font-size: 13px;
  border-top: 4px solid var(--primary);
}
.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}
.footer a { color: #C9CCD4; }
.footer a:hover { color: var(--accent); }
.footer p { line-height: 1.7; }

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

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

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .cat-list { grid-template-columns: repeat(3, 1fr); }
  .detail-head { flex-direction: row; align-items: flex-start; }
  .detail-cover { margin: 0; }
  .hero-slide { aspect-ratio: 21 / 8; }
  .hero-info { padding: 56px 40px 36px; }
  .hero-info h2 { font-size: 38px; }
  .footer .wrap { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(4, 1fr); }
  .hero-info h2 { font-size: 44px; }
}

@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    padding-bottom: 4px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }
  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }
  .hero { margin: 16px 0; box-shadow: 3px 3px 0 var(--primary); }
  .hero-info { padding: 24px 16px 18px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }
  .sec { margin: 24px 0; }
  .sec-title { font-size: 18px; }
  .detail-head { padding: 16px; box-shadow: 3px 3px 0 var(--primary); }
  .detail-meta h1 { font-size: 20px; }
  .detail-body { padding: 16px; }
  .footer { margin-top: 32px; }
}