:root {
  --bg: #0E0B1A;
  --surface: #1A1428;
  --primary: #FF8C42;
  --accent: #A76BFF;
  --text: #F0E9FF;
  --muted: #9A8FB8;
  --radius: 24px;
  --radius-sm: 14px;
  --glass: rgba(26, 20, 40, 0.55);
  --glass-line: rgba(167, 107, 255, 0.35);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
  --glow: 0 0 0 1px rgba(167, 107, 255, 0.28), 0 0 24px rgba(167, 107, 255, 0.22);
  --font-heading: 'Playfair Display', 'Noto Serif SC', serif;
  --font-body: 'Inter', 'Noto Sans SC', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(167, 107, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(255, 140, 66, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0; font-weight: 700; }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 11, 26, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(167, 107, 255, 0.18);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s, background .2s, box-shadow .2s;
}
.nav a:hover {
  color: var(--text);
  background: rgba(167, 107, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(167, 107, 255, 0.3);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  min-width: 220px;
}
.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-body);
  color: #1a1024;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #1a1024;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  box-shadow: 0 10px 26px rgba(255, 140, 66, 0.28);
  transition: transform .2s, box-shadow .2s;
  border: 0;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(167, 107, 255, 0.4);
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--glass-line);
}

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

.hero-slide {
  position: relative;
  display: block;
  min-height: 380px;
  background-size: cover;
  background-position: center;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 11, 26, 0.94) 0%, rgba(14, 11, 26, 0.6) 45%, rgba(14, 11, 26, 0.1) 100%);
}
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-info h2 {
  font-size: 34px;
  line-height: 1.25;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.hero-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-info .btn { align-self: flex-start; margin-top: 6px; }

/* ---------- Sections ---------- */
.sec { margin: 44px 0; }

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

.sec-title {
  font-size: 24px;
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 14px rgba(167, 107, 255, 0.7);
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s;
}
.sec-more:hover { color: var(--primary); }

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

.card {
  display: flex;
  flex-direction: column;
  background: var(--glass);
  border: 1px solid rgba(167, 107, 255, 0.16);
  border-radius: var(--radius-sm);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(167, 107, 255, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), 0 0 26px rgba(167, 107, 255, 0.28);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #120e20;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #1a1024;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.card-info {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

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

/* ---------- Categories ---------- */
.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: 10px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid rgba(167, 107, 255, 0.16);
  font-weight: 600;
  font-size: 14px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cat-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 140, 66, 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.cat-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(167, 107, 255, 0.14);
  border-radius: 999px;
  padding: 2px 10px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid rgba(167, 107, 255, 0.14);
  transition: transform .2s, border-color .2s;
}
.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(167, 107, 255, 0.45);
}

.rank-num {
  flex: 0 0 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  background: rgba(167, 107, 255, 0.12);
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #1a1024;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  box-shadow: 0 0 16px rgba(255, 140, 66, 0.45);
}

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

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

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid rgba(167, 107, 255, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 22px rgba(167, 107, 255, 0.25);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.detail-meta h1 {
  font-size: 30px;
  line-height: 1.3;
}
.detail-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  color: #1a1024;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  box-shadow: 0 6px 20px rgba(255, 140, 66, 0.32);
}

.detail-body {
  margin-top: 28px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid rgba(167, 107, 255, 0.16);
  line-height: 1.85;
  color: #d8d0ee;
  font-size: 15px;
}
.detail-body p { margin: 0 0 14px; }
.detail-body img { border-radius: var(--radius-sm); margin: 14px 0; }

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

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  background: rgba(167, 107, 255, 0.13);
  border: 1px solid rgba(167, 107, 255, 0.28);
  transition: background .2s, border-color .2s;
}
.tag:hover {
  background: rgba(255, 140, 66, 0.18);
  border-color: rgba(255, 140, 66, 0.5);
}

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

.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(--muted);
  background: var(--glass);
  border: 1px solid rgba(167, 107, 255, 0.2);
  transition: color .2s, border-color .2s, background .2s;
}
.pg:hover {
  color: var(--text);
  border-color: rgba(167, 107, 255, 0.55);
}
.pg.current {
  color: #1a1024;
  font-weight: 700;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(255, 140, 66, 0.3);
}
.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}
.link-item:hover { color: var(--primary); }

/* ---------- Crumbs ---------- */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 20px 0 4px;
}
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--primary); }

/* ---------- Highlight ---------- */
.hl {
  color: #1a1024;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  border-radius: 4px;
  padding: 0 3px;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  padding: 34px 0 40px;
  border-top: 1px solid rgba(167, 107, 255, 0.16);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.9;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

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

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }
  .logo { font-size: 19px; }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .search-box {
    order: 2;
    margin-left: auto;
    min-width: 0;
    flex: 0 1 160px;
  }
  .search-box input { font-size: 13px; }

  .hero { margin-top: 18px; border-radius: 18px; }
  .hero-slide { min-height: 300px; }
  .hero-slide::after {
    background: linear-gradient(0deg, rgba(14, 11, 26, 0.96) 10%, rgba(14, 11, 26, 0.35) 70%, rgba(14, 11, 26, 0.1) 100%);
  }
  .hero-info {
    padding: 130px 20px 24px;
    max-width: 100%;
  }
  .hero-info h2 { font-size: 24px; }

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

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .card-title { font-size: 13px; }
  .card-info { padding: 10px; }

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

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
    border-radius: 18px;
  }
  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 22px; }
  .detail-body { padding: 18px; border-radius: 18px; font-size: 14px; }

  .pager { gap: 6px; }
  .pg { min-width: 36px; height: 36px; padding: 0 10px; font-size: 13px; }
}