:root {
  --bg: #E8EDF2;
  --surface: #FFFFFF;
  --primary: #A8C0D6;
  --accent: #1A9E8F;
  --text: #1F2A36;
  --muted: #7D8E9F;
  --radius: 14px;
  --font-heading: 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  --shadow: 0 2px 12px rgba(31, 42, 54, 0.06);
  --shadow-hover: 0 6px 20px rgba(31, 42, 54, 0.12);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  background-image:
    linear-gradient(180deg, rgba(168, 192, 214, 0.18) 0%, rgba(232, 237, 242, 0) 320px),
    radial-gradient(circle at 85% 0%, rgba(26, 158, 143, 0.06) 0%, transparent 40%);
  background-repeat: no-repeat;
}

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 {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(232, 237, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(168, 192, 214, 0.4);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(26, 158, 143, 0.6);
}

.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;
  font-size: 14px;
  color: var(--muted);
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover {
  color: var(--text);
  background: rgba(168, 192, 214, 0.35);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid rgba(168, 192, 214, 0.6);
  border-radius: 999px;
  padding: 4px 4px 4px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 158, 143, 0.12);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  width: 140px;
  font-family: inherit;
}

.search-box input::placeholder { color: var(--muted); }

.search-box button {
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  transition: opacity 0.2s;
}

.search-box button:hover { opacity: 0.85; }

/* ============ Hero 轮播 ============ */
.hero {
  position: relative;
  margin: 24px auto;
  max-width: 1200px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--primary);
}

.hero-slide {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  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(31, 42, 54, 0.82) 0%, rgba(31, 42, 54, 0.35) 45%, transparent 75%);
  pointer-events: none;
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px 40px;
  max-width: 560px;
  color: #fff;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-info p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(26, 158, 143, 0.35);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 158, 143, 0.45);
}

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

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

.sec-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-left: 16px;
  letter-spacing: 0.3px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
  white-space: nowrap;
}

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

.sec-more::after { content: "›"; font-size: 16px; }

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

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), #c8d8e6);
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(31, 42, 54, 0.55) 100%);
  pointer-events: none;
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: rgba(26, 158, 143, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-heading);
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

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

.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;
  transition: color 0.2s;
}

.card:hover .card-title { color: var(--accent); }

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  line-height: 1.4;
}

.card-meta span { white-space: nowrap; }

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cat-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.cat-item:hover::before { transform: scaleY(1); }

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(168, 192, 214, 0.25);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 400;
}

/* ============ Rank List ============ */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.rank-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(168, 192, 214, 0.25);
  border-radius: 8px;
}

.rank-item:nth-child(1) .rank-num { background: var(--accent); color: #fff; }
.rank-item:nth-child(2) .rank-num { background: rgba(26, 158, 143, 0.65); color: #fff; }
.rank-item:nth-child(3) .rank-num { background: rgba(26, 158, 143, 0.4); color: #fff; }

.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}

.rank-item:hover .rank-title { color: var(--accent); }

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

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

.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.detail-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), #c8d8e6);
  box-shadow: 0 8px 24px rgba(31, 42, 54, 0.15);
}

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

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

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

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

.detail-meta p strong { color: var(--text); font-weight: 500; }

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin: 4px 0;
}

.detail-score::before {
  content: "★";
  font-size: 18px;
  color: var(--accent);
}

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

.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin: 20px 0 10px;
  color: var(--text);
}

.detail-body h2:first-child { margin-top: 0; }

.detail-body p { margin-bottom: 12px; color: #3a4a5a; }

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

.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--accent);
  background: rgba(26, 158, 143, 0.08);
  border: 1px solid rgba(26, 158, 143, 0.25);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

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

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.pg:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.pg.current {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(26, 158, 143, 0.3);
}

.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 20px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}

.link-item:hover { color: var(--accent); }

/* ============ Footer ============ */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid rgba(168, 192, 214, 0.4);
  background: linear-gradient(180deg, transparent, rgba(168, 192, 214, 0.12));
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}

.footer a { color: var(--muted); transition: color 0.2s; }
.footer a:hover { color: var(--accent); }

.footer p { margin: 4px 0; }

/* ============ Crumbs ============ */
.crumbs {
  padding: 16px 0 4px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.crumbs a { color: var(--muted); transition: color 0.2s; }
.crumbs a:hover { color: var(--accent); }

.crumbs span { color: var(--muted); }

/* ============ Highlight ============ */
.hl {
  color: var(--accent);
  font-weight: 600;
  background: rgba(26, 158, 143, 0.1);
  border-radius: 3px;
  padding: 0 2px;
}

/* ============ 装饰：扫描线取景框 ============ */
.hero::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(26, 158, 143, 0.35);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
  z-index: 3;
  clip-path: polygon(
    0 0, 28px 0, 28px 1px, 1px 1px, 1px 28px, 0 28px,
    0 100%, 0 calc(100% - 28px), 1px calc(100% - 28px), 1px calc(100% - 1px), 28px calc(100% - 1px), 28px 100%,
    100% 100%, calc(100% - 28px) 100%, calc(100% - 28px) calc(100% - 1px), calc(100% - 1px) calc(100% - 1px), calc(100% - 1px) calc(100% - 28px), 100% calc(100% - 28px),
    100% 0, 100% 28px, calc(100% - 1px) 28px, calc(100% - 1px) 1px, calc(100% - 28px) 1px, calc(100% - 28px) 0
  );
}

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

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .logo { font-size: 18px; }

  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    gap: 2px;
    padding-bottom: 2px;
  }

  .nav a { padding: 5px 12px; font-size: 13px; }

  .search-box { margin-left: auto; }
  .search-box input { width: 100px; }

  .hero { margin: 16px 0; border-radius: 10px; }

  .hero-slide { aspect-ratio: 16 / 10; }

  .hero-info {
    padding: 20px;
    max-width: 100%;
  }

  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }

  .hero::before { inset: 8px; }

  .sec { margin: 28px 0; }
  .sec-title { font-size: 17px; }

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

  .card-info { padding: 8px 10px 10px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; }

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

  .rank-item { padding: 10px 12px; gap: 10px; }
  .rank-title { font-size: 13px; }

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }

  .detail-cover {
    max-width: 180px;
    margin: 0 auto;
  }

  .detail-meta h1 { font-size: 20px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { justify-content: center; display: flex; }

  .detail-body { padding: 18px; font-size: 14px; }

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

  .footer { margin-top: 32px; padding: 24px 0; }
}