:root {
  --bg: #F1E9D9;
  --surface: #FBF6EB;
  --primary: #A8472E;
  --accent: #C69552;
  --text: #2B241C;
  --muted: #8C7B64;
  --radius: 18px;
  --font-heading: 'Cormorant Garamond', 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-body: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --line: rgba(43, 36, 28, 0.12);
  --shadow: 0 8px 24px rgba(43, 36, 28, 0.08);
  --glass: rgba(251, 246, 235, 0.72);
}

* { box-sizing: border-box; }

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

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(198, 149, 82, 0.10) 0, transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(168, 71, 46, 0.08) 0, transparent 28%),
    radial-gradient(circle at 70% 92%, rgba(198, 149, 82, 0.08) 0, transparent 30%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--text);
}

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(43, 36, 28, 0.04);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

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

.nav a:hover {
  color: var(--primary);
  background: rgba(168, 71, 46, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  min-width: 200px;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  min-width: 0;
}

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

.search-box button {
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #FBF6EB;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.2s;
}

.search-box button:hover { background: #8f3a24; }

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

.hero-slide {
  position: relative;
  display: none;
  min-height: 380px;
}

.hero-slide:first-child,
.hero-slide.active { display: block; }

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(43, 36, 28, 0.82) 0%, rgba(43, 36, 28, 0.45) 45%, rgba(43, 36, 28, 0) 100%);
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 520px;
  padding: 56px 44px;
  color: #FBF6EB;
}

.hero-info h2 {
  font-size: 38px;
  line-height: 1.2;
  color: #FBF6EB;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-info p {
  color: rgba(251, 246, 235, 0.82);
  font-size: 14px;
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 10px 26px;
  background: var(--primary);
  color: #FBF6EB;
  font-family: var(--font-body);
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid rgba(251, 246, 235, 0.25);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.btn:hover {
  background: #8f3a24;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(168, 71, 46, 0.35);
}

/* ===== Section ===== */
.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(--line);
}

.sec-title {
  font-size: 26px;
  color: var(--text);
  position: relative;
  padding-left: 16px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

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

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

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

.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(43, 36, 28, 0.05);
  transition: transform 0.25s, box-shadow 0.25s;
}

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

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

.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;
  z-index: 2;
  background: rgba(43, 36, 28, 0.72);
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  white-space: nowrap;
  overflow: hidden;
}

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

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 22px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.cat-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.cat-item span { font-size: 15px; color: var(--text); }

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

/* ===== 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: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  min-width: 32px;
  text-align: center;
  font-style: italic;
}

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

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

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

/* ===== Detail ===== */
.detail {
  margin: 32px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

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

.detail-cover {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-meta { padding-top: 4px; }

.detail-meta h1 {
  font-size: 34px;
  line-height: 1.25;
  margin-bottom: 10px;
}

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

.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin: 10px 0;
}

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

.detail-body h3 {
  font-size: 22px;
  margin: 20px 0 10px;
}

.detail-body img { border-radius: 12px; margin: 12px 0; }

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

.tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(198, 149, 82, 0.10);
  border: 1px solid rgba(198, 149, 82, 0.30);
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.tag:hover {
  color: var(--primary);
  background: rgba(168, 71, 46, 0.10);
  border-color: rgba(168, 71, 46, 0.30);
}

/* ===== 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: 10px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

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

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

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

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

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

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

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

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

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

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

/* ===== Highlight ===== */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(198, 149, 82, 0.18);
  border-radius: 4px;
  padding: 0 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: 30px; }
}

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

  .logo { font-size: 20px; }

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

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

  .search-box {
    flex: 1;
    min-width: 0;
  }

  .hero-slide { min-height: 300px; }
  .hero-slide img { min-height: 300px; }

  .hero-info {
    padding: 32px 22px;
    max-width: 100%;
  }

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

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

  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cat-list { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cat-item { padding: 16px 8px; }

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

  .detail { padding: 20px; }
  .detail-head { grid-template-columns: 1fr; gap: 20px; }
  .detail-cover { max-width: 200px; }
  .detail-meta h1 { font-size: 24px; }

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