:root {
  --bg: #1c1710;
  --surface: #2b2219;
  --primary: #c9a96e;
  --accent: #a67c3d;
  --text: #f2e8d5;
  --muted: #a8927a;
  --radius: 12px;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
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 16px;
}

/* ===== Header ===== */
.header {
  background: linear-gradient(180deg, #241c13, var(--bg));
  border-bottom: 1px solid rgba(201, 169, 110, .25);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(6px);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo img { height: 34px; 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 {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 8px;
  white-space: nowrap;
  transition: all .2s;
}
.nav a:hover {
  color: var(--primary);
  background: rgba(201, 169, 110, .1);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(201, 169, 110, .3);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  padding: 8px 14px;
  font-size: 14px;
  width: 160px;
  font-family: var(--font-body);
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  background: var(--accent);
  border: none;
  color: var(--bg);
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
}
.search-box button:hover { background: var(--primary); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 9px 22px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #1c1710;
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid rgba(242, 232, 213, .2);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover {
  color: #1c1710;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(201, 169, 110, .35);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 24px auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(201, 169, 110, .3);
  background: var(--surface);
}

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
}
.hero-slide:hover img { transform: scale(1.04); }

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 28px 24px;
  background: linear-gradient(0deg, rgba(28, 23, 16, .96) 0%, rgba(28, 23, 16, .6) 55%, transparent 100%);
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.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;
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(201, 169, 110, .2);
  position: relative;
}
.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 70px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.sec-title::before {
  content: "❖";
  margin-right: 8px;
  color: var(--accent);
  font-size: 14px;
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid rgba(201, 169, 110, .3);
  padding: 4px 14px;
  border-radius: 999px;
  transition: all .2s;
}
.sec-more:hover {
  color: var(--primary);
  border-color: var(--primary);
}

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(201, 169, 110, .15);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(201, 169, 110, .55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #17120c;
}
.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: 8px;
  right: 8px;
  background: rgba(28, 23, 16, .85);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(201, 169, 110, .5);
}

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

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card:hover .card-title { color: var(--primary); }

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

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid rgba(201, 169, 110, .2);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  transition: all .2s;
}
.cat-item:hover {
  border-color: var(--primary);
  background: #342a1e;
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(201, 169, 110, .12);
  padding: 1px 8px;
  border-radius: 999px;
}

/* ===== Rank list ===== */
.rank-list { display: flex; flex-direction: column; gap: 10px; }

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid rgba(201, 169, 110, .15);
  border-radius: var(--radius);
  padding: 10px 14px;
  transition: all .2s;
}
.rank-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  min-width: 32px;
  text-align: center;
}
.rank-item:nth-child(1) .rank-num { color: #e0b96a; }
.rank-item:nth-child(2) .rank-num { color: #c9a96e; }
.rank-item:nth-child(3) .rank-num { color: #a67c3d; }

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

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

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

.detail-head {
  display: flex;
  gap: 28px;
  background: var(--surface);
  border: 1px solid rgba(201, 169, 110, .25);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.detail-cover {
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(201, 169, 110, .35);
}
.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: 26px;
  color: var(--primary);
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.detail-meta p { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  margin: 10px 0;
  padding: 2px 16px;
  border: 1px solid rgba(201, 169, 110, .4);
  border-radius: 10px;
  background: rgba(201, 169, 110, .08);
}

.detail-body {
  background: var(--surface);
  border: 1px solid rgba(201, 169, 110, .2);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  color: var(--primary);
  margin: 18px 0 10px;
}
.detail-body p { margin-bottom: 12px; color: #e4d8c2; }
.detail-body a { color: var(--primary); }

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

.tag {
  font-size: 12px;
  color: var(--muted);
  background: rgba(201, 169, 110, .1);
  border: 1px solid rgba(201, 169, 110, .25);
  padding: 3px 12px;
  border-radius: 999px;
  transition: all .2s;
}
.tag:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ===== 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;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid rgba(201, 169, 110, .25);
  border-radius: 8px;
  transition: all .2s;
}
.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.pg.current {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #1c1710;
  font-weight: 700;
  border-color: var(--primary);
}
.pg.disabled {
  opacity: .4;
  pointer-events: none;
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid rgba(201, 169, 110, .2);
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border: 1px solid rgba(201, 169, 110, .2);
  border-radius: 999px;
  transition: all .2s;
}
.link-item:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  background: linear-gradient(0deg, #17120c, var(--bg));
  border-top: 1px solid rgba(201, 169, 110, .25);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ===== Crumbs ===== */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

/* ===== Highlight ===== */
.hl {
  color: var(--primary);
  background: rgba(201, 169, 110, .15);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}

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

@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }
  .logo { font-size: 18px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    padding-bottom: 4px;
    border-top: 1px solid rgba(201, 169, 110, .15);
    padding-top: 8px;
  }
  .nav a { padding: 5px 10px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero { margin: 16px auto; }
  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-info { padding: 24px 16px 16px; }
  .hero-info h2 { font-size: 19px; }
  .hero-info p { font-size: 13px; }

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

  .sec { margin: 24px 0; }
  .sec-title { font-size: 17px; }

  .detail-head {
    flex-direction: column;
    align-items: center;
    padding: 16px;
    gap: 16px;
  }
  .detail-cover { width: 60%; max-width: 220px; }
  .detail-meta { width: 100%; text-align: center; }
  .detail-meta h1 { font-size: 21px; }
  .detail-body { padding: 16px; font-size: 14px; }

  .cat-list { grid-template-columns: repeat(2, 1fr); }

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

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