:root {
  --bg: #FFFFFF;
  --surface: #F6F7F9;
  --primary: #1B3AE8;
  --accent: #FFC42E;
  --text: #14161A;
  --muted: #7A8290;
  --radius: 10px;
  --font-heading: 'Helvetica Neue', 'Arial Black', 'PingFang SC', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --shadow-hard: 6px 6px 0 var(--primary);
  --border: #E4E7EC;
}

* { 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: 15px;
  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; }

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

/* ===== Header ===== */
.header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.5px;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 3px 3px 0 var(--accent);
}

.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 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  border-radius: 6px;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: var(--surface);
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}
.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 input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background .2s;
}
.search-box button:hover { background: #1429b8; }

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20,22,26,.82) 0%, rgba(20,22,26,.45) 45%, rgba(20,22,26,0) 100%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px 36px;
  max-width: 60%;
  color: #fff;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -.5px;
}
.hero-info p {
  font-size: 14px;
  color: rgba(255,255,255,.78);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Button ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover {
  color: #fff;
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--primary);
}
.btn.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: none;
}
.btn.btn-ghost:hover {
  background: var(--primary);
  color: #fff;
  transform: none;
  box-shadow: none;
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.5px;
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 22px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 3px 3px 0 var(--accent);
}

.sec-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sec-more:hover { color: var(--primary); }
.sec-more::after { content: "→"; }

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

.card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard);
  border-color: var(--primary);
}

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-heading);
}

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

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

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

/* ===== 分类 ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cat-item:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard);
  border-color: var(--primary);
  color: var(--primary);
}

.cat-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.rank-item:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard);
  border-color: var(--primary);
}

.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 900;
  color: var(--muted);
  background: var(--surface);
  border-radius: 6px;
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  background: var(--primary);
  color: #fff;
}

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

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

/* ===== 详情页 ===== */
.detail { margin: 32px 0; }

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hard);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta { display: flex; flex-direction: column; gap: 12px; }

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

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 900;
  color: var(--primary);
}
.detail-score small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-body {
  margin-top: 32px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  margin: 24px 0 12px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
}
.detail-body p { margin-bottom: 14px; color: #3a3f47; }

/* ===== 标签 ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all .2s;
}
.tag:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .2s;
}
.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 3px 3px 0 var(--accent);
}
.pg.disabled {
  color: #c4c9d1;
  border-color: var(--border);
  pointer-events: none;
  background: var(--surface);
}

/* ===== 友情链接 ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  background: var(--surface);
  border-radius: 6px;
  transition: all .2s;
}
.link-item:hover {
  color: var(--primary);
  background: #eef0ff;
}

/* ===== 面包屑 ===== */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0;
  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; }

/* ===== 搜索高亮 ===== */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(255,196,46,.28);
  padding: 0 2px;
  border-radius: 3px;
}

/* ===== Footer ===== */
.footer {
  margin-top: 60px;
  padding: 36px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(4, 1fr); }
  .detail-head { grid-template-columns: 200px 1fr; gap: 24px; }
}

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

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 12px;
  }
  .logo { font-size: 19px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .nav a { padding: 7px 10px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 120px; }

  .hero { margin: 18px 0; }
  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-slide::after {
    background: linear-gradient(0deg, rgba(20,22,26,.88) 0%, rgba(20,22,26,.35) 55%, rgba(20,22,26,0) 100%);
  }
  .hero-info { max-width: 100%; padding: 20px; }
  .hero-info h2 { font-size: 22px; }

  .sec { margin: 30px 0; }
  .sec-title { font-size: 19px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cat-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .rank-list { grid-template-columns: 1fr; }

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .detail-cover { max-width: 200px; }
  .detail-meta h1 { font-size: 23px; }
  .detail-score { font-size: 28px; }

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

  .footer .wrap { flex-direction: column; text-align: center; }
}