:root {
  --bg: #FFFFFF;
  --surface: #F7FBF9;
  --primary: #00E0B8;
  --accent: #0A2E2A;
  --text: #102521;
  --muted: #7A9B95;
  --radius: 10px;
  --line: #E6F0ED;
  --shadow: 0 2px 12px rgba(10, 46, 42, 0.06);
  --font-h: "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-b: "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", 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-b);
  font-size: 15px;
  line-height: 1.65;
  -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; }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

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

.logo::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--primary);
  vertical-align: middle;
}

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

.nav a:hover {
  color: var(--accent);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--primary);
}

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

.search-box input {
  width: 180px;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 224, 184, 0.15);
}

.search-box button {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.search-box button:hover {
  background: var(--primary);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 224, 184, 0.35);
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn.ghost:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 24px auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--accent);
}

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}

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

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 32px 28px;
  background: linear-gradient(to top, rgba(10, 46, 42, 0.9), transparent);
  color: #fff;
}

.hero-info h2 {
  font-family: var(--font-h);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.hero-info p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 14px;
  max-width: 640px;
}

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

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

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

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

.sec-more {
  font-size: 13px;
  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: 20px;
}

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

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

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(10, 46, 42, 0.82);
  border: 1px solid var(--primary);
  border-radius: 4px;
  letter-spacing: 0.5px;
}

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

.card-title {
  font-family: var(--font-h);
  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);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Cat List ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  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);
}

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

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

.rank-item:hover {
  background: var(--surface);
  border-color: var(--line);
}

.rank-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-h);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border-radius: 6px;
  background: var(--surface);
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: var(--accent);
  background: var(--primary);
}

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

.rank-score {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

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

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

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

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

.detail-meta h1 {
  font-family: var(--font-h);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--accent);
  margin-bottom: 8px;
}

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

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

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0;
  padding: 6px 14px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  color: var(--accent);
  font-family: var(--font-h);
}

.detail-score b {
  font-size: 24px;
  color: var(--primary);
}

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

.detail-body {
  margin: 28px 0;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}

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

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

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

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}

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

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 36px 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(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

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

.pg.current {
  color: var(--accent);
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}

.pg.disabled {
  color: var(--muted);
  opacity: 0.5;
  pointer-events: none;
}

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

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

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

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

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

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

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

/* ---------- Highlight ---------- */
.hl {
  padding: 0 2px;
  color: var(--accent);
  background: rgba(0, 224, 184, 0.28);
  border-radius: 3px;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  padding: 32px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}

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

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

/* ---------- 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: 24px; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }

  .wrap { padding: 0 14px; }

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

  .logo { font-size: 18px; }

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

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

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

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

  .hero { margin: 16px auto; }

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

  .hero-info { padding: 40px 18px 18px; }

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

  .hero-info p { font-size: 12px; }

  .sec { margin: 28px 0; }

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

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

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

  .card-title { font-size: 13px; }

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

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

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

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

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

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

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

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

@media (max-width: 400px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .search-box input { width: 100px; }
}