:root {
  --bg: #12100e;
  --surface: #1e1a18;
  --primary: #ff5d8f;
  --accent: #00e5c7;
  --text: #fef9f2;
  --muted: #a89f96;
  --radius: 16px;
  --border: 2px solid #fef9f2;
  --font: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  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; }
button, input { font-family: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #6b5a3e; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #8a7350; }

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 16, 14, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--primary);
}

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

.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 0 12px rgba(255, 93, 143, 0.6);
}

.logo::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 10px var(--accent);
}

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

.nav::-webkit-scrollbar { display: none; }

.nav a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  border-radius: 999px;
  transition: all 0.2s;
}

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

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

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

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

.search-box button {
  padding: 7px 16px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.search-box button:hover { opacity: 0.85; }

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--border);
  box-shadow: 8px 8px 0 rgba(255, 93, 143, 0.35);
}

.hero-slide {
  position: relative;
  min-height: 380px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18, 16, 14, 0.95) 10%, rgba(18, 16, 14, 0.2) 70%);
}

.hero-info {
  position: relative;
  z-index: 2;
  padding: 32px;
  max-width: 640px;
}

.hero-info h2 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.btn {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 var(--accent);
  transition: all 0.2s;
}

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

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 2px dashed rgba(168, 159, 150, 0.3);
  padding-bottom: 10px;
}

.sec-title {
  font-size: 22px;
  font-weight: 800;
  position: relative;
  padding-left: 16px;
}

.sec-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) skewX(-12deg);
  width: 8px;
  height: 22px;
  background: var(--primary);
  box-shadow: 0 0 10px rgba(255, 93, 143, 0.7);
}

.sec-more {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  border: 1.5px 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: 18px;
}

.card {
  background: var(--surface);
  border: 2px solid rgba(254, 249, 242, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--accent);
  border-color: var(--accent);
}

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 9px;
  background: var(--primary);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  border: 1.5px solid var(--text);
  box-shadow: 0 0 10px rgba(255, 93, 143, 0.6);
}

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

.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Category ===== */
.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: 2px solid rgba(254, 249, 242, 0.15);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}

.cat-item:hover {
  border-color: var(--primary);
  background: rgba(255, 93, 143, 0.12);
  transform: translateY(-3px);
}

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

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--surface);
  border: 2px solid rgba(254, 249, 242, 0.12);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.rank-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.rank-num {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  color: var(--primary);
  min-width: 28px;
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 93, 143, 0.5);
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num { color: var(--accent); text-shadow: 0 0 10px var(--accent); }

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

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

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

.detail-head {
  display: flex;
  gap: 28px;
  padding: 24px;
  background: var(--surface);
  border: 2px solid rgba(254, 249, 242, 0.15);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 rgba(0, 229, 199, 0.15);
}

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

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

.detail-meta { flex: 1; min-width: 0; }

.detail-meta h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}

.detail-score {
  display: inline-block;
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 14px;
  text-shadow: 0 0 12px rgba(255, 93, 143, 0.5);
}

.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-body {
  margin-top: 22px;
  padding: 24px;
  background: var(--surface);
  border: 2px solid rgba(254, 249, 242, 0.12);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.9;
  color: #d8d0c6;
}

.detail-body h2 {
  font-size: 18px;
  color: var(--text);
  margin: 18px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}

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

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

.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 229, 199, 0.1);
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  transition: all 0.2s;
}

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

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 2px solid rgba(254, 249, 242, 0.2);
  border-radius: 10px;
  transition: all 0.2s;
}

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

.pg.current {
  background: var(--primary);
  border-color: var(--text);
  color: var(--text);
  box-shadow: 0 0 14px rgba(255, 93, 143, 0.5);
}

.pg.disabled {
  opacity: 0.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: 1.5px dashed rgba(168, 159, 150, 0.4);
  border-radius: 999px;
  transition: all 0.2s;
}

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

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

.crumbs a { color: var(--accent); }
.crumbs a:hover { text-decoration: underline; }

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

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

.footer a { color: var(--accent); }
.footer a:hover { text-decoration: underline; }
.footer p { margin: 4px 0; }

/* ===== Responsive ===== */
@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;
  }

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

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

  .hero-slide { min-height: 260px; }
  .hero-info { padding: 20px; }
  .hero-info h2 { font-size: 22px; }

  .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;
    box-shadow: 4px 4px 0 rgba(0, 229, 199, 0.15);
  }

  .detail-cover { width: 140px; margin: 0 auto; }

  .detail-meta h1 { font-size: 20px; text-align: center; }

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

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

  .hero { box-shadow: 4px 4px 0 rgba(255, 93, 143, 0.35); }
}