:root {
  --bg: #F7F9F8;
  --surface: #FFFFFF;
  --primary: #1F6F6B;
  --accent: #E8A87C;
  --text: #1A2422;
  --muted: #8A9B98;
  --radius: 8px;
  --border: #E4EAE8;
  --shadow: 0 4px 16px rgba(31, 111, 107, 0.08);
  --shadow-hover: 0 8px 24px rgba(31, 111, 107, 0.14);
  --font-heading: 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* { 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; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button, input { font-family: inherit; font-size: inherit; }

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

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

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

.logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo img { height: 36px; width: auto; }

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

.nav a:hover { color: var(--primary); background: rgba(31, 111, 107, 0.06); }

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-box form {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.2s;
}

.search-box form:focus-within { border-color: var(--primary); }

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

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

.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.2s;
}

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

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

.hero-slide {
  position: relative;
  display: none;
  animation: fadeIn 0.6s ease;
}

.hero-slide.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-slide img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 48px 40px 32px;
  background: linear-gradient(to top, rgba(26, 36, 34, 0.82), rgba(26, 36, 34, 0));
  color: #fff;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  margin-bottom: 8px;
  font-weight: 700;
}

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

.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ---------- Section ---------- */
.sec { margin: 56px 0; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}

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

.sec-more {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

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

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

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

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

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(31, 111, 107, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
}

.card-info { padding: 12px; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.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(4, 1fr);
  gap: 16px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

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

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

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

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

.rank-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--muted);
  min-width: 32px;
  text-align: center;
}

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

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

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

/* ---------- Detail ---------- */
.detail { margin: 40px 0; }

.detail-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

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

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

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

.detail-meta .sub {
  font-size: 15px;
  color: var(--muted);
}

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
}

.detail-score .num {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
}

.detail-score .lbl { font-size: 13px; color: var(--muted); }

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

.detail-meta li {
  font-size: 14px;
  color: var(--text);
}

.detail-meta li span { color: var(--muted); margin-right: 8px; }

.detail-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.detail-body p { margin-bottom: 16px; }

/* ---------- Tag list ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }

.tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--primary);
  background: rgba(31, 111, 107, 0.07);
  border: 1px solid rgba(31, 111, 107, 0.16);
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

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

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

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

.pg:hover { border-color: var(--primary); color: var(--primary); }

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.pg.disabled {
  color: var(--muted);
  background: var(--bg);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 24px 0;
}

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

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

/* ---------- Footer ---------- */
.footer {
  margin-top: 64px;
  padding: 40px 0 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

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

/* ---------- Crumbs ---------- */
.crumbs {
  padding: 20px 0;
  font-size: 13px;
  color: var(--muted);
}

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

/* ---------- Highlight ---------- */
.hl {
  color: var(--accent);
  font-weight: 700;
  background: rgba(232, 168, 124, 0.14);
  padding: 0 2px;
  border-radius: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(3, 1fr); }
  .detail-head { grid-template-columns: 220px 1fr; gap: 28px; }
}

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

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

  .logo { font-size: 18px; }

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

  .nav a { padding: 6px 10px; font-size: 13px; }

  .search-box { margin-left: auto; }

  .search-box input { width: 120px; }

  .hero { margin: 20px 0; }

  .hero-slide img { height: 220px; }

  .hero-info { padding: 24px 20px 20px; }

  .hero-info h2 { font-size: 20px; }

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

  .sec { margin: 36px 0; }

  .sec-title { font-size: 18px; }

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

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

  .cat-item { padding: 12px 14px; font-size: 14px; }

  .rank-list { grid-template-columns: 1fr; gap: 10px; }

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

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

  .detail-meta h1 { font-size: 22px; }

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

  .pager { margin: 32px 0; gap: 6px; }

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

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