:root {
  --bg: #FFFBF5;
  --surface: #FFFFFF;
  --primary: #F28C38;
  --accent: #FFB347;
  --text: #2D2A26;
  --muted: #8C857D;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 8px 28px rgba(242, 140, 56, 0.12);
  --shadow-hover: 0 14px 38px rgba(242, 140, 56, 0.22);
  --border: 1px solid rgba(45, 42, 38, 0.07);
  --glass: rgba(255, 255, 255, 0.72);
  --font-heading: 'Poppins', 'Segoe UI', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', 'Segoe UI', 'Helvetica Neue', sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
}

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: var(--border);
  backdrop-filter: blur(12px);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.logo span,
.logo em {
  color: var(--primary);
  font-style: normal;
}

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

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

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  background: rgba(242, 140, 56, 0.12);
  color: var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  min-width: 200px;
}

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

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

.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.search-box button:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

/* ============ 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: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(45, 42, 38, 0.78) 0%, rgba(45, 42, 38, 0.35) 45%, transparent 75%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 40px;
  max-width: 560px;
  color: #fff;
}

.hero-info h2 {
  font-size: 30px;
  margin-bottom: 10px;
  color: #fff;
}

.hero-info p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.hero-info .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(242, 140, 56, 0.35);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(242, 140, 56, 0.45);
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  position: relative;
  padding-left: 14px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

.sec-more {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  border: var(--border);
  background: var(--surface);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.sec-more:hover {
  color: var(--primary);
  border-color: rgba(242, 140, 56, 0.4);
  background: rgba(242, 140, 56, 0.06);
}

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

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(45, 42, 38, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 179, 71, 0.18), rgba(242, 140, 56, 0.1));
}

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

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

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: var(--glass);
  backdrop-filter: blur(8px);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 8px rgba(45, 42, 38, 0.12);
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  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: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  white-space: nowrap;
  overflow: hidden;
}

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

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 12px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 4px 14px rgba(242, 140, 56, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 140, 56, 0.3);
  box-shadow: var(--shadow);
}

.cat-item .cat-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

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

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(242, 140, 56, 0.1);
  padding: 1px 10px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
}

.rank-item:nth-child(1) .rank-num {
  background: linear-gradient(135deg, #FFB347, #F28C38);
  color: #fff;
}

.rank-item:nth-child(2) .rank-num {
  background: linear-gradient(135deg, #FFD08A, #FFB347);
  color: #fff;
}

.rank-item:nth-child(3) .rank-num {
  background: rgba(242, 140, 56, 0.25);
  color: var(--primary);
}

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

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

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

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

.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

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

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

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

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 179, 71, 0.18), rgba(242, 140, 56, 0.1));
  box-shadow: 0 10px 28px rgba(45, 42, 38, 0.12);
}

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

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

.detail-meta h1 {
  font-size: 28px;
  color: var(--text);
}

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

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(242, 140, 56, 0.35);
}

.detail-meta dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
  font-size: 14px;
  margin-top: 4px;
}

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

.detail-meta dd {
  color: var(--text);
}

.detail-body {
  margin-top: 24px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 4px 16px rgba(45, 42, 38, 0.04);
}

.detail-body h2 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--text);
}

.detail-body p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 12px;
}

.detail-body .play-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.detail-body .play-list a {
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(242, 140, 56, 0.1);
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.detail-body .play-list a:hover {
  background: var(--primary);
  color: #fff;
}

/* ============ Tags ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border: var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.tag:hover {
  color: var(--primary);
  border-color: rgba(242, 140, 56, 0.4);
  background: rgba(242, 140, 56, 0.06);
}

/* ============ Pager ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 36px auto;
}

.pg {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.pg:hover {
  color: var(--primary);
  border-color: rgba(242, 140, 56, 0.4);
}

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(242, 140, 56, 0.35);
}

.pg.disabled {
  color: var(--muted);
  opacity: 0.5;
  pointer-events: none;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: var(--border);
  padding: 6px 16px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.link-item:hover {
  color: var(--primary);
  border-color: rgba(242, 140, 56, 0.4);
  background: rgba(242, 140, 56, 0.06);
}

/* ============ Footer ============ */
.footer {
  margin-top: 56px;
  background: var(--surface);
  border-top: var(--border);
  padding: 36px 0 28px;
}

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

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

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

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

/* ============ Highlight ============ */
.hl {
  color: var(--primary);
  font-weight: 600;
  background: rgba(255, 179, 71, 0.18);
  padding: 0 2px;
  border-radius: 4px;
}

/* ============ Search page ============ */
.search-head {
  margin: 32px auto 20px;
}

.search-head h1 {
  font-size: 24px;
  color: var(--text);
}

.search-head p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .cat-list {
    grid-template-columns: repeat(4, 1fr);
  }
  .rank-list {
    grid-template-columns: 1fr;
  }
  .detail-head {
    grid-template-columns: 200px 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 14px;
  }
  .header .wrap {
    height: 58px;
    gap: 12px;
  }
  .logo {
    font-size: 18px;
  }
  .nav {
    gap: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a {
    padding: 6px 10px;
    font-size: 13px;
  }
  .search-box {
    min-width: 0;
    width: 130px;
    padding: 4px 4px 4px 12px;
  }
  .search-box input {
    font-size: 13px;
  }
  .search-box button {
    padding: 6px 12px;
    font-size: 12px;
  }
  .hero {
    margin: 16px auto;
    border-radius: var(--radius-sm);
  }
  .hero-slide {
    aspect-ratio: 4 / 5;
  }
  .hero-slide::after {
    background: linear-gradient(0deg, rgba(45, 42, 38, 0.85) 0%, rgba(45, 42, 38, 0.2) 55%, transparent 80%);
  }
  .hero-info {
    padding: 20px;
    max-width: 100%;
  }
  .hero-info h2 {
    font-size: 20px;
  }
  .hero-info p {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
  .sec {
    margin: 28px auto;
  }
  .sec-title {
    font-size: 18px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .cat-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .cat-item {
    padding: 16px 8px;
  }
  .cat-item .cat-name {
    font-size: 13px;
  }
  .rank-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .detail-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }
  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }
  .detail-meta h1 {
    font-size: 22px;
    text-align: center;
  }
  .detail-meta .sub {
    text-align: center;
  }
  .detail-score {
    align-self: center;
  }
  .detail-meta dl {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .detail-body {
    padding: 18px;
  }
  .detail-body p {
    font-size: 14px;
  }
  .footer {
    margin-top: 36px;
    padding: 24px 0 20px;
  }
  .pg {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
  }
}