:root {
  --bg: #1E1712;
  --surface: #2B211A;
  --primary: #F2A65A;
  --accent: #D97B4F;
  --text: #F5EDE4;
  --muted: #A8968A;
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 10px;
  --font-heading: 'Playfair Display', 'Georgia', 'Noto Serif SC', serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  --glow: 0 0 0 1px rgba(242, 166, 90, .25), 0 10px 30px rgba(242, 166, 90, .12);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(242, 166, 90, .06), transparent 45%),
    radial-gradient(circle at 80% 100%, rgba(217, 123, 79, .05), transparent 50%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(30, 23, 18, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(242, 166, 90, .12);
}

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

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

.logo img { height: 32px; 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;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  transition: color .2s, background .2s;
}

.nav a:hover {
  color: var(--text);
  background: rgba(242, 166, 90, .12);
}

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

.search-box input {
  width: 180px;
  padding: 9px 16px;
  border: 1px solid rgba(242, 166, 90, .2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

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

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.search-box button {
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #1E1712;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  min-height: 380px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide.active { opacity: 1; }

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 23, 18, .96) 0%, rgba(30, 23, 18, .7) 45%, rgba(30, 23, 18, .2) 100%);
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 56px 48px;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--text);
}

.hero-info p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-info .card-score { margin-bottom: 16px; }

.btn {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 999px;
  background: var(--primary);
  color: #1E1712;
  font-weight: 600;
  font-size: 14px;
  transition: background .2s, transform .2s;
}

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

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

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.sec-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 10px;
  vertical-align: middle;
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .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-sm);
  overflow: hidden;
  background: var(--surface);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

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

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

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

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(30, 23, 18, .82);
  color: var(--primary);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(242, 166, 90, .4);
  backdrop-filter: blur(4px);
}

.card-info { padding: 12px 14px 16px; }

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

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

/* ---------- Category ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid rgba(242, 166, 90, .12);
  font-size: 14px;
  font-weight: 500;
  transition: border-color .2s, background .2s, transform .2s;
}

.cat-item:hover {
  border-color: var(--primary);
  background: rgba(242, 166, 90, .1);
  transform: translateY(-2px);
}

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

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: background .2s, transform .2s;
}

.rank-item:hover {
  background: rgba(242, 166, 90, .08);
  transform: translateX(4px);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 34px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
  opacity: .85;
  min-width: 48px;
  text-align: center;
}

.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-style: italic;
  font-size: 15px;
  color: var(--accent);
  font-weight: 700;
}

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
}

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

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

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

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.3;
  margin: 0;
}

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

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

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(242, 166, 90, .12);
  border: 1px solid rgba(242, 166, 90, .3);
  color: var(--primary);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 20px;
  font-weight: 700;
  align-self: flex-start;
}

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

.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 0 0 14px;
  color: var(--primary);
}

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

/* ---------- Tags ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(242, 166, 90, .1);
  border: 1px solid rgba(242, 166, 90, .2);
  color: var(--muted);
  font-size: 13px;
  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;
}

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

.pg:hover { color: var(--text); border-color: rgba(242, 166, 90, .4); }

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

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

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

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

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

/* ---------- Footer ---------- */
.footer {
  margin-top: 56px;
  padding: 32px 0 40px;
  border-top: 1px solid rgba(242, 166, 90, .12);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

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

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

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

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  font-weight: 600;
  background: rgba(242, 166, 90, .14);
  border-radius: 4px;
  padding: 0 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .rank-list { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 12px;
  }

  .logo { font-size: 19px; }

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

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

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

  .hero { min-height: 300px; margin: 16px 0; }

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

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

  .hero-info p { -webkit-line-clamp: 2; }

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

  .sec { margin: 32px 0; }

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

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

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

  .rank-item { padding: 12px 14px; gap: 12px; }

  .rank-num { font-size: 26px; min-width: 36px; }

  .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; }

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