:root {
  --bg: #14100C;
  --surface: #221A12;
  --primary: #D9A441;
  --accent: #38E0C8;
  --text: #F3E9D6;
  --muted: #8C7A5E;
  --radius: 14px;
  --font-heading: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --line: rgba(217, 164, 65, 0.28);
  --glow: 0 0 0 1px rgba(217, 164, 65, 0.35), 0 8px 24px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

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

body {
  background-image:
    radial-gradient(circle at 15% 0%, rgba(217, 164, 65, 0.08), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(56, 224, 200, 0.06), transparent 45%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0; font-weight: 700; }

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

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 16, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--primary);
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(217, 164, 65, 0.35);
}
.logo img { height: 30px; 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: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  border-radius: 8px;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav a:hover {
  color: var(--accent);
  background: rgba(56, 224, 200, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  min-width: 190px;
}
.search-box input {
  flex: 1;
  min-width: 0;
  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 {
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #1a130c;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-body);
}
.search-box button:hover { background: var(--accent); }

/* ============ HERO ============ */
.hero {
  position: relative;
  margin: 22px auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--glow);
  background: var(--surface);
}

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}
.hero-slide:first-child,
.hero-slide.active { display: block; }

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

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 24px 22px;
  background: linear-gradient(to top, rgba(20, 16, 12, 0.96), rgba(20, 16, 12, 0.55) 55%, transparent);
}
.hero-info h2 {
  font-size: 26px;
  color: var(--text);
  margin-bottom: 6px;
}
.hero-info p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  max-width: 620px;
  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;
  border-radius: 999px;
  background: var(--primary);
  color: #1a130c;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--primary);
  transition: background .2s, color .2s, box-shadow .2s;
}
.btn:hover {
  background: transparent;
  color: var(--primary);
  box-shadow: 0 0 18px rgba(217, 164, 65, 0.35);
}

/* ============ SECTION ============ */
.sec { margin: 34px 0; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
  position: relative;
}
.sec-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 46px;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(217, 164, 65, 0.6);
}

.sec-title {
  font-size: 20px;
  color: var(--primary);
  letter-spacing: .5px;
}
.sec-title small {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
  font-weight: 400;
}

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

/* ============ GRID / CARD ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 164, 65, 0.6);
  box-shadow: var(--glow);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #191309;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .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: #1a130c;
  background: var(--primary);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

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

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-title { color: var(--primary); }

.card-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ CATEGORY LIST ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color .2s, background .2s;
}
.cat-item:hover {
  border-color: var(--accent);
  background: rgba(56, 224, 200, 0.06);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(217, 164, 65, 0.1);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ============ RANK LIST ============ */
.rank-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px dashed rgba(217, 164, 65, 0.16);
  transition: background .2s;
}
.rank-item:last-child { border-bottom: none; }
.rank-item:hover { background: rgba(217, 164, 65, 0.06); }

.rank-num {
  flex: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #1a130c;
  background: var(--primary);
  border-color: var(--primary);
}

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

.rank-score {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

/* ============ DETAIL ============ */
.detail {
  margin: 26px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glow);
  overflow: hidden;
}

.detail-head {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px dashed var(--line);
}

.detail-cover {
  flex: none;
  width: 160px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #191309;
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
}
.detail-meta h1 {
  font-size: 24px;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}
.detail-meta p { margin: 4px 0; }
.detail-meta strong { color: var(--primary); font-weight: 600; }

.detail-score {
  display: inline-block;
  margin: 6px 0 10px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 16px rgba(56, 224, 200, 0.4);
}

.detail-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2, .detail-body h3 {
  font-size: 17px;
  color: var(--primary);
  margin: 18px 0 8px;
}
.detail-body p { margin: 0 0 12px; }
.detail-body img { border-radius: 10px; margin: 10px 0; }

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

.tag {
  display: inline-block;
  padding: 3px 11px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(217, 164, 65, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .2s, border-color .2s;
}
.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .2s, color .2s, background .2s;
}
.pg:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #1a130c;
  font-weight: 700;
}
.pg.disabled {
  opacity: .4;
  pointer-events: none;
  cursor: not-allowed;
}

/* ============ LINKS ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  transition: color .2s, border-color .2s;
}
.link-item:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============ CRUMBS ============ */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0 0;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--text); }

/* ============ FOOTER ============ */
.footer {
  margin-top: 44px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  background: rgba(34, 26, 18, 0.5);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer p { margin: 6px 0; }

/* ============ HIGHLIGHT ============ */
.hl {
  color: var(--accent);
  font-style: normal;
  background: rgba(56, 224, 200, 0.12);
  padding: 0 2px;
  border-radius: 3px;
}

/* ============ RESPONSIVE ============ */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .cat-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-slide { aspect-ratio: 16 / 6; }
  .hero-info h2 { font-size: 34px; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cat-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }
  .logo { font-size: 19px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    border-top: 1px solid var(--line);
    padding-top: 8px;
    gap: 2px;
  }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .search-box { min-width: 0; flex: 1; }

  .hero { margin: 14px auto; }
  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-info { padding: 40px 16px 16px; }
  .hero-info h2 { font-size: 21px; }

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

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

  .detail-head { flex-direction: column; padding: 16px; gap: 14px; }
  .detail-cover { width: 130px; }
  .detail-meta h1 { font-size: 20px; }
  .detail-body { padding: 16px; font-size: 13.5px; }

  .pg { min-width: 34px; height: 34px; padding: 0 9px; }
}