:root {
  --bg: #0B1C1E;
  --surface: rgba(255, 255, 255, 0.08);
  --primary: #2EC4B6;
  --accent: #F4A261;
  --text: #F0F4F3;
  --muted: #8A9E9C;
  --radius: 16px;
  --font-heading: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Inter', 'Helvetica Neue', 'Arial', sans-serif;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --glow: 0 0 24px rgba(46, 196, 182, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(46, 196, 182, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(244, 162, 97, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

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

img {
  display: block;
  max-width: 100%;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 28, 30, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 0;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: var(--surface);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  gap: 8px;
  min-width: 220px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  min-width: 0;
}

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

.search-box button {
  background: linear-gradient(135deg, var(--primary), #1fa89c);
  border: none;
  color: #0B1C1E;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: opacity 0.3s;
}

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

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  min-height: 320px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 28, 30, 0.95) 0%, rgba(11, 28, 30, 0.3) 50%, transparent 100%);
}

.hero-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1.2;
  color: var(--text);
}

.hero-info p {
  color: var(--muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), #1fa89c);
  color: #0B1C1E;
  border: none;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  align-self: flex-start;
}

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

.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.sec-title::before {
  content: '';
  width: 4px;
  height: 24px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.sec-more {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.3s;
}

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

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

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow), var(--glow);
  border-color: rgba(46, 196, 182, 0.35);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

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

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

.card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 28, 30, 0.6) 0%, transparent 45%);
  pointer-events: none;
}

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(11, 28, 30, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(244, 162, 97, 0.35);
}

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

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.cat-item:hover {
  background: rgba(46, 196, 182, 0.12);
  border-color: rgba(46, 196, 182, 0.4);
  transform: translateY(-3px);
}

.cat-count {
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 400;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  transition: all 0.3s;
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(46, 196, 182, 0.3);
  transform: translateX(4px);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--muted);
  min-width: 36px;
  text-align: center;
  font-style: italic;
}

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

.rank-item:nth-child(2) .rank-num {
  color: #C0C0C0;
}

.rank-item:nth-child(3) .rank-num {
  color: #CD7F32;
}

.rank-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

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

.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

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

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

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  line-height: 1.25;
  color: var(--text);
}

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

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-heading);
}

.detail-score small {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 400;
}

.detail-body {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 28px;
  line-height: 1.8;
  color: var(--text);
  font-size: 0.95rem;
}

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

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

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  transition: all 0.3s;
}

.tag:hover {
  color: var(--primary);
  border-color: rgba(46, 196, 182, 0.4);
  background: rgba(46, 196, 182, 0.1);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.3s;
}

.pg:hover {
  color: var(--text);
  border-color: rgba(46, 196, 182, 0.4);
  background: rgba(46, 196, 182, 0.1);
}

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

.pg.disabled {
  opacity: 0.35;
  pointer-events: none;
}

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

.link-item {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s;
}

.link-item:hover {
  color: var(--primary);
  border-color: rgba(46, 196, 182, 0.35);
}

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

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

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

.crumbs span {
  color: rgba(138, 158, 156, 0.5);
}

/* ===== Highlight ===== */
.hl {
  color: var(--accent);
  font-weight: 600;
  background: rgba(244, 162, 97, 0.12);
  padding: 0 3px;
  border-radius: 3px;
}

/* ===== Footer ===== */
.footer {
  margin-top: 60px;
  padding: 40px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  text-align: center;
}

.footer p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

  .header .wrap {
    gap: 12px;
  }

  .logo {
    font-size: 1.25rem;
  }

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

  .nav a {
    padding: 5px 12px;
    font-size: 0.8rem;
  }

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

  .hero {
    aspect-ratio: 4 / 5;
    min-height: 380px;
    margin: 18px 0;
  }

  .hero-info {
    padding: 20px;
  }

  .hero-info h2 {
    font-size: 1.4rem;
  }

  .hero-info p {
    font-size: 0.82rem;
  }

  .sec {
    margin: 32px 0;
  }

  .sec-title {
    font-size: 1.2rem;
  }

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

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

  .card-title {
    font-size: 0.82rem;
  }

  .card-meta {
    font-size: 0.7rem;
  }

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

  .cat-item {
    padding: 12px 14px;
    font-size: 0.82rem;
  }

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

  .rank-num {
    font-size: 1.15rem;
    min-width: 28px;
  }

  .rank-title {
    font-size: 0.82rem;
  }

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

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

  .detail-meta h1 {
    font-size: 1.4rem;
    text-align: center;
  }

  .detail-meta p {
    text-align: center;
  }

  .detail-score {
    justify-content: center;
    width: 100%;
  }

  .detail-body {
    padding: 20px;
    font-size: 0.9rem;
  }

  .pg {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.8rem;
  }

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

@media (max-width: 380px) {
  .grid {
    grid-template-columns: 1fr;
  }
}