:root {
  --bg: #1A0B2E;
  --surface: #2D1B4E;
  --primary: #FF6B9D;
  --accent: #7DF9FF;
  --text: #FFF0F5;
  --muted: #B8A9D4;
  --radius: 20px;
  --font-heading: 'Impact', 'Arial Black', 'Noto Sans SC', sans-serif;
  --font-body: 'Space Grotesk', 'Noto Sans SC', system-ui, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    repeating-linear-gradient(0deg, rgba(125,249,255,0.03) 0 1px, transparent 1px 4px);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(45, 27, 78, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 2px solid rgba(255, 107, 157, 0.35);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

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

.nav a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.nav a:hover {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(255, 107, 157, 0.12);
  transform: rotate(-2deg);
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(26, 11, 46, 0.8);
  border: 2px solid rgba(125, 249, 255, 0.4);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  flex-shrink: 0;
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  width: 140px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  background: var(--primary);
  color: #1A0B2E;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
}

/* Hero */
.hero {
  position: relative;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid var(--primary);
  box-shadow: 8px 8px 0 rgba(125, 249, 255, 0.25);
}

.hero-slide {
  position: relative;
  aspect-ratio: 16 / 7;
  background: var(--surface);
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(26,11,46,0.95) 0%, rgba(26,11,46,0.1) 60%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px;
  max-width: 70%;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #ff9ab8);
  color: #1A0B2E;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid var(--accent);
  box-shadow: 4px 4px 0 rgba(125, 249, 255, 0.4);
  transition: transform 0.2s;
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1deg); }

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--text);
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 24px;
  background: var(--accent);
  border-radius: 4px;
  box-shadow: 3px 0 0 var(--primary);
}

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

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid rgba(125, 249, 255, 0.25);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: rotate(-1.5deg) translateY(-4px);
  box-shadow: 6px 6px 0 rgba(255, 107, 157, 0.5);
}

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: #1A0B2E;
  font-weight: 700;
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 2px solid var(--accent);
}

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

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  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;
}

/* Cat list */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid rgba(255, 107, 157, 0.3);
  font-weight: 700;
  transition: all 0.2s;
}
.cat-item:hover {
  border-color: var(--accent);
  transform: rotate(1deg);
  box-shadow: 4px 4px 0 rgba(125, 249, 255, 0.3);
}

.cat-count {
  font-size: 12px;
  color: var(--bg);
  background: var(--accent);
  border-radius: 999px;
  padding: 1px 10px;
}

/* Rank list */
.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: all 0.2s;
}
.rank-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 26px;
  min-width: 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.detail-head {
  display: flex;
  gap: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  border: 2px solid rgba(125, 249, 255, 0.25);
}

.detail-cover {
  width: 220px;
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid var(--primary);
  box-shadow: 6px 6px 0 rgba(125, 249, 255, 0.3);
}
.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: 28px;
  letter-spacing: 1px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-meta p span { color: var(--text); }

.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 30px;
  color: var(--primary);
  margin: 10px 0;
  text-shadow: 2px 2px 0 rgba(125, 249, 255, 0.5);
}

.detail-body {
  margin-top: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  border: 2px solid rgba(255, 107, 157, 0.2);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 16px 0 10px;
  color: var(--accent);
}

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.tag {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(125, 249, 255, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* Pager */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 30px 0;
}
.pg {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 2px solid rgba(125, 249, 255, 0.3);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s;
}
.pg:hover { border-color: var(--primary); }
.pg.current {
  background: var(--primary);
  color: #1A0B2E;
  font-weight: 700;
  border-color: var(--accent);
}
.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Links */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(184, 169, 212, 0.3);
  transition: all 0.2s;
}
.link-item:hover { color: var(--accent); border-color: var(--accent); }

/* Footer */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  border-top: 3px solid var(--primary);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: rgba(45, 27, 78, 0.5);
}
.footer a { color: var(--accent); }
.footer p { margin: 4px 0; }

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

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

/* 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: none;
    padding-bottom: 4px;
  }
  .search-box { margin-left: auto; }
  .search-box input { width: 100px; }

  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { max-width: 100%; padding: 16px; }
  .hero-info h2 { font-size: 20px; }

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

  .detail-head {
    flex-direction: column;
    padding: 16px;
  }
  .detail-cover {
    width: 160px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 22px; }
  .detail-body { padding: 16px; }

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