* {
  box-sizing: border-box;
}

:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  --soft-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

body {
  margin: 0;
  color: var(--slate-900);
  background: linear-gradient(135deg, #f8fafc 0%, #fff7ed 52%, #fef3c7 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.28);
}

.nav-wrap {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange-500), var(--amber-400));
  color: #111827;
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.35);
}

.brand-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: var(--white);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 10px;
}

.mobile-nav {
  display: none;
  padding: 0 18px 18px;
  background: var(--slate-900);
}

.mobile-nav.open {
  display: grid;
  gap: 12px;
}

.hero {
  position: relative;
  min-height: 75vh;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

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

.hero-slide.active {
  opacity: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(22px);
  transform: scale(1.12);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.36));
}

.hero-inner {
  position: relative;
  z-index: 5;
  min-height: 75vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 44px;
  padding: 56px 0;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.18);
  backdrop-filter: blur(12px);
}

.hero h1 {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  margin: 0 0 20px;
  letter-spacing: -0.05em;
}

.hero p {
  font-size: 19px;
  line-height: 1.8;
  color: #e2e8f0;
  margin: 0 0 24px;
}

.hero-tags,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(249, 115, 22, 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.3);
  border: 0;
  cursor: pointer;
}

.btn.secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(1deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.hero-mini {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.hero-dot.active {
  width: 28px;
  background: var(--orange-500);
}

.main {
  padding: 46px 0 70px;
}

.section-block {
  margin: 0 0 42px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-head h1,
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--slate-500);
  line-height: 1.75;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.72);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.05);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.72);
  font-weight: 700;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--orange-600);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.35;
}

.card-body p {
  margin: 0 0 12px;
  color: var(--slate-500);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-card .card-body p {
  -webkit-line-clamp: 2;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.category-tile {
  min-height: 160px;
  padding: 22px;
  border-radius: 26px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
  box-shadow: var(--soft-shadow);
  position: relative;
  overflow: hidden;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -46px;
  bottom: -50px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.22);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
}

.category-tile p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 24px;
}

.search-input,
.select-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  padding: 0 16px;
  font: inherit;
  background: rgba(255, 255, 255, 0.9);
  outline: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.detail-poster {
  position: sticky;
  top: 92px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--slate-900);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-panel {
  padding: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.72);
}

.detail-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--slate-500);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}

.detail-panel h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-panel p {
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.player-card {
  margin: 36px 0;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.3);
}

.player-shell {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.24), rgba(0, 0, 0, 0.78));
  border: 0;
  color: var(--white);
  cursor: pointer;
}

.play-cover.hidden {
  display: none;
}

.play-cover span {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange-500), var(--amber-400));
  color: #111827;
  font-size: 34px;
  box-shadow: 0 22px 50px rgba(249, 115, 22, 0.35);
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 64px 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.78);
}

.rank-no {
  font-size: 24px;
  font-weight: 900;
  color: var(--orange-600);
  text-align: center;
}

.rank-item img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--slate-800);
}

.rank-item h2,
.rank-item h3 {
  margin: 0 0 8px;
}

.rank-item p {
  margin: 0;
  color: var(--slate-500);
  line-height: 1.6;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.pagination-links a,
.pagination-links span {
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
  padding: 50px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.site-footer h2,
.site-footer h3 {
  color: var(--white);
  margin: 0 0 14px;
}

.site-footer p {
  line-height: 1.75;
  margin: 0;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: var(--amber-400);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  text-align: center;
  color: #94a3b8;
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .hero-inner,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    position: relative;
    top: auto;
    max-width: 380px;
  }

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

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

@media (max-width: 620px) {
  .wrap {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    min-height: auto;
    padding: 42px 0 72px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .movie-grid,
  .category-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 48px 60px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }
}
