:root {
  --bg: #16181B;
  --surface: #1F2226;
  --primary: #FF6B1A;
  --accent: #FFB347;
  --text: #EDEDEA;
  --muted: #8A8F96;
  --radius: 6px;
  --font-heading: 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'SF Mono', 'JetBrains Mono', Consolas, 'PingFang SC', monospace;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
}

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

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

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

a { color: inherit; text-decoration: none; transition: color 0.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 {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(22, 24, 27, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

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

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

.logo::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  background: var(--primary);
  border-radius: 1px;
  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: block;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
  border-radius: var(--radius);
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(255, 107, 26, 0.1);
}

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

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

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

.search-box button {
  padding: 8px 14px;
  background: var(--primary);
  border: none;
  color: #16181B;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

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

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

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

.hero-slide.active { display: block; animation: fade 0.6s ease; }

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

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

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(22, 24, 27, 0.95) 0%, rgba(22, 24, 27, 0.5) 50%, transparent 100%),
              linear-gradient(0deg, rgba(22, 24, 27, 0.9) 0%, transparent 60%);
}

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

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.hero-info p {
  color: var(--muted);
  font-size: 13px;
  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: #16181B;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: var(--accent);
  color: #16181B;
  transform: translateY(-1px);
}

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

.sec-head {
  display: flex;
  align-items: baseline;
  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-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  padding-left: 14px;
}

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

.sec-more {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

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

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

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

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

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #0f1113;
  overflow: hidden;
}

.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: 0;
  padding: 2px 10px 2px 14px;
  background: var(--primary);
  color: #16181B;
  font-size: 12px;
  font-weight: 700;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
}

.cat-item:hover {
  border-color: var(--primary);
  background: rgba(255, 107, 26, 0.06);
  color: var(--primary);
}

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

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

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

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

.rank-num {
  flex-shrink: 0;
  width: 26px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
}

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

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

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

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

.detail-head {
  display: flex;
  gap: 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-cover {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0f1113;
}

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

.detail-meta { flex: 1; min-width: 0; }

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

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

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

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

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

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

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

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

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

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

.pg {
  display: inline-block;
  min-width: 36px;
  padding: 7px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: all 0.2s;
}

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

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

.pg.disabled {
  opacity: 0.35;
  pointer-events: none;
}

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

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

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

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

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

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

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

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(255, 107, 26, 0.12);
  padding: 0 2px;
  border-radius: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(4, 1fr); }
  .hero-info h2 { font-size: 26px; }
}

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

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

  .logo { font-size: 18px; }

  .nav {
    order: 3;
    width: 100%;
    flex: none;
    padding-bottom: 4px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }

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

  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 18px; max-width: 100%; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { -webkit-line-clamp: 2; font-size: 12px; }

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

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

  .detail-head {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .detail-cover { width: 140px; }
  .detail-meta h1 { font-size: 20px; }
  .detail-body { padding: 16px; font-size: 13px; }

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