:root {
  --bg: #0D0B0A;
  --surface: #1A1614;
  --primary: #D4AF37;
  --accent: #C0392B;
  --text: #F5F0E6;
  --muted: #8A7F72;
  --radius: 8px;
  --font-heading: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
  --border: rgba(212, 175, 55, 0.22);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(212, 175, 55, 0.05), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(192, 57, 43, 0.05), transparent 40%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; transition: color 0.2s 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: rgba(13, 11, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px 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: 6px 14px;
  font-size: 14px;
  color: var(--muted);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(212, 175, 55, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 38px;
  min-width: 200px;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  padding: 0 12px;
  font-size: 14px;
  font-family: var(--font-body);
}

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

.search-box button {
  background: transparent;
  border: none;
  color: var(--primary);
  padding: 0 14px;
  cursor: pointer;
  font-size: 14px;
  height: 100%;
  transition: background 0.2s ease;
}

.search-box button:hover { background: rgba(212, 175, 55, 0.12); }

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 24px 0 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-slide:hover img { transform: scale(1.04); }

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 11, 10, 0.95) 0%, rgba(13, 11, 10, 0.4) 45%, transparent 100%);
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 32px;
  z-index: 2;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--primary);
  color: #0D0B0A;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background: #e6c14a;
  color: #0D0B0A;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.3);
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sec-title::before {
  content: "";
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sec-more:hover { color: var(--primary); }

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

.card {
  display: block;
  background: var(--surface);
  border: 1px solid rgba(212, 175, 55, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(13, 11, 10, 0.85);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
}

.card-info { padding: 12px; }

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

.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(150px, 1fr));
  gap: 12px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.2s ease;
}

.cat-item:hover {
  border-color: var(--primary);
  background: rgba(212, 175, 55, 0.06);
}

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

/* ===== Rank List ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  transition: background 0.2s ease;
}

.rank-item:last-child { border-bottom: none; }
.rank-item:hover { background: rgba(212, 175, 55, 0.05); }

.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--muted);
  min-width: 32px;
  text-align: center;
}

.rank-item:nth-child(1) .rank-num { color: var(--primary); }
.rank-item:nth-child(2) .rank-num { color: #c0c0c0; }
.rank-item:nth-child(3) .rank-num { color: #cd7f32; }

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

.rank-score {
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
  min-width: 40px;
  text-align: right;
}

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

.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

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

.detail-meta { padding-top: 8px; }

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.detail-score small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.detail-meta ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--muted);
}

.detail-meta ul li strong {
  color: var(--text);
  font-weight: 500;
  margin-right: 6px;
}

.detail-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  font-size: 15px;
  line-height: 1.9;
  color: #d8d0c2;
}

.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--primary);
  margin: 20px 0 12px;
}

.detail-body h2:first-child { margin-top: 0; }

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

/* ===== Tag List ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.tag:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(212, 175, 55, 0.15);
}

/* ===== Pager ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 40px 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 var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

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

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #0D0B0A;
  font-weight: 700;
}

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

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

.link-item {
  font-size: 13px;
  color: var(--muted);
}

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

/* ===== Crumbs ===== */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--text); }

/* ===== Footer ===== */
.footer {
  margin-top: 60px;
  padding: 40px 0 30px;
  border-top: 1px solid var(--border);
  background: rgba(26, 22, 20, 0.5);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer p { margin-bottom: 8px; }

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

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 12px;
  }

  .logo { font-size: 18px; }

  .nav {
    order: 3;
    width: 100%;
    flex: none;
    padding-bottom: 4px;
  }

  .nav a { padding: 6px 10px; font-size: 13px; }

  .search-box {
    flex: 1;
    min-width: 0;
    height: 34px;
  }

  .hero { margin: 16px 0 28px; }

  .hero-slide { aspect-ratio: 4 / 3; }

  .hero-info { padding: 18px 16px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; margin-bottom: 12px; }

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

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

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .detail-meta h1 { font-size: 22px; text-align: center; }
  .detail-score { display: flex; justify-content: center; }
  .detail-meta ul { justify-content: center; }

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

  .rank-item { padding: 12px 14px; gap: 12px; }
  .rank-num { font-size: 16px; min-width: 24px; }
  .rank-title { font-size: 13px; }
}