:root {
  --bg: #FFF3E9;
  --surface: #FFE8D6;
  --primary: #F76B8A;
  --accent: #6C5CE7;
  --text: #2D1B2A;
  --muted: #8A6E7A;
  --radius: 24px;
  --radius-sm: 14px;
  --font-heading: 'Archivo Black', 'Arial Black', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 8px 24px rgba(108, 92, 231, 0.10);
  --shadow-hover: 0 16px 36px rgba(247, 107, 138, 0.22);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(108, 92, 231, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 107, 138, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(45, 27, 42, 0.025) 0px,
    rgba(45, 27, 42, 0.025) 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 {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 243, 233, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--surface);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--primary);
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(247, 107, 138, 0.35);
}

.logo img { height: 36px; width: auto; }

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

.nav a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.nav a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 8px 6px 18px;
  min-width: 220px;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-body);
  min-width: 0;
}

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

.search-box button {
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 7px 18px;
  border-radius: 999px;
  transition: background 0.25s, transform 0.25s;
}

.search-box button:hover { background: var(--primary); transform: translateY(-1px); }

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

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 21 / 9;
  min-height: 280px;
}
.hero-slide:first-child, .hero-slide.active { display: block; }

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

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 60px 36px 32px;
  background: linear-gradient(to top, rgba(45, 27, 42, 0.85), transparent);
  color: #fff;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.25;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-info p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 10px 28px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.btn:hover {
  background: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ============ SECTION ============ */
.sec { margin: 44px 0; }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  position: relative;
  padding-left: 16px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.sec-more {
  font-size: 14px;
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--surface);
  transition: color 0.25s, border-color 0.25s;
}

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

/* ============ GRID / CARD ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px;
}

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

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg);
}

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

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

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(247, 107, 138, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

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

/* ============ CAT LIST ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.25s, background 0.25s, color 0.25s;
}

.cat-item:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-4px);
}

.cat-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 10px;
  border-radius: 999px;
}

.cat-item:hover .cat-count { color: var(--primary); }

/* ============ RANK LIST ============ */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

.rank-item:hover { transform: translateX(6px); box-shadow: var(--shadow-hover); }

.rank-num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

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

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

/* ============ DETAIL ============ */
.detail { margin: 32px 0; }

.detail-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.detail-meta { display: flex; flex-direction: column; gap: 12px; }

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  line-height: 1.3;
}

.detail-meta p { font-size: 14px; color: var(--muted); }
.detail-meta p span { color: var(--text); }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 34px;
  color: var(--primary);
  text-shadow: 0 0 16px rgba(247, 107, 138, 0.35);
}

.detail-score small { font-size: 14px; color: var(--muted); font-family: var(--font-body); }

.detail-body {
  margin-top: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.9;
}

.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 20px 0 12px;
}
.detail-body h2:first-child { margin-top: 0; }

/* ============ TAGS ============ */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }

.tag {
  display: inline-block;
  padding: 5px 16px;
  font-size: 13px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--surface);
  transition: background 0.25s, color 0.25s;
}

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

/* ============ PAGER ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 40px 0;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.pg:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

.pg.current {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
}

.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
  box-shadow: none;
}

/* ============ LINKS ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface);
  transition: color 0.25s, background 0.25s;
}

.link-item:hover { color: #fff; background: var(--accent); }

/* ============ FOOTER ============ */
.footer {
  margin-top: 60px;
  padding: 36px 0 28px;
  background: var(--surface);
  border-top: 2px solid var(--bg);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}

.footer a { color: var(--primary); }
.footer a:hover { text-decoration: underline; }

/* ============ CRUMBS ============ */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.crumbs a { color: var(--primary); }
.crumbs a:hover { text-decoration: underline; }

/* ============ HIGHLIGHT ============ */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(247, 107, 138, 0.14);
  border-radius: 4px;
  padding: 0 3px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 992px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .detail-head { grid-template-columns: 220px 1fr; }
}

@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }

  .logo { font-size: 19px; }

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

  .nav a { padding: 7px 14px; font-size: 14px; }

  .search-box { min-width: 0; flex: 1; }

  .hero-slide { aspect-ratio: 4 / 3; min-height: 220px; }

  .hero-info { padding: 40px 20px 22px; }
  .hero-info h2 { font-size: 21px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }

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

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

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

  .cat-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-item { padding: 13px 16px; font-size: 14px; }

  .detail-head {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
  }

  .detail-cover { max-width: 220px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { justify-content: center; width: 100%; }

  .detail-body { padding: 20px; font-size: 14px; }

  .pg { min-width: 38px; height: 38px; padding: 0 10px; font-size: 13px; }

  .footer { margin-top: 40px; padding: 28px 0 22px; }
}