:root {
  --bg: #FEF6E4;
  --surface: #FFFFFF;
  --primary: #E63946;
  --accent: #1D3557;
  --text: #1D3557;
  --muted: #7A8B99;
  --radius: 14px;
  --border: 3px solid #1D3557;
  --shadow: 5px 5px 0 #1D3557;
  --shadow-sm: 3px 3px 0 #1D3557;
  --font-heading: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(230,57,70,.08) 0 60px, transparent 61px),
    radial-gradient(circle at 88% 72%, rgba(29,53,87,.06) 0 80px, transparent 81px);
  background-attachment: fixed;
}

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

/* ===== Header ===== */
.header {
  background: var(--surface);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  -webkit-text-stroke: 1px var(--accent);
  padding: 2px 10px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transform: rotate(-2deg);
  transition: transform .2s;
  flex-shrink: 0;
}
.logo:hover { transform: rotate(2deg) translateY(-2px); }

.nav {
  display: flex;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 12px;
  border: 2px solid transparent;
  border-radius: 999px;
  color: var(--text);
  transition: all .18s;
}
.nav a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px) rotate(-1.5deg);
}

.search-box {
  display: flex;
  align-items: center;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  width: 160px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  border-left: var(--border);
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  letter-spacing: .5px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .18s;
}
.search-box button:hover { background: var(--accent); }

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  margin: 22px 0;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--accent);
}
.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 16 / 9;
  max-height: 460px;
}
.hero-slide:first-child,
.hero-slide.active { display: block; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(29,53,87,.92) 0%, rgba(29,53,87,.55) 45%, transparent 80%);
}
.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px 26px;
  max-width: 560px;
  color: #fff;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 5vw, 44px);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-shadow: 3px 3px 0 var(--primary);
}
.hero-info p {
  font-size: 14px;
  color: #e8eef5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Button ===== */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 15px;
  padding: 10px 22px;
  background: var(--primary);
  color: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
.btn:hover {
  transform: translate(-2px, -2px) rotate(-1.5deg);
  box-shadow: 5px 5px 0 var(--accent);
}
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--accent); }

/* ===== Section ===== */
.sec { margin: 34px 0; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  border-bottom: var(--border);
  padding-bottom: 10px;
}
.sec-title {
  font-family: var(--font-heading);
  font-size: clamp(22px, 4vw, 32px);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(12deg);
  width: 8px;
  height: 80%;
  background: var(--primary);
  border-radius: 4px;
}
.sec-more {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 999px;
  padding: 4px 14px;
  transition: all .18s;
  white-space: nowrap;
}
.sec-more:hover {
  background: var(--primary);
  color: #fff;
  transform: rotate(-2deg) translateY(-2px);
}

/* ===== Grid & Card ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translate(-3px, -3px) rotate(-1deg);
  box-shadow: var(--shadow);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-bottom: var(--border);
  background: var(--accent);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.card:hover .card-cover img { transform: scale(1.05); }
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: .5px;
  padding: 3px 9px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  box-shadow: 2px 2px 0 var(--accent);
  transform: rotate(4deg);
}
.card-info { padding: 10px 12px 12px; }
.card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

/* ===== Cat list ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px 16px;
  font-family: var(--font-heading);
  letter-spacing: .5px;
  text-transform: uppercase;
  font-size: 15px;
  color: var(--accent);
  transition: all .18s;
}
.cat-item:hover {
  background: var(--primary);
  color: #fff;
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: var(--shadow);
}
.cat-count {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  background: var(--bg);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 999px;
  padding: 1px 9px;
  flex-shrink: 0;
}
.cat-item:hover .cat-count { background: #fff; }

/* ===== Rank list ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 8px 14px;
  transition: all .18s;
}
.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}
.rank-num {
  font-family: var(--font-heading);
  font-size: 22px;
  min-width: 38px;
  text-align: center;
  color: var(--primary);
  -webkit-text-stroke: .5px var(--accent);
  flex-shrink: 0;
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num { color: var(--accent); }
.rank-title {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-family: var(--font-heading);
  font-size: 15px;
  color: #fff;
  background: var(--primary);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 1px 8px;
  flex-shrink: 0;
}

/* ===== Detail ===== */
.detail { margin: 24px 0; }
.detail-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 24px;
}
.detail-cover {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 2 / 3;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transform: rotate(-1.5deg);
  flex-shrink: 0;
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0;
}
.detail-meta span { display: inline-flex; align-items: center; gap: 4px; }
.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 26px;
  color: #fff;
  background: var(--primary);
  border: var(--border);
  border-radius: var(--radius);
  padding: 4px 16px;
  box-shadow: var(--shadow-sm);
  transform: rotate(-2deg);
  margin-bottom: 12px;
}
.detail-head h1 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 5vw, 42px);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  line-height: 1.1;
}
.detail-body {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  line-height: 1.8;
  font-size: 15px;
  color: var(--text);
}
.detail-body p { margin-bottom: 12px; }
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--accent);
  margin: 18px 0 10px;
}

/* ===== Tags ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.tag {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 12px;
  background: var(--bg);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 999px;
  transition: all .18s;
}
.tag:hover {
  background: var(--primary);
  color: #fff;
  transform: rotate(-2deg) translateY(-2px);
}

/* ===== Pager ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 30px 0;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: .5px;
  color: var(--accent);
  background: var(--surface);
  border: var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: all .18s;
}
.pg:hover {
  background: var(--primary);
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}
.pg.current {
  background: var(--primary);
  color: #fff;
  transform: rotate(-2deg);
  pointer-events: none;
}
.pg.disabled {
  opacity: .4;
  pointer-events: none;
  box-shadow: none;
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
}
.link-item {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 12px;
  border: 2px dashed var(--muted);
  border-radius: 999px;
  transition: all .18s;
}
.link-item:hover {
  color: var(--primary);
  border-color: var(--primary);
  border-style: solid;
  transform: rotate(-2deg);
}

/* ===== Crumbs ===== */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 14px 0 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.crumbs a {
  color: var(--accent);
  font-weight: 600;
  transition: color .18s;
}
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--muted); }

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

/* ===== Footer ===== */
.footer {
  margin-top: 40px;
  background: var(--accent);
  color: #e8eef5;
  border-top: var(--border);
  padding: 26px 0;
  font-size: 13px;
  text-align: center;
}
.footer a { color: #fff; font-weight: 600; }
.footer a:hover { color: var(--primary); }
.footer p { margin: 4px 0; }

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .cat-list { grid-template-columns: repeat(3, 1fr); }
  .detail-head { flex-direction: row; align-items: flex-start; }
  .detail-cover { width: 240px; }
  .hero-slide { aspect-ratio: 21 / 9; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .header .wrap { gap: 10px; }
  .logo { font-size: 20px; }
  .search-box { order: 3; width: 100%; }
  .search-box input { width: 100%; flex: 1; }
  .nav { order: 4; width: 100%; padding-bottom: 6px; }
  .hero-info { padding: 16px; }
  .hero-info h2 { font-size: 24px; }
  .hero-info p { -webkit-line-clamp: 2; font-size: 13px; }
  .detail-cover { max-width: 200px; margin: 0 auto; }
  .sec-head { flex-wrap: wrap; }
  .rank-item { padding: 8px 10px; }
  .rank-num { font-size: 18px; min-width: 30px; }
}