:root {
  --bg: #140A0C;
  --surface: #1F1013;
  --primary: #E8354D;
  --accent: #F2C14E;
  --text: #F6E9E2;
  --muted: #9C7F7C;
  --radius: 10px;
  --font-heading: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-body: 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
  --line: rgba(242, 193, 78, 0.18);
  --glow: 0 0 18px rgba(232, 53, 77, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(232, 53, 77, 0.10), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(242, 193, 78, 0.06), transparent 50%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: color .25s, opacity .25s; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; }

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: var(--glow);
  vertical-align: middle;
}
.logo:hover { color: var(--accent); }

.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);
  white-space: nowrap;
  border-radius: var(--radius);
  position: relative;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
  background: var(--surface);
}
.nav a:hover::after,
.nav a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  background: var(--primary);
  box-shadow: var(--glow);
}

.search-box {
  position: relative;
  flex-shrink: 0;
}
.search-box input {
  width: 200px;
  height: 38px;
  padding: 0 42px 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: var(--glow);
}
.search-box button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  border-radius: 6px;
}
.search-box button:hover { color: var(--primary); }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 26px 0 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.hero-slide {
  position: relative;
  display: none;
  min-height: 420px;
  background-size: cover;
  background-position: center;
}
.hero-slide.active { display: block; }
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20,10,12,0.95) 0%, rgba(20,10,12,0.55) 45%, rgba(20,10,12,0.15) 100%);
}
.hero-slide::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  bottom: 16px;
  border: 1px solid rgba(242, 193, 78, 0.28);
  border-radius: 6px;
  pointer-events: none;
  clip-path: polygon(0 0, 40px 0, 40px 1px, 1px 1px, 1px 40px, 0 40px,
    0 100%, 40px 100%, 40px calc(100% - 1px), 1px calc(100% - 1px), 1px calc(100% - 40px), 0 calc(100% - 40px),
    100% 100%, calc(100% - 40px) 100%, calc(100% - 40px) calc(100% - 1px), calc(100% - 1px) calc(100% - 1px), calc(100% - 1px) calc(100% - 40px), 100% calc(100% - 40px),
    100% 0, calc(100% - 40px) 0, calc(100% - 40px) 1px, calc(100% - 1px) 1px, calc(100% - 1px) 40px, 100% 40px);
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 60px 48px;
}
.hero-info .hero-tag {
  display: inline-block;
  padding: 3px 12px;
  margin-bottom: 16px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.hero-info h1,
.hero-info h2 {
  font-size: 42px;
  letter-spacing: 1px;
  margin-bottom: 14px;
  color: var(--text);
  text-shadow: 2px 0 rgba(232, 53, 77, 0.35), -2px 0 rgba(242, 193, 78, 0.2);
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, background .25s;
}
.btn:hover {
  background: #ff4560;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--glow);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--accent);
}
.btn.ghost:hover {
  border-color: var(--accent);
  background: rgba(242, 193, 78, 0.08);
  color: var(--accent);
}

/* ============ Section ============ */
.sec { margin-bottom: 48px; }

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: var(--primary);
  box-shadow: var(--glow);
}

.sec-title {
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--text);
}
.sec-title span { color: var(--primary); }

.sec-more {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
  white-space: nowrap;
}
.sec-more:hover { color: var(--accent); }

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

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(232, 53, 77, 0.55);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), var(--glow);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0d0607;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20,10,12,0.85) 100%);
  pointer-events: none;
}

.card-score {
  position: absolute;
  top: 10px;
  right: 0;
  z-index: 2;
  padding: 3px 12px 3px 14px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: var(--glow);
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-title { color: var(--primary); }

.card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  white-space: nowrap;
  overflow: hidden;
}
.card-meta span { display: inline-block; }

/* ============ Category list ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.cat-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--glow);
  color: var(--accent);
}
.cat-count {
  font-size: 12px;
  color: var(--muted);
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

/* ============ Rank list ============ */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 28px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.rank-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--glow);
}
.rank-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  transform: skewX(-6deg);
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--glow);
}
.rank-title {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-item:hover .rank-title { color: var(--primary); }
.rank-score {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

/* ============ Detail ============ */
.detail {
  margin: 30px 0 50px;
}
.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.detail-head::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  opacity: .5;
  pointer-events: none;
}
.detail-head::after {
  content: "";
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  opacity: .5;
  pointer-events: none;
}

.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d0607;
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta { display: flex; flex-direction: column; gap: 14px; }
.detail-meta h1 {
  font-size: 34px;
  letter-spacing: 1px;
  color: var(--text);
}
.detail-meta .sub {
  font-size: 14px;
  color: var(--muted);
}
.detail-meta .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13px;
  color: var(--muted);
}
.detail-meta .meta-row b { color: var(--text); font-weight: 500; }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  color: var(--primary);
  text-shadow: var(--glow);
  line-height: 1;
}
.detail-score small {
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 400;
}

.detail-body {
  margin-top: 30px;
  padding: 28px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2,
.detail-body h3 {
  font-size: 20px;
  margin: 20px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
  color: var(--text);
}
.detail-body p { margin-bottom: 14px; color: #d8c8c3; }
.detail-body img { border-radius: var(--radius); margin: 14px 0; }

/* ============ Tag list ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12px;
  letter-spacing: .5px;
  color: var(--muted);
  background: rgba(242, 193, 78, 0.05);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: all .25s;
}
.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(242, 193, 78, 0.12);
  transform: translateY(-2px);
}

/* ============ Pager ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 40px 0 10px;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .25s;
}
.pg:hover {
  color: var(--text);
  border-color: var(--primary);
  box-shadow: var(--glow);
}
.pg.current {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--glow);
  font-weight: 600;
}
.pg.disabled {
  opacity: .35;
  pointer-events: none;
  cursor: not-allowed;
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color .25s;
}
.link-item:hover { color: var(--accent); }

/* ============ Footer ============ */
.footer {
  margin-top: 50px;
  padding: 36px 0 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(31, 16, 19, 0.6));
  font-size: 13px;
  color: var(--muted);
}
.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer .foot-brand {
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--text);
}
.footer .foot-brand span { color: var(--primary); }

/* ============ Crumbs ============ */
.crumbs {
  padding: 18px 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .5px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--text); }

/* ============ Highlight ============ */
.hl {
  color: var(--accent);
  background: rgba(242, 193, 78, 0.12);
  padding: 0 3px;
  border-radius: 3px;
  font-style: normal;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .hero-info h1, .hero-info h2 { font-size: 34px; }
  .detail-head { grid-template-columns: 200px 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }
  .logo { font-size: 18px; }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { padding: 6px 12px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 150px; height: 34px; }

  .hero { margin: 16px 0 28px; }
  .hero-slide { min-height: 340px; }
  .hero-slide::before {
    background: linear-gradient(180deg, rgba(20,10,12,0.35) 0%, rgba(20,10,12,0.95) 75%);
  }
  .hero-info {
    padding: 40px 22px 28px;
    max-width: 100%;
  }
  .hero-info h1, .hero-info h2 { font-size: 26px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }

  .sec { margin-bottom: 34px; }
  .sec-title { font-size: 20px; }
  .sec-head { margin-bottom: 18px; }

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 24px; text-align: center; }
  .detail-meta .sub,
  .detail-meta .meta-row { justify-content: center; text-align: center; }
  .detail-score { font-size: 32px; }
  .detail-body { padding: 20px; font-size: 14px; }

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

  .footer { margin-top: 34px; padding: 26px 0 20px; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-info { padding: 8px 8px 10px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; }
  .cat-list { grid-template-columns: 1fr; }
}