:root {
  --bg: #FBF7F0;
  --surface: #FFFFFF;
  --primary: #F7C531;
  --accent: #E84A3D;
  --text: #2D2A26;
  --muted: #8A8580;
  --radius: 16px;
  --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --border: 2px solid var(--text);
  --shadow: 4px 4px 0 rgba(45, 42, 38, 0.12);
}

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

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

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.16 0 0 0 0 0.14 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 2px dashed rgba(45, 42, 38, 0.18);
  padding: 14px 0;
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 6px 16px;
  background: var(--primary);
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
  transition: transform 0.25s;
}

.logo:hover {
  transform: rotate(2deg) translateY(-2px);
}

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

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

.nav a {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  border: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav a:hover {
  background: var(--surface);
  border-color: var(--text);
  transform: translateY(-2px);
}

.search-box {
  display: flex;
  align-items: center;
  border: var(--border);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.search-box button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  font-size: 14px;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

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

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--border);
  background: var(--surface);
  box-shadow: 6px 6px 0 rgba(247, 197, 49, 0.35);
}

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 21 / 9;
  animation: fadeSlide 0.6s ease;
}

.hero-slide.active {
  display: block;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

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

.hero-info h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.hero-info p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 16px;
  max-width: 640px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 9px 24px;
  background: var(--primary);
  color: var(--text);
  border: var(--border);
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.25);
}

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

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

.sec-title {
  position: relative;
  font-size: 22px;
  font-weight: 800;
  padding-left: 16px;
}

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

.sec-more {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 14px;
  border: 2px solid var(--muted);
  border-radius: 999px;
  transition: all 0.2s;
}

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

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

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

.card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 6px 8px 0 rgba(232, 74, 61, 0.3);
}

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

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

.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

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

/* ===== Category list ===== */
.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.cat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--surface);
  border: var(--border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 3px 3px 0 rgba(45, 42, 38, 0.1);
  transition: all 0.2s;
}

.cat-item:hover {
  background: var(--primary);
  transform: translateY(-3px) rotate(1deg);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 0 8px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--surface);
  border: 2px solid rgba(45, 42, 38, 0.12);
  border-radius: 12px;
  transition: all 0.2s;
}

.rank-item:hover {
  border-color: var(--text);
  transform: translateX(4px);
}

.rank-num {
  flex: 0 0 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  border-radius: 8px;
  background: var(--bg);
  border: 2px solid var(--text);
  transform: rotate(-4deg);
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

.rank-score {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}

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

.detail-head {
  display: flex;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 rgba(247, 197, 49, 0.35);
  margin-bottom: 32px;
}

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

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

.detail-meta {
  flex: 1;
  min-width: 0;
}

.detail-meta h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.3;
}

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

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

.detail-meta p span {
  color: var(--muted);
}

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin: 12px 0;
  padding: 4px 16px;
  background: var(--primary);
  border: var(--border);
  border-radius: 999px;
  font-weight: 800;
  font-size: 22px;
  transform: rotate(-1deg);
}

.detail-score small {
  font-size: 12px;
  font-weight: 600;
}

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

.detail-body h2 {
  font-size: 18px;
  margin: 20px 0 10px;
  padding-left: 12px;
  border-left: 5px solid var(--accent);
}

.detail-body p {
  margin-bottom: 12px;
  color: #4a4640;
}

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

.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 13px;
  background: var(--bg);
  border: 2px solid rgba(45, 42, 38, 0.15);
  border-radius: 999px;
  transition: all 0.2s;
}

.tag:hover {
  background: var(--primary);
  border-color: var(--text);
}

/* ===== Pager ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  border: 2px solid rgba(45, 42, 38, 0.18);
  border-radius: 10px;
  transition: all 0.2s;
}

.pg:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.pg.current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 3px 3px 0 rgba(232, 74, 61, 0.3);
}

.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;
  border: 1px dashed rgba(45, 42, 38, 0.2);
  border-radius: 8px;
  transition: all 0.2s;
}

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

/* ===== Footer ===== */
.footer {
  margin-top: 60px;
  padding: 32px 0;
  border-top: 2px dashed rgba(45, 42, 38, 0.18);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}

.footer a {
  color: var(--text);
  font-weight: 600;
}

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

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

.crumbs a {
  color: var(--muted);
  transition: color 0.2s;
}

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

/* ===== Highlight ===== */
.hl {
  background: var(--primary);
  color: var(--text);
  padding: 0 3px;
  border-radius: 4px;
  font-weight: 700;
}

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

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .wrap {
    padding: 0 14px;
  }

  .header {
    padding: 10px 0;
  }

  .header .wrap {
    gap: 10px;
  }

  .logo {
    font-size: 18px;
    padding: 5px 14px;
  }

  .nav {
    order: 3;
    flex: 1 0 100%;
    gap: 4px;
    padding-bottom: 4px;
    border-top: 1px dashed rgba(45, 42, 38, 0.15);
    padding-top: 8px;
  }

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

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

  .search-box input {
    width: 110px;
    padding: 7px 12px;
  }

  .search-box button {
    padding: 7px 14px;
  }

  .hero {
    margin: 18px 0;
    box-shadow: 4px 4px 0 rgba(247, 197, 49, 0.35);
  }

  .hero-slide {
    aspect-ratio: 16 / 10;
  }

  .hero-info {
    padding: 30px 18px 18px;
  }

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

  .hero-info p {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .sec {
    margin: 30px 0;
  }

  .sec-title {
    font-size: 18px;
    padding-left: 14px;
  }

  .sec-title::before {
    height: 22px;
    width: 7px;
  }

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

  .card-info {
    padding: 8px 10px 12px;
  }

  .card-title {
    font-size: 13px;
  }

  .card-meta {
    font-size: 11px;
  }

  .card-score {
    min-width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .cat-item {
    padding: 6px 14px;
    font-size: 13px;
  }

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

  .detail-head {
    flex-direction: column;
    gap: 20px;
    padding: 18px;
    box-shadow: 4px 4px 0 rgba(247, 197, 49, 0.35);
  }

  .detail-cover {
    flex: none;
    width: 160px;
    margin: 0 auto;
  }

  .detail-meta h1 {
    font-size: 20px;
    text-align: center;
  }

  .detail-meta .sub {
    text-align: center;
  }

  .detail-score {
    font-size: 18px;
  }

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

  .detail-body h2 {
    font-size: 16px;
  }

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

  .footer {
    margin-top: 40px;
    padding: 24px 0;
    font-size: 12px;
  }
}
</style>