:root {
  --bg: #1A1C20;
  --surface: #24272D;
  --primary: #FF7A2F;
  --accent: #FFB347;
  --text: #F5F1EA;
  --muted: #9B9790;
  --radius: 20px;
  --radius-sm: 10px;
  --font-heading: 'Oswald', 'Impact', 'Arial Black', sans-serif;
  --font-body: 'Courier New', 'Roboto Mono', monospace;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 14px 36px rgba(255, 122, 47, 0.18);
  --line: rgba(245, 241, 234, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 122, 47, 0.06), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(255, 179, 71, 0.05), transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a3e46; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 28, 32, 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: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: "";
  width: 10px;
  height: 26px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

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

.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;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 122, 47, 0.12);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  min-width: 220px;
}

.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,
.search-box .btn {
  background: linear-gradient(145deg, var(--primary), var(--accent));
  color: #1A1C20;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  font-weight: 600;
  transition: filter 0.2s ease;
}

.search-box button:hover { filter: brightness(1.1); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  border: none;
  color: #1A1C20;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.25), transparent 45%),
    linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 18px rgba(255, 122, 47, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  color: #1A1C20;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(255, 122, 47, 0.4);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 122, 47, 0.5);
  box-shadow: none;
}

.btn.ghost:hover {
  background: rgba(255, 122, 47, 0.12);
  color: var(--primary);
}

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

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 21 / 9;
  animation: fadeIn 0.6s ease;
}

.hero-slide.active { display: block; }

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26, 28, 32, 0.95) 0%, rgba(26, 28, 32, 0.55) 45%, transparent 75%),
              linear-gradient(0deg, rgba(26, 28, 32, 0.9), transparent 50%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 40px;
  max-width: 60%;
}

.hero-info h2,
.hero-info .hero-title {
  font-family: var(--font-heading);
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

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

.hero-info .btn { margin-top: 4px; }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

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

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

.sec-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-title::before {
  content: "■";
  color: var(--primary);
  font-size: 14px;
}

.sec-more {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 16px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

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

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

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

.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: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #1A1C20;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: 0.5px;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.card:hover .card-title { color: var(--primary); }

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

.card-meta span { white-space: nowrap; }

/* ============ Cat list ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-heading);
  letter-spacing: 1px;
  transition: all 0.2s ease;
}

.cat-item:hover {
  border-color: var(--primary);
  background: rgba(255, 122, 47, 0.08);
  transform: translateY(-3px);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(245, 241, 234, 0.06);
  padding: 2px 8px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.rank-item:hover {
  border-left-color: var(--primary);
  background: #2a2e35;
  transform: translateX(4px);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  min-width: 34px;
  text-align: center;
  font-style: italic;
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num { color: var(--accent); }

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

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

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.detail-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), transparent);
}

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

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

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

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 8px;
}

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #1A1C20;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 4px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.detail-meta p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-body {
  margin-top: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  line-height: 1.9;
  color: #d8d4cd;
}

.detail-body h2,
.detail-body h3 {
  font-family: var(--font-heading);
  letter-spacing: 1px;
  color: var(--text);
  margin: 20px 0 12px;
}

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

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

.tag {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 122, 47, 0.1);
  border: 1px solid rgba(255, 122, 47, 0.28);
  color: var(--accent);
  transition: all 0.2s ease;
}

.tag:hover {
  background: var(--primary);
  color: #1A1C20;
  border-color: var(--primary);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--muted);
  transition: all 0.2s ease;
}

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

.pg.current {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #1A1C20;
  border-color: transparent;
  font-weight: 700;
}

.pg.disabled {
  opacity: 0.35;
  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: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all 0.2s ease;
}

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

/* ============ Crumbs ============ */
.crumbs {
  font-size: 12px;
  color: var(--muted);
  padding: 18px 0 0;
  letter-spacing: 0.5px;
}

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

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

.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ============ Highlight ============ */
.hl {
  color: #1A1C20;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cat-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-info h2, .hero-info .hero-title { font-size: 30px; }
}

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

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

  .logo { font-size: 22px; }

  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

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

  .search-box {
    flex: 1;
    min-width: 0;
    order: 2;
  }

  .hero { margin: 16px auto; border-radius: var(--radius-sm); }

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

  .hero-info {
    max-width: 100%;
    padding: 20px;
  }

  .hero-info h2, .hero-info .hero-title { font-size: 22px; }

  .hero-info p { -webkit-line-clamp: 2; font-size: 12px; }

  .sec { margin: 28px 0; }

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

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

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

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

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

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

  .detail-meta h1 { font-size: 22px; }

  .detail-body { padding: 18px; }

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

  .footer { margin-top: 36px; padding: 24px 0; }
}