:root {
  --bg: #FEF9F2;
  --surface: #FFF4E6;
  --primary: #D95A2B;
  --accent: #F4A261;
  --text: #2F1B12;
  --muted: #8B6F5E;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 6px 20px rgba(217, 90, 43, 0.08);
  --shadow-hover: 0 14px 32px rgba(217, 90, 43, 0.18);
  --font-heading: 'Helvetica Neue', 'Arial Black', 'Impact', sans-serif;
  --font-body: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --ease: 0.3s ease;
}

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

html { scroll-behavior: smooth; }

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; transition: color var(--ease); }
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 {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(254, 249, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(217, 90, 43, 0.1);
}

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

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

.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: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}
.nav a:hover,
.nav a.active {
  background: var(--surface);
  color: var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 8px 6px 16px;
  flex-shrink: 0;
  border: 1px solid transparent;
  transition: border-color var(--ease);
}
.search-box:focus-within { border-color: var(--accent); }
.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;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font-body);
  transition: background var(--ease);
}
.search-box button:hover { background: var(--accent); }

/* ===== 轮播 Hero ===== */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.hero-slide {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(47,27,18,0) 30%, rgba(47,27,18,0.82) 100%);
}
.hero-info {
  position: relative;
  z-index: 2;
  padding: 40px;
  max-width: 620px;
  color: #fff;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.hero-info p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ===== 区块 ===== */
.sec { margin: 44px 0; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 22px;
  border-radius: 999px;
  background: var(--primary);
}
.sec-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.sec-more:hover { color: var(--primary); }

/* ===== 卡片网格 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e9dccb;
}
.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: 10px;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(217, 90, 43, 0.4);
}

.card-info { padding: 14px 16px 18px; }
.card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.card-meta span { white-space: nowrap; }

/* ===== 分类列表 ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
}
.cat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  background: #fff;
  color: var(--primary);
}
.cat-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(217, 90, 43, 0.1);
  padding: 2px 10px;
  border-radius: 999px;
}

/* ===== 排行榜 ===== */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease);
}
.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
  min-width: 30px;
  text-align: center;
}
.rank-item:nth-child(-n+3) .rank-num { color: var(--primary); }
.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 900;
  color: var(--primary);
}

/* ===== 详情页 ===== */
.detail { margin: 36px 0; }
.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #e9dccb;
}
.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;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 900;
  padding: 6px 20px;
  border-radius: 999px;
}
.detail-meta ul { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.detail-meta li { color: var(--muted); }
.detail-meta li strong { color: var(--text); font-weight: 600; margin-right: 8px; }
.detail-body {
  margin-top: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  line-height: 1.85;
  font-size: 15px;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 14px;
}
.detail-body p { margin-bottom: 14px; color: var(--muted); }

/* ===== 标签 ===== */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(217, 90, 43, 0.08);
  padding: 6px 16px;
  border-radius: 999px;
  transition: background var(--ease), color var(--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: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: background var(--ease), color var(--ease), transform var(--ease);
}
.pg:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.pg.current { background: var(--primary); color: #fff; }
.pg.disabled { opacity: 0.4; pointer-events: none; }

/* ===== 友情链接 ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 36px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  padding: 7px 16px;
  border-radius: 999px;
  transition: color var(--ease), background var(--ease);
}
.link-item:hover { color: var(--primary); background: #fff; }

/* ===== 页脚 ===== */
.footer {
  margin-top: 56px;
  padding: 36px 0;
  border-top: 1px solid rgba(217, 90, 43, 0.12);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ===== 面包屑 ===== */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

/* ===== 搜索高亮 ===== */
.hl {
  color: var(--primary);
  background: rgba(244, 162, 97, 0.28);
  border-radius: 4px;
  padding: 0 2px;
  font-weight: 700;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cat-list { grid-template-columns: repeat(2, 1fr); }
  .detail-head { grid-template-columns: 200px 1fr; gap: 24px; }
  .hero-info h2 { font-size: 28px; }
}

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

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 12px;
  }
  .logo { font-size: 19px; }
  .search-box { order: 3; width: 100%; }
  .search-box input { width: 100%; flex: 1; }
  .nav {
    order: 4;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .hero { margin: 18px 0; border-radius: var(--radius-sm); }
  .hero-slide { min-height: 300px; }
  .hero-info { padding: 24px 20px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 13px; }

  .grid { grid-template-columns: 1fr; gap: 18px; }
  .cat-list { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat-item { padding: 12px 14px; font-size: 13px; }
  .rank-list { grid-template-columns: 1fr; }

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

  .detail-head {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 18px;
  }
  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; text-align: center; }
  .detail-score { align-self: center; }
  .detail-meta ul { text-align: left; }
  .detail-body { padding: 20px; }

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