:root {
  --bg: #0B0B0D;
  --surface: #141418;
  --primary: #FF4D6D;
  --accent: #FFD23F;
  --text: #F5F3EE;
  --muted: #8C8A84;
  --radius: 8px;
  --border: 2px solid #000;
  --shadow: 4px 4px 0 #000;
  --font-heading: 'Arial Black', 'Impact', 'Helvetica Neue', sans-serif;
  --font-body: 'Georgia', 'Times New Roman', 'Songti SC', serif;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

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: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
}
.logo::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  margin-right: 8px;
  transform: rotate(45deg);
  vertical-align: middle;
}

.nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  font-family: var(--font-heading);
  font-size: 13px;
  padding: 6px 12px;
  white-space: nowrap;
  color: var(--muted);
  border-radius: var(--radius);
  transition: all .18s ease;
}
.nav a:hover {
  color: var(--bg);
  background: var(--accent);
  transform: rotate(-2deg);
}

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

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 24px 0;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--surface);
}
.hero-slide {
  position: relative;
  display: none;
  min-height: 340px;
}
.hero-slide.active,
.hero-slide:first-child { display: block; }
.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  opacity: .55;
}
.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 28px 24px;
  background: linear-gradient(transparent, rgba(11,11,13,.95));
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  margin-bottom: 8px;
  text-shadow: 2px 2px 0 #000;
}
.hero-info p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
  max-width: 640px;
}

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  padding: 9px 20px;
  background: var(--primary);
  color: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 #000;
  transition: all .18s ease;
  cursor: pointer;
}
.btn:hover {
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 5px 5px 0 #000;
  background: var(--accent);
  color: var(--bg);
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--surface);
  padding-bottom: 10px;
  margin-bottom: 18px;
  gap: 12px;
}
.sec-title {
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: 1px;
  padding-left: 14px;
  position: relative;
  text-transform: uppercase;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--primary);
}
.sec-more {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .18s;
}
.sec-more:hover { color: var(--accent); }

/* ============ Grid & Card ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translate(-3px, -3px) rotate(-1deg);
  box-shadow: 6px 6px 0 var(--primary);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #000;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.card:hover .card-cover img { transform: scale(1.05); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-heading);
  font-size: 12px;
  padding: 2px 8px;
  border: 2px solid #000;
  border-radius: 20px;
  box-shadow: 2px 2px 0 #000;
}

.card-info { padding: 10px 12px 12px; }
.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  line-height: 1.3;
  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: 6px;
}

/* ============ Category list ============ */
.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 #000;
  font-family: var(--font-heading);
  font-size: 13px;
  transition: all .18s ease;
}
.cat-item:hover {
  background: var(--primary);
  transform: rotate(-2deg);
}
.cat-count {
  font-size: 11px;
  color: var(--accent);
  background: var(--bg);
  padding: 1px 7px;
  border-radius: 20px;
}
.cat-item:hover .cat-count { color: var(--bg); background: var(--accent); }

/* ============ Rank list ============ */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid #232327;
  transition: background .18s;
}
.rank-item:last-child { border-bottom: none; }
.rank-item:hover { background: #1c1c22; }
.rank-num {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--primary);
  min-width: 32px;
  text-align: center;
}
.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-family: var(--font-heading);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--accent);
}

/* ============ Detail ============ */
.detail {
  margin: 28px 0;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.detail-head {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}
.detail-cover {
  flex-shrink: 0;
  width: 200px;
  aspect-ratio: 2 / 3;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta { flex: 1; min-width: 0; }
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  margin-bottom: 14px;
  line-height: 1.25;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.detail-meta p strong { color: var(--text); }
.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--bg);
  background: var(--accent);
  padding: 4px 16px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 #000;
  margin-bottom: 14px;
}
.detail-body {
  font-size: 15px;
  line-height: 1.9;
  color: #cfcdc7;
  border-top: 2px solid #232327;
  padding-top: 20px;
}
.detail-body p { margin-bottom: 14px; }

/* ============ Tags ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.tag {
  font-family: var(--font-heading);
  font-size: 11px;
  padding: 3px 12px;
  background: var(--bg);
  border: 2px solid var(--primary);
  border-radius: 20px;
  color: var(--primary);
  transition: all .18s;
}
.tag:hover { background: var(--primary); color: #fff; }

/* ============ Pager ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
}
.pg {
  display: inline-block;
  min-width: 38px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 13px;
  padding: 8px 12px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 #000;
  transition: all .18s;
}
.pg:hover { background: var(--accent); color: var(--bg); }
.pg.current {
  background: var(--primary);
  color: #fff;
  transform: rotate(-2deg);
}
.pg.disabled {
  opacity: .35;
  pointer-events: none;
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border: 1px solid #232327;
  border-radius: var(--radius);
  transition: all .18s;
}
.link-item:hover { color: var(--accent); border-color: var(--accent); }

/* ============ Footer ============ */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  border-top: 3px solid var(--primary);
  background: var(--surface);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ============ Crumbs ============ */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin: 18px 0;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--text); }

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

/* ============ Mobile ============ */
@media (max-width: 768px) {
  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 10px;
  }
  .logo { font-size: 18px; }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero-slide, .hero-slide img { min-height: 220px; }
  .hero-info { padding: 18px 16px; }
  .hero-info h2 { font-size: 20px; }

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

  .detail { padding: 16px; }
  .detail-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .detail-cover { width: 160px; }
  .detail-meta h1 { font-size: 20px; }

  .sec-title { font-size: 17px; }
  .rank-title { font-size: 13px; }
}