:root {
  --bg: #1A1A1E;
  --surface: #25252B;
  --primary: #FF6B9D;
  --accent: #FF8A1E;
  --text: #F2F0EB;
  --muted: #9A9AA5;
  --radius: 4px;
  --font-heading: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-body: 'Roboto Mono', 'Courier New', 'Noto Sans SC', monospace;
  --border: 2px solid #0D0D10;
  --shadow: 5px 5px 0 #0D0D10;
  --shadow-hover: 8px 8px 0 var(--primary);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 20% 0%, rgba(255,107,157,0.06), transparent 40%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  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; }

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,26,30,0.92);
  backdrop-filter: blur(8px);
  border-bottom: var(--border);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--primary);
  box-shadow: 3px 3px 0 var(--accent);
  transform: rotate(45deg);
}

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

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

.nav a {
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
  border-radius: var(--radius);
  color: var(--muted);
  transition: color .2s, background .2s;
}

.nav a:hover,
.nav a.active {
  color: var(--bg);
  background: var(--primary);
  font-weight: 700;
}

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

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

.search-box input::placeholder { color: var(--muted); }

.search-box button {
  background: var(--accent);
  border: none;
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .2s;
}

.search-box button:hover { background: var(--primary); }

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

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}

.hero-slide.active { display: block; animation: heroFade .6s ease; }

@keyframes heroFade { from { opacity: 0; } to { opacity: 1; } }

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26,26,30,0.95) 0%, rgba(26,26,30,0.5) 45%, transparent 75%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px;
  max-width: 60%;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.2;
  margin-bottom: 10px;
  text-shadow: 3px 3px 0 #0D0D10;
}

.hero-info p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--primary);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--accent);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--accent);
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--surface);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-title::before {
  content: "";
  width: 6px;
  height: 24px;
  background: var(--primary);
  box-shadow: 3px 3px 0 var(--accent);
}

.sec-more {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 12px;
  border: 1px solid var(--surface);
  border-radius: var(--radius);
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}

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

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

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

.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hover);
}

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 12px;
  padding: 2px 8px;
  border: 2px solid #0D0D10;
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 #0D0D10;
  transform: rotate(3deg);
}

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

.card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}

.card:hover .card-title { color: var(--primary); }

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

/* ============ Category list ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 #0D0D10;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s, color .2s;
}

.cat-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--primary);
  color: var(--primary);
}

.cat-count {
  font-size: 11px;
  color: var(--bg);
  background: var(--accent);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
}

/* ============ 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 .15s, box-shadow .15s;
}

.rank-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  min-width: 34px;
  text-align: center;
  text-shadow: 2px 2px 0 #0D0D10;
}

.rank-item:nth-child(-n+3) .rank-num { color: var(--accent); }

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

.rank-score {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

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

.detail-head {
  display: flex;
  gap: 28px;
  padding: 24px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.detail-cover {
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 2 / 3;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0D0D10;
}

.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: 30px;
  line-height: 1.25;
  margin-bottom: 14px;
}

.detail-score {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 16px;
  padding: 4px 14px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 #0D0D10;
  transform: rotate(-2deg);
  margin-bottom: 16px;
}

.detail-meta ul { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.detail-meta ul li strong { color: var(--text); margin-right: 6px; }

.detail-body {
  padding: 24px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  line-height: 1.9;
  font-size: 14px;
  color: #D8D6D0;
}

.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--text);
  margin: 18px 0 10px;
}

.detail-body p { margin-bottom: 12px; }

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

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--surface);
  border-radius: var(--radius);
  transition: color .2s, border-color .2s, background .2s;
}

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

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface);
  color: var(--text);
  border: var(--border);
  border-radius: var(--radius);
  transition: transform .15s, box-shadow .15s, background .2s;
}

.pg:hover {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--primary);
}

.pg.current {
  background: var(--primary);
  color: var(--bg);
  box-shadow: 3px 3px 0 var(--accent);
  cursor: default;
}

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

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

.link-item {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 12px;
  border: 1px solid var(--surface);
  border-radius: var(--radius);
  transition: color .2s, border-color .2s;
}

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

/* ============ Footer ============ */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  border-top: var(--border);
  background: var(--surface);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}

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

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

.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--text); }

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

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(3, 1fr); }
  .hero-info h2 { font-size: 26px; }
}

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

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

  .logo { font-size: 18px; }

  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

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

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

  .hero { margin: 16px 0; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { max-width: 100%; padding: 18px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 12px; -webkit-line-clamp: 2; }
  .btn { padding: 8px 18px; font-size: 12px; }

  .sec { margin: 26px 0; }
  .sec-title { font-size: 19px; }

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

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

  .detail-cover { width: 100%; max-width: 220px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; }
  .detail-body { padding: 16px; }

  .pg { min-width: 34px; height: 34px; font-size: 12px; }
}