:root {
  --bg: #F5F0EB;
  --surface: #FBF8F4;
  --primary: #B14AED;
  --accent: #FF6FB5;
  --text: #2D2438;
  --muted: #8E8499;
  --radius: 18px;
  --shadow-light: rgba(255, 255, 255, 0.9);
  --shadow-dark: rgba(45, 36, 56, 0.12);
  --font-heading: "Arial Black", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    linear-gradient(180deg, rgba(177, 74, 237, 0.04) 0%, transparent 30%),
    linear-gradient(0deg, rgba(255, 111, 181, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { 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(251, 248, 244, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(142, 132, 153, 0.15);
  box-shadow: 0 6px 20px -12px var(--shadow-dark);
}

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

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

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

.nav a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 12px;
  white-space: nowrap;
  transition: all 0.25s ease;
}
.nav a:hover {
  color: var(--primary);
  background: rgba(177, 74, 237, 0.08);
  box-shadow: 0 2px 8px -4px var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: 14px;
  padding: 6px 6px 6px 16px;
  box-shadow: inset 2px 2px 6px var(--shadow-dark), inset -2px -2px 6px var(--shadow-light);
  flex-shrink: 0;
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  width: 150px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 12px -4px var(--primary);
  transition: transform 0.2s ease;
}
.search-box button:hover { transform: scale(1.05); }

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

.hero-slide {
  position: relative;
  aspect-ratio: 21 / 8;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.14) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, transparent 30%, rgba(45, 36, 56, 0.78) 100%);
  pointer-events: none;
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px;
  max-width: 620px;
  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: 14px;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 22px -8px var(--primary), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px -8px var(--accent), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ===== Section ===== */
.sec { margin: 44px auto; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(142, 132, 153, 0.2);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--text);
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 10px rgba(177, 74, 237, 0.5);
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.sec-more:hover { color: var(--primary); }

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 8px 8px 20px var(--shadow-dark), -8px -8px 20px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 12px 14px 30px var(--shadow-dark), -10px -10px 26px var(--shadow-light);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(177, 74, 237, 0.15), rgba(255, 111, 181, 0.15));
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 10px -3px var(--primary);
}

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

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-title { color: var(--primary); }

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

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

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 10px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 6px 6px 16px var(--shadow-dark), -6px -6px 16px var(--shadow-light);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: transform 0.25s ease, color 0.25s ease;
}
.cat-item:hover {
  transform: translateY(-4px);
  color: var(--primary);
}

.cat-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* ===== 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 16px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 5px 5px 14px var(--shadow-dark), -5px -5px 14px var(--shadow-light);
  transition: transform 0.25s ease;
}
.rank-item:hover { transform: translateX(4px); }

.rank-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, #c9c4d4, #8e8499);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 3px 8px -3px rgba(45, 36, 56, 0.4);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.rank-item:nth-child(1) .rank-num { background: linear-gradient(135deg, #ffd76f, #ff9d3c); }
.rank-item:nth-child(2) .rank-num { background: linear-gradient(135deg, #d7dbe6, #9aa3b5); }
.rank-item:nth-child(3) .rank-num { background: linear-gradient(135deg, #f0a97a, #c97a4a); }

.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-item:hover .rank-title { color: var(--primary); }

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

/* ===== Detail ===== */
.detail {
  margin: 32px auto;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 12px 12px 32px var(--shadow-dark), -12px -12px 32px var(--shadow-light);
}

.detail-head {
  display: flex;
  gap: 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(142, 132, 153, 0.2);
}

.detail-cover {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 8px 8px 22px var(--shadow-dark), -8px -8px 22px var(--shadow-light);
}
.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;
  line-height: 1.3;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0;
}
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-block;
  margin: 14px 0;
  padding: 6px 18px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 18px -6px var(--primary);
}

.detail-body {
  margin-top: 26px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin: 22px 0 12px;
  color: var(--primary);
}
.detail-body p { margin-bottom: 12px; }

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

.tag {
  padding: 5px 14px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
  transition: all 0.2s ease;
}
.tag:hover {
  color: var(--primary);
  box-shadow: inset 2px 2px 6px var(--shadow-dark), inset -2px -2px 6px var(--shadow-light);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  transition: all 0.2s ease;
}
.pg:hover { color: var(--primary); transform: translateY(-2px); }

.pg.current {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 16px -6px var(--primary);
}

.pg.disabled {
  color: var(--muted);
  opacity: 0.5;
  pointer-events: none;
  box-shadow: none;
  background: transparent;
}

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

.link-item {
  padding: 6px 16px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
  transition: color 0.2s ease;
}
.link-item:hover { color: var(--primary); }

/* ===== Footer ===== */
.footer {
  margin-top: 60px;
  padding: 36px 0 28px;
  border-top: 1px solid rgba(142, 132, 153, 0.2);
  background: linear-gradient(180deg, transparent, rgba(177, 74, 237, 0.04));
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}
.footer a { color: var(--muted); transition: color 0.2s ease; }
.footer a:hover { color: var(--primary); }

/* ===== Crumbs ===== */
.crumbs {
  padding: 18px 0 6px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); transition: color 0.2s ease; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { margin: 0 6px; }

/* ===== Highlight ===== */
.hl {
  color: var(--accent);
  font-weight: 700;
  background: rgba(255, 111, 181, 0.12);
  border-radius: 4px;
  padding: 0 2px;
}

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

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

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }
  .logo { font-size: 19px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    gap: 2px;
    padding-bottom: 4px;
  }
  .nav a { padding: 7px 12px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 90px; }

  .hero { margin: 16px auto; border-radius: 14px; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 18px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; margin-bottom: 12px; }
  .btn { padding: 9px 20px; font-size: 13px; }

  .sec { margin: 28px auto; }
  .sec-title { font-size: 18px; }

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

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

  .detail { padding: 18px; margin: 20px auto; }
  .detail-head { flex-direction: column; gap: 18px; }
  .detail-cover { width: 160px; margin: 0 auto; }
  .detail-meta h1 { font-size: 21px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { display: block; width: fit-content; margin: 12px auto; }

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