:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --primary: #D7263D;
  --accent: #2B3A4A;
  --text: #0F1419;
  --muted: #8A94A6;
  --border: #E2E5EA;
  --radius: 2px;
  --font-heading: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --container: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

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

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo span,
.logo em {
  color: var(--primary);
  font-style: normal;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  font-size: 14px;
  color: var(--accent);
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.search-box {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}

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

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

.search-box button {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .2s;
}

.search-box button:hover {
  background: var(--primary);
}

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

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 16 / 7;
  animation: heroFade .8s ease both;
}

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

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 32px 28px;
  background: linear-gradient(to top, rgba(15, 20, 25, .85), rgba(15, 20, 25, 0));
  color: #fff;
}

.hero-info h2 {
  font-size: 32px;
  margin-bottom: 8px;
}

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

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

.btn {
  display: inline-block;
  padding: 9px 22px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  transition: background .2s, color .2s;
}

.btn:hover {
  background: transparent;
  color: var(--primary);
}

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

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

.sec-title {
  font-size: 24px;
  position: relative;
  padding-left: 14px;
}

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

.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease;
}

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

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

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(35%);
  transition: filter .3s ease, transform .3s ease;
}

.card:hover .card-cover img {
  filter: grayscale(0);
  transform: scale(1.03);
}

.card-score {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 3px 7px;
  border-radius: 0 0 0 var(--radius);
}

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

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

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

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

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

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, color .2s;
}

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

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

.cat-count {
  font-family: var(--font-heading);
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 200;
  line-height: 1;
  color: var(--muted);
  min-width: 44px;
  text-align: right;
}

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

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

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

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

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

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

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

.detail-meta h1 {
  font-size: 30px;
  margin-bottom: 10px;
}

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

.detail-meta p strong {
  color: var(--muted);
  font-weight: 500;
  margin-right: 6px;
}

.detail-score {
  display: inline-block;
  margin: 12px 0;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius);
}

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

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

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

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

.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color .2s, border-color .2s;
}

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

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

.pg {
  display: inline-block;
  min-width: 36px;
  padding: 7px 12px;
  text-align: center;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  transition: color .2s, border-color .2s, background .2s;
}

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

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

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

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

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

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

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

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

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

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

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

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

/* ===== Highlight ===== */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: transparent;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cat-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-head { grid-template-columns: 200px 1fr; gap: 24px; }
}

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

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

  .logo { font-size: 19px; }

  .search-box { order: 3; width: 100%; }
  .search-box input { width: 100%; flex: 1; }

  .nav {
    order: 4;
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .hero { margin: 16px 0; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info {
    padding: 32px 16px 16px;
  }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { display: none; }

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

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

  .rank-list { grid-template-columns: 1fr; gap: 0; }
  .rank-num { font-size: 26px; min-width: 36px; }

  .detail-head { grid-template-columns: 1fr; }
  .detail-cover { max-width: 200px; }
  .detail-meta h1 { font-size: 22px; }
  .detail-body { padding: 16px; font-size: 14px; }

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