:root {
  --bg: #1A1C1E;
  --surface: #25282B;
  --primary: #F26722;
  --accent: #F2E9E4;
  --text: #E6E8EA;
  --muted: #8B9196;
  --radius: 2px;
  --font-heading: 'Impact', 'Haettenschweiler', 'Arial Narrow Bold', sans-serif;
  --font-body: 'Helvetica Neue', 'Arial', sans-serif;
  --font-mono: 'Courier New', 'Consolas', monospace;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.6);
  --border: #34383C;
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.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: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 4px
  );
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.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 {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  border-radius: var(--radius);
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  width: 160px;
  font-family: var(--font-body);
}

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

.search-box button {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-body);
  transition: opacity 0.2s;
}

.search-box button:hover {
  opacity: 0.85;
}

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

.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: 48px 32px 28px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
  line-height: 1.1;
}

.hero-info p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
  max-width: 640px;
}

.btn {
  display: inline-block;
  padding: 9px 22px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  border-radius: var(--radius);
  letter-spacing: 0.5px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

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

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

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  position: relative;
  padding-left: 14px;
}

.sec-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--primary);
}

.sec-more {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

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

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

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

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg);
}

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: bold;
  padding: 2px 7px;
  border-radius: var(--radius);
  letter-spacing: 0.5px;
}

.card-info {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

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

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

/* ===== Cat 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;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color 0.2s, transform 0.2s;
}

.cat-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  color: var(--primary);
}

.cat-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 1px 8px;
  border-radius: var(--radius);
}

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

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

.rank-item:hover {
  border-left-color: var(--primary);
  transform: translateX(3px);
}

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

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

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

.rank-score {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--primary);
  font-weight: bold;
}

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

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

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

.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: 32px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.15;
}

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

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

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: bold;
  color: var(--primary);
}

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

.detail-body {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  line-height: 1.8;
  color: var(--text);
  font-size: 14px;
}

.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 20px 0 10px;
}

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

.detail-body p {
  margin-bottom: 12px;
  color: var(--text);
}

/* ===== 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: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  transition: all 0.2s;
}

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

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

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

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: bold;
}

.pg.current:hover {
  color: #fff;
}

.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: 12px;
  color: var(--muted);
  padding: 4px 10px;
  background: var(--surface);
  border-radius: var(--radius);
  transition: color 0.2s;
}

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

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}

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

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

/* ===== Crumbs ===== */
.crumbs {
  padding: 16px 0;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}

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

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

.crumbs span {
  margin: 0 6px;
  color: var(--border);
}

/* ===== Highlight ===== */
.hl {
  color: var(--primary);
  font-weight: bold;
  background: rgba(242, 103, 34, 0.12);
  padding: 0 2px;
  border-radius: var(--radius);
}

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

  .logo {
    font-size: 22px;
  }

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

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

  .search-box {
    margin-left: auto;
  }

  .search-box input {
    width: 110px;
  }

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

  .hero-info {
    padding: 32px 16px 18px;
  }

  .hero-info h2 {
    font-size: 24px;
  }

  .hero-info p {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

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

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

  .detail-body {
    padding: 16px;
  }

  .rank-item {
    padding: 8px 10px;
    gap: 10px;
  }

  .rank-num {
    font-size: 15px;
    min-width: 26px;
  }

  .rank-title {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

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

  .card-title {
    font-size: 13px;
  }

  .card-meta {
    font-size: 11px;
  }
}