:root {
  --bg: #FDF6EC;
  --surface: #FFFFFF;
  --primary: #E05A2B;
  --accent: #F2A65A;
  --text: #2D2A26;
  --muted: #8A7F76;
  --radius: 20px;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: 'Helvetica Neue', 'Arial', sans-serif;
  --shadow-soft: 0 8px 24px rgba(45, 42, 38, 0.08);
  --shadow-hard: 6px 6px 0 rgba(45, 42, 38, 0.12);
  --border: 2px solid var(--text);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

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

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

/* ---------- Header ---------- */
.header {
  background: var(--surface);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

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

.logo::before {
  content: "";
  width: 18px;
  height: 18px;
  background: var(--accent);
  border: var(--border);
  border-radius: 6px;
  display: inline-block;
}

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

.nav::-webkit-scrollbar { display: none; }

.nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

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

.search-box {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  border: var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg);
}

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

.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-body);
}

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

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}

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

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 32px 28px;
  background: linear-gradient(to top, rgba(45, 42, 38, 0.85), rgba(45, 42, 38, 0));
  color: #fff;
}

.hero-info h2 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.2;
}

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

.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 rgba(45, 42, 38, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(45, 42, 38, 0.35);
}

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

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

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  position: relative;
  padding-left: 16px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 24px;
  background: var(--accent);
  border-radius: 4px;
}

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

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

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

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

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

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 2px solid var(--text);
}

.card-info { padding: 12px; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* ---------- Category 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: 18px 10px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

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

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

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

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

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

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

.rank-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 10px;
  font-size: 15px;
}

.rank-item:nth-child(1) .rank-num { background: var(--primary); }
.rank-item:nth-child(2) .rank-num { background: #C97B3F; }
.rank-item:nth-child(3) .rank-num { background: #B5651D; }

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

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

/* ---------- Detail ---------- */
.detail {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  margin: 32px 0;
  align-items: start;
}

.detail-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--border);
  box-shadow: var(--shadow-hard);
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.detail-meta span {
  background: var(--surface);
  border: 1px solid rgba(45, 42, 38, 0.15);
  padding: 3px 10px;
  border-radius: 999px;
}

.detail-score {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.detail-body {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

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

.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(45, 42, 38, 0.12);
}

.detail-body p {
  margin: 0 0 14px;
  color: var(--text);
}

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg);
  border: 1px solid rgba(45, 42, 38, 0.18);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

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

/* ---------- 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: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--surface);
  border: var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
}

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

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

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

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid rgba(45, 42, 38, 0.12);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s;
}

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

/* ---------- Footer ---------- */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  background: var(--surface);
  border-top: var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

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

/* ---------- Crumbs ---------- */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

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

/* ---------- Highlight ---------- */
.hl {
  background: var(--accent);
  color: var(--text);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(4, 1fr); }
  .detail { grid-template-columns: 240px 1fr; gap: 24px; }
}

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

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

  .logo { font-size: 20px; }

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

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

  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-info { padding: 48px 20px 20px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 13px; }

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

  .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .card-info { padding: 8px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; gap: 6px; }

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

  .rank-list { grid-template-columns: 1fr; }
  .rank-item { padding: 10px 12px; }

  .detail {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px 0;
  }

  .detail-head {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
  }

  .detail-cover { width: 140px; flex-shrink: 0; }

  .detail-body { padding: 20px; }
  .detail-body h1 { font-size: 22px; }
  .detail-body h2 { font-size: 17px; }
  .detail-score { font-size: 32px; }

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

@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cat-list { grid-template-columns: repeat(2, 1fr); }
  .hero-info h2 { font-size: 19px; }
  .detail-head { flex-direction: column; }
  .detail-cover { width: 100%; max-width: 200px; }
}