:root {
  --bg: #1A120B;
  --surface: #2B1F16;
  --primary: #D4AF37;
  --accent: #C7452B;
  --text: #F3E9D2;
  --muted: #8B7355;
  --radius: 16px;
  --font-heading: 'Cinzel', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Lora', 'Georgia', 'Songti SC', serif;
  --shadow-light: rgba(255, 240, 210, 0.06);
  --shadow-dark: rgba(0, 0, 0, 0.55);
}

* { 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.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(212, 175, 55, 0.06), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(199, 69, 43, 0.05), transparent 45%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--primary); }
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: linear-gradient(180deg, rgba(26, 18, 11, 0.98), rgba(26, 18, 11, 0.92));
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.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: 2px;
  text-transform: uppercase;
  color: var(--primary);
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

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

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

.nav a {
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 1px;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  color: var(--text);
  transition: all .25s ease;
}
.nav a:hover {
  color: var(--primary);
  background: rgba(212, 175, 55, 0.1);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  min-width: 200px;
  box-shadow: inset 2px 2px 6px var(--shadow-dark), inset -1px -1px 4px var(--shadow-light);
}

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

.search-box button {
  background: linear-gradient(135deg, var(--primary), #b8952c);
  border: none;
  color: #1A120B;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s ease;
}
.search-box button:hover { transform: scale(1.05); }

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow:
    8px 8px 24px var(--shadow-dark),
    -4px -4px 16px var(--shadow-light);
}

.hero-slide {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 32px 28px;
  background: linear-gradient(0deg, rgba(26, 18, 11, 0.96) 10%, rgba(26, 18, 11, 0.6) 55%, transparent);
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

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

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #b8952c);
  color: #1A120B;
  font-weight: 700;
  border: 1px solid rgba(212, 175, 55, 0.6);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
  transition: all .25s ease;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
  color: #1A120B;
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
  position: relative;
}
.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.sec-more {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 4px 12px;
  border: 1px solid rgba(139, 115, 85, 0.5);
  border-radius: 999px;
  transition: all .25s ease;
}
.sec-more:hover {
  color: var(--primary);
  border-color: var(--primary);
}

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.15);
  box-shadow:
    6px 6px 16px var(--shadow-dark),
    -3px -3px 10px var(--shadow-light);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow:
    8px 10px 24px var(--shadow-dark),
    -3px -3px 12px var(--shadow-light),
    0 0 0 1px rgba(212, 175, 55, 0.4);
}

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #1A120B;
  background: linear-gradient(135deg, var(--primary), #b8952c);
  padding: 3px 9px;
  border-radius: 8px;
  box-shadow:
    1px 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 2px 6px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

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

/* ===== Cat list ===== */
.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-radius: var(--radius);
  border: 1px solid rgba(212, 175, 55, 0.18);
  font-family: var(--font-heading);
  letter-spacing: 1px;
  font-size: 14px;
  box-shadow:
    4px 4px 12px var(--shadow-dark),
    -2px -2px 8px var(--shadow-light);
  transition: all .25s ease;
}
.cat-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  color: var(--primary);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(212, 175, 55, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(212, 175, 55, 0.15);
  box-shadow:
    4px 4px 12px var(--shadow-dark),
    -2px -2px 8px var(--shadow-light);
  transition: all .25s ease;
}
.rank-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.rank-num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.06);
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.4), inset -1px -1px 3px rgba(212, 175, 55, 0.15);
}

.rank-title {
  flex: 1;
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ===== Detail ===== */
.detail {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin: 32px 0;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow:
    8px 8px 24px var(--shadow-dark),
    -4px -4px 16px var(--shadow-light);
}

.detail-head { display: contents; }

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  letter-spacing: 2px;
  color: var(--primary);
  line-height: 1.3;
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.25);
}

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

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 14px;
  border: 1px solid rgba(199, 69, 43, 0.5);
  border-radius: 10px;
  background: rgba(199, 69, 43, 0.08);
  align-self: flex-start;
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.detail-body {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  color: var(--text);
  font-size: 15px;
  line-height: 1.9;
}

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

.tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(139, 115, 85, 0.4);
  transition: all .25s ease;
}
.tag:hover {
  color: var(--primary);
  border-color: var(--primary);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  box-shadow:
    3px 3px 8px var(--shadow-dark),
    -2px -2px 6px var(--shadow-light);
  transition: all .25s ease;
}
.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.pg.current {
  background: linear-gradient(135deg, var(--primary), #b8952c);
  color: #1A120B;
  font-weight: 700;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
}

.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(139, 115, 85, 0.35);
  transition: all .25s ease;
}
.link-item:hover {
  color: var(--primary);
  border-color: var(--primary);
}

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

/* ===== Highlight ===== */
.hl {
  color: var(--accent);
  font-weight: 700;
  background: rgba(199, 69, 43, 0.12);
  padding: 0 2px;
  border-radius: 3px;
}

/* ===== Footer ===== */
.footer {
  margin-top: 60px;
  padding: 32px 0 40px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  background: linear-gradient(180deg, transparent, rgba(43, 31, 22, 0.5));
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

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

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }

  .logo { font-size: 18px; }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { font-size: 13px; padding: 6px 10px; }

  .search-box {
    order: 2;
    margin-left: auto;
    min-width: 140px;
    flex: 1;
  }

  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-info { padding: 40px 18px 20px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 13px; }

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

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

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

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

  .detail {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
    margin: 20px 0;
  }
  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 22px; text-align: center; }
  .detail-meta { text-align: center; align-items: center; }
  .detail-score { align-self: center; }
  .detail-body { font-size: 14px; }

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