:root {
  --bg: #FBF3F7;
  --surface: #FFFFFF;
  --primary: #C2187A;
  --accent: #6A2CFF;
  --text: #231A2E;
  --muted: #8A7A94;
  --radius: 18px;
  --font-heading: Impact, 'Arial Black', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --shadow: 6px 6px 0 rgba(106, 44, 255, 0.18);
  --line: 1px solid rgba(35, 26, 46, 0.12);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(194, 24, 122, 0.03) 0px,
    rgba(194, 24, 122, 0.03) 1px,
    transparent 1px,
    transparent 4px
  );
}

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 {
  background: var(--surface);
  border-bottom: 3px solid var(--text);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--primary);
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 0%, #C2187A 55%, #6A2CFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 0 rgba(106, 44, 255, 0.15);
  white-space: nowrap;
}

.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: 6px 12px;
  font-size: 15px;
  color: var(--text);
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav a:hover {
  background: var(--primary);
  color: #fff;
}

.search-box {
  display: flex;
  align-items: center;
  border: 2px solid var(--text);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 3px 3px 0 rgba(194, 24, 122, 0.25);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  background: transparent;
  color: var(--text);
  min-width: 0;
}
.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  font-family: var(--font-heading);
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 1px;
}
.search-box button:hover { background: var(--accent); }

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

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 16 / 7;
  background: #1a1220;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 28px 24px;
  background: linear-gradient(0deg, rgba(35,26,46,.92) 0%, rgba(35,26,46,.55) 50%, transparent 100%);
  color: #fff;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-shadow: 3px 3px 0 var(--primary);
}
.hero-info p {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  max-width: 640px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 9px 22px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: 1px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 4px 4px 0 var(--accent);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--accent);
}

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

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--text);
  position: relative;
}
.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 90px;
  height: 3px;
  background: var(--primary);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--text);
  text-transform: uppercase;
}
.sec-title::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.sec-more {
  font-size: 14px;
  color: var(--primary);
  font-weight: bold;
  white-space: nowrap;
}
.sec-more:hover { color: var(--accent); }

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--line);
  box-shadow: 4px 4px 0 rgba(35, 26, 46, 0.08);
  transition: transform .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 6px 10px 0 rgba(194, 24, 122, 0.22);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e9dfe7;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.card:hover .card-cover img { transform: scale(1.05); }
.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 40px rgba(35, 26, 46, 0.35);
  pointer-events: none;
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 var(--accent);
}

.card-info {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  line-height: 1.3;
  color: var(--text);
  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: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: .5px;
  box-shadow: 3px 3px 0 rgba(106, 44, 255, 0.25);
  transition: transform .15s, background .15s, color .15s;
}
.cat-item:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.cat-count {
  font-family: var(--font-body);
  font-size: 12px;
  background: var(--primary);
  color: #fff;
  padding: 1px 8px;
  border-radius: 999px;
}

/* ===== 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-radius: var(--radius);
  border: var(--line);
  box-shadow: 3px 3px 0 rgba(35, 26, 46, 0.07);
  transition: transform .15s, box-shadow .15s;
}
.rank-item:hover {
  transform: translateX(4px);
  box-shadow: 6px 4px 0 rgba(194, 24, 122, 0.2);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 26px;
  min-width: 42px;
  text-align: center;
  color: var(--muted);
}
.rank-item:nth-child(1) .rank-num { color: var(--primary); }
.rank-item:nth-child(2) .rank-num { color: var(--accent); }
.rank-item:nth-child(3) .rank-num { color: #d97706; }

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

.rank-score {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--primary);
  white-space: nowrap;
}

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  border: var(--line);
  box-shadow: var(--shadow);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid var(--text);
  box-shadow: 5px 5px 0 var(--primary);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 1px;
  color: var(--text);
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
}
.detail-meta p b { color: var(--text); }

.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 22px;
  color: #fff;
  background: var(--primary);
  padding: 4px 16px;
  border-radius: 999px;
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 var(--accent);
  align-self: flex-start;
}

.detail-body {
  margin-top: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  border: var(--line);
  font-size: 15px;
  line-height: 1.9;
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin: 18px 0 10px;
  padding-left: 12px;
  border-left: 5px solid var(--primary);
}
.detail-body p { margin-bottom: 12px; }

/* ===== Tag list ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 13px;
  background: rgba(194, 24, 122, 0.1);
  color: var(--primary);
  border-radius: 999px;
  border: 1px solid rgba(194, 24, 122, 0.3);
  transition: background .15s, color .15s;
}
.tag:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== Pager ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 30px 0;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--text);
  box-shadow: 3px 3px 0 rgba(106, 44, 255, 0.2);
  transition: transform .15s, background .15s, color .15s;
}
.pg:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.pg.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 3px 3px 0 var(--accent);
  cursor: default;
}
.pg.disabled {
  opacity: .4;
  pointer-events: none;
  box-shadow: none;
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 18px 0;
}
.link-item {
  font-size: 14px;
  color: var(--muted);
  transition: color .15s;
}
.link-item:hover { color: var(--primary); }

/* ===== Footer ===== */
.footer {
  margin-top: 40px;
  padding: 30px 0;
  background: var(--text);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  text-align: center;
  border-top: 5px solid var(--primary);
}
.footer a { color: rgba(255, 255, 255, 0.9); }
.footer a:hover { color: var(--primary); }
.footer p { margin: 4px 0; }

/* ===== Crumbs ===== */
.crumbs {
  padding: 16px 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--primary); }
.crumbs a:hover { color: var(--accent); }

/* ===== Highlight ===== */
.hl {
  background: linear-gradient(180deg, transparent 55%, rgba(194, 24, 122, 0.35) 55%);
  color: var(--primary);
  font-weight: bold;
  padding: 0 2px;
}

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

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

  .header .wrap {
    min-height: auto;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .logo { font-size: 22px; }
  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    border-top: 1px solid rgba(35, 26, 46, 0.1);
    padding-top: 8px;
  }
  .search-box { flex: 1; min-width: 0; }

  .hero { margin: 18px 0; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 30px 16px 18px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 13px; }

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

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card-title { font-size: 14px; }

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

  .detail-head {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 18px;
  }
  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 24px; }
  .detail-body { padding: 18px; font-size: 14px; }

  .cat-item { padding: 8px 14px; font-size: 14px; }
  .pg { min-width: 34px; height: 34px; font-size: 14px; padding: 0 10px; }
}