:root {
  --bg: #FFF7EC;
  --surface: #FFFFFF;
  --primary: #E8672B;
  --accent: #F2A65A;
  --text: #2D241E;
  --muted: #8C7A6B;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 6px 24px rgba(45, 36, 30, 0.08);
  --shadow-hover: 0 14px 36px rgba(232, 103, 43, 0.18);
  --font-heading: 'Playfair Display', 'Georgia', 'STSong', serif;
  --font-body: 'Inter', 'Helvetica Neue', 'PingFang SC', sans-serif;
  --line: rgba(140, 122, 107, 0.18);
}

* { box-sizing: border-box; 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;
}

a { color: inherit; text-decoration: none; }
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(255, 247, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

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

.logo::after {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 2px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

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

.nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.25s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(232, 103, 43, 0.1);
}

.search-box {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  box-shadow: var(--shadow);
}

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

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

.search-box button {
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
  transition: background 0.25s ease;
}

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

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 21 / 9;
  background: var(--surface);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 40px 32px;
  background: linear-gradient(to top, rgba(45, 36, 30, 0.9), transparent);
  color: #fff;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.25;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-info p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 18px rgba(232, 103, 43, 0.35);
}

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

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-left: 16px;
  border-left: 5px solid var(--primary);
  border-radius: 2px;
}

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

.sec-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 6px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.sec-more {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.25s ease;
}

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

/* ===== Grid & Card ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.card-score {
  position: absolute;
  top: 10px;
  right: 0;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px 4px 14px;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: 0 4px 12px rgba(232, 103, 43, 0.4);
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

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

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

/* ===== 分类列表 ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.cat-item:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

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

.cat-item:hover .cat-count { color: rgba(255, 255, 255, 0.8); }

/* ===== 排行榜 ===== */
.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
}

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

.rank-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(232, 103, 43, 0.1);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
}

.rank-item:nth-child(1) .rank-num { background: var(--primary); color: #fff; }
.rank-item:nth-child(2) .rank-num { background: var(--accent); color: #fff; }
.rank-item:nth-child(3) .rank-num { background: rgba(242, 166, 90, 0.5); color: #fff; }

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

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

/* ===== 详情页 ===== */
.detail { margin: 32px 0; }

.detail-head {
  display: flex;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.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: 30px;
  line-height: 1.3;
  margin-bottom: 14px;
}

.detail-score {
  display: inline-block;
  margin-bottom: 16px;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(232, 103, 43, 0.1);
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
}

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

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

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

.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 20px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}

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

/* ===== 标签 ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(242, 166, 90, 0.15);
  color: var(--primary);
  font-size: 13px;
  transition: all 0.25s ease;
}

.tag:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== 分页 ===== */
.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: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
}

.pg:hover {
  background: var(--accent);
  color: #fff;
}

.pg.current {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(232, 103, 43, 0.35);
}

.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* ===== 友情链接 ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0;
}

.link-item {
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
}

.link-item:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

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

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

.footer p { margin-bottom: 6px; }

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

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

/* ===== 搜索高亮 ===== */
.hl {
  background: linear-gradient(transparent 55%, rgba(242, 166, 90, 0.55) 55%);
  color: var(--primary);
  font-weight: 600;
  padding: 0 2px;
  border-radius: 2px;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  .wrap { padding: 0 14px; }

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }

  .logo { font-size: 20px; }

  .nav {
    order: 3;
    width: 100%;
    flex: none;
    padding-bottom: 4px;
  }

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

  .search-box { margin-left: auto; padding: 3px 3px 3px 12px; }
  .search-box input { width: 110px; font-size: 13px; }
  .search-box button { padding: 6px 12px; font-size: 12px; }

  .hero { aspect-ratio: 4 / 5; margin: 18px 0; }
  .hero-info { padding: 48px 20px 22px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 13px; margin-bottom: 12px; }

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

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

  .card-info { padding: 10px 12px 12px; }
  .card-title { font-size: 14px; }

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

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

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

  .detail-cover { width: 60%; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; text-align: center; }
  .detail-score { display: block; text-align: center; }
  .detail-meta p { font-size: 13px; }

  .detail-body { padding: 18px; font-size: 14px; }

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

  .footer { padding: 26px 0; font-size: 12px; }
}