:root {
  --bg: #111315;
  --surface: #1C1F22;
  --primary: #FF6B1A;
  --accent: #00F5D4;
  --text: #E8E6E3;
  --muted: #8A8F94;
  --radius: 10px;
  --font-heading: 'Rajdhani', 'Oswald', 'Arial Black', sans-serif;
  --font-body: 'IBM Plex Mono', 'Courier New', monospace;
}

* { 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;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.008) 0 1px, transparent 1px 4px);
}

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17,19,21,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,107,26,0.25);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo::before {
  content: "▮";
  color: var(--primary);
  margin-right: 6px;
  animation: blink 1.4s infinite;
}
.logo:hover { color: var(--primary); }

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }

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

.nav a {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  border-radius: 6px;
  transition: all .2s;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(255,107,26,0.08);
}
.nav a:hover::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,245,212,0.15);
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  width: 160px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  background: var(--primary);
  border: none;
  color: #111315;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .2s;
}
.search-box button:hover { background: var(--accent); }

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(0,245,212,0.15);
}
.hero-slide {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: #0a0c0d;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17,19,21,0.95) 0%, rgba(17,19,21,0.4) 55%, transparent 100%),
    linear-gradient(0deg, rgba(17,19,21,0.9) 0%, transparent 60%);
  pointer-events: none;
}
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(0,245,212,0.5);
  border-radius: 6px;
  clip-path: polygon(0 0, 40px 0, 40px 2px, 2px 2px, 2px 40px, 0 40px,
    0 100%, 40px 100%, 40px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 40px), 0 calc(100% - 40px),
    100% 100%, calc(100% - 40px) 100%, calc(100% - 40px) calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) calc(100% - 40px), 100% calc(100% - 40px),
    100% 0, calc(100% - 40px) 0, calc(100% - 40px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 40px, 100% 40px);
  pointer-events: none;
  z-index: 2;
}
.hero-info {
  position: absolute;
  left: 0; bottom: 0;
  z-index: 3;
  padding: 40px;
  max-width: 620px;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}
.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;
}

/* ===== Button ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--primary);
  color: #111315;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 0 0 rgba(255,107,26,0);
}
.btn:hover {
  background: var(--accent);
  color: #111315;
  box-shadow: 0 0 24px rgba(0,245,212,0.5);
  transform: translateY(-2px);
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(0,245,212,0.3);
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.sec-head::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 60px; height: 2px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}
.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
}
.sec-title::before {
  content: "//";
  color: var(--accent);
  margin-right: 8px;
  font-family: var(--font-body);
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s;
}
.sec-more:hover { color: var(--accent); }
.sec-more::after { content: " →"; }

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

.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,107,26,0.5);
  box-shadow: 0 8px 28px rgba(255,107,26,0.18);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0a0c0d;
}
.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(17,19,21,0.85);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,107,26,0.4);
  backdrop-filter: blur(4px);
}
.card-score::before { content: "★ "; color: var(--accent); font-size: 11px; }

.card-info { padding: 10px 12px 12px; }
.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.card:hover .card-title { color: var(--primary); }
.card-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card-meta span { white-space: nowrap; }
.card-meta span + span::before { content: "·"; margin-right: 6px; color: rgba(255,255,255,0.2); }

/* ===== 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 16px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  transition: all .2s;
}
.cat-item:hover {
  border-left-color: var(--accent);
  background: rgba(0,245,212,0.05);
  transform: translateX(4px);
  color: var(--accent);
}
.cat-count {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  background: rgba(0,0,0,0.3);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ===== Rank list ===== */
.rank-list { display: flex; flex-direction: column; gap: 2px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all .2s;
}
.rank-item:hover {
  border-color: rgba(0,245,212,0.3);
  background: rgba(0,245,212,0.04);
}
.rank-num {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--muted);
  min-width: 36px;
  text-align: center;
  font-style: italic;
}
.rank-item:nth-child(1) .rank-num { color: var(--primary); text-shadow: 0 0 12px rgba(255,107,26,0.6); }
.rank-item:nth-child(2) .rank-num { color: var(--accent); }
.rank-item:nth-child(3) .rank-num { color: #FFD166; }
.rank-title {
  flex: 1;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-item:hover .rank-title { color: var(--primary); }
.rank-score {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

/* ===== Detail ===== */
.detail { margin: 28px 0; }
.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 32px;
}
.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0,245,212,0.2);
  box-shadow: 0 0 30px rgba(0,245,212,0.1);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }

.detail-meta { display: flex; flex-direction: column; gap: 16px; }
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.15;
  text-transform: uppercase;
}
.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 16px rgba(255,107,26,0.4);
}
.detail-score::before { content: "★"; color: var(--accent); font-size: 20px; }

.detail-meta dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  font-size: 13px;
}
.detail-meta dt { color: var(--muted); white-space: nowrap; }
.detail-meta dd { color: var(--text); }

.detail-body {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 24px 28px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 24px;
}
.detail-body p { margin-bottom: 12px; }
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  color: var(--primary);
  letter-spacing: 1px;
  margin: 16px 0 10px;
}

/* ===== Tag list ===== */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(0,245,212,0.06);
  border: 1px solid rgba(0,245,212,0.25);
  border-radius: 20px;
  font-size: 12px;
  color: var(--accent);
  transition: all .2s;
}
.tag:hover {
  background: var(--accent);
  color: #111315;
  box-shadow: 0 0 12px rgba(0,245,212,0.4);
}

/* ===== 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;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  transition: all .2s;
}
.pg:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 12px rgba(255,107,26,0.25);
}
.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #111315;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(255,107,26,0.4);
}
.pg.disabled {
  opacity: .35;
  pointer-events: none;
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
}
.link-item {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  transition: all .2s;
}
.link-item:hover {
  color: var(--accent);
  border-color: rgba(0,245,212,0.3);
}

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.25);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ===== Crumbs ===== */
.crumbs {
  font-size: 12px;
  color: var(--muted);
  padding: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: rgba(255,255,255,0.2); }

/* ===== Highlight ===== */
.hl {
  color: var(--primary);
  background: rgba(255,107,26,0.12);
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 700;
}

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

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px;
    gap: 10px;
  }
  .logo { font-size: 20px; }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 100px; }

  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-info { padding: 20px; }
  .hero-info h2 { font-size: 24px; }

  .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: 220px; margin: 0 auto; }
  .detail-body { padding: 18px; }

  .sec-title { font-size: 18px; }
  .rank-num { font-size: 18px; min-width: 28px; }
  .rank-title { font-size: 14px; }
}