* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

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

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

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

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #fb923c);
  color: #0f172a;
  font-size: 14px;
  box-shadow: 0 14px 40px rgba(245, 158, 11, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.main-nav a {
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fbbf24;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.filter-bar input,
.filter-bar select {
  height: 40px;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #1e293b;
  color: #fff;
  outline: none;
  padding: 0 12px;
}

.top-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #f59e0b;
}

.top-search button,
.filter-bar button,
.btn,
.play-button {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  color: #0f172a;
  background: #f59e0b;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.top-search button:hover,
.filter-bar button:hover,
.btn:hover,
.play-button:hover {
  transform: translateY(-1px);
  background: #fbbf24;
}

.btn.ghost {
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
}

.hero-carousel {
  position: relative;
  height: 590px;
  margin-top: 64px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0f172a 0%, rgba(15, 23, 42, 0.82) 42%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-copy {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  right: 24px;
  bottom: 76px;
  max-width: 780px;
}

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

.hero-meta span,
.tag-row span,
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 999px;
  padding: 5px 10px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  font-size: 12px;
}

.hero-copy h1 {
  margin: 18px 0 14px;
  color: #fff;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
}

.hero-copy p {
  margin: 0 0 26px;
  max-width: 680px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.68);
  font-size: 24px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.45);
}

.hero-dot.active {
  width: 26px;
  background: #f59e0b;
}

.main-content {
  padding: 52px 0 68px;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 4vw, 40px);
}

.section-head p,
.page-title p,
.detail-title p,
.site-footer p {
  margin: 8px 0 0;
  color: #94a3b8;
  line-height: 1.7;
}

.section-link {
  color: #fbbf24;
  font-weight: 700;
  white-space: nowrap;
}

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

.movie-card {
  display: block;
  min-width: 0;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: #1e293b;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.poster img,
.wide-thumb img,
.rank-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover .poster img,
.wide-card:hover .wide-thumb img,
.rank-card:hover .rank-cover img,
.category-card:hover img {
  transform: scale(1.08);
}

.poster em,
.wide-thumb em,
.rank-num {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.poster-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 30px 12px 12px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent);
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-overlay {
  opacity: 1;
  transform: translateY(0);
}

.movie-card strong,
.wide-card strong,
.rank-card strong {
  display: block;
  margin-top: 12px;
  color: #fff;
  line-height: 1.45;
}

.movie-card:hover strong,
.wide-card:hover strong,
.rank-card:hover strong {
  color: #fbbf24;
}

.movie-card small,
.wide-card small,
.rank-card small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
}

.scroller {
  display: flex;
  gap: 18px;
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.scroller .movie-card {
  flex: 0 0 210px;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.52);
}

.wide-thumb {
  position: relative;
  overflow: hidden;
  background: #1e293b;
}

.wide-info {
  padding: 20px;
}

.line-clamp {
  display: -webkit-box;
  overflow: hidden;
  color: #94a3b8;
  line-height: 1.65;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.5);
}

.category-card figure {
  position: relative;
  height: 145px;
  margin: 0;
  overflow: hidden;
}

.category-card figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.84), transparent);
}

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

.category-card div {
  padding: 18px;
}

.category-card h3 {
  margin: 0 0 8px;
  color: #fff;
}

.category-card p {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

.page-hero {
  margin-top: 64px;
  padding: 72px 0 34px;
  background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 36%), #0f172a;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 26px;
}

.filter-bar input {
  min-width: 260px;
  flex: 1;
}

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

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 18px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.45);
}

.rank-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 13px;
}

.rank-num {
  top: 8px;
  left: 8px;
  right: auto;
  background: #f59e0b;
  color: #0f172a;
  font-weight: 900;
}

.detail-hero {
  margin-top: 64px;
  padding: 42px 0;
  background: radial-gradient(circle at 30% 0%, rgba(245, 158, 11, 0.2), transparent 34%), #0f172a;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: start;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  background: #1e293b;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.detail-cover img {
  aspect-ratio: 3 / 4;
}

.detail-title h1 {
  margin-bottom: 14px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.player-card,
.content-card {
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 22px;
  padding: 22px;
  background: rgba(30, 41, 59, 0.5);
  margin-bottom: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.2));
  pointer-events: none;
}

.play-button {
  pointer-events: auto;
  font-size: 17px;
}

.player-box.ready .play-layer {
  display: none;
}

.content-card h2,
.player-card h2 {
  margin: 0 0 14px;
  color: #fff;
}

.content-card p {
  color: #cbd5e1;
  line-height: 1.9;
}

.site-footer {
  padding: 34px 0;
  border-top: 1px solid rgba(51, 65, 85, 0.75);
  background: #0b1220;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
  color: #cbd5e1;
}

.empty-state {
  display: none;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 18px;
  padding: 24px;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.5);
}

@media (max-width: 980px) {
  .main-nav,
  .top-search {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .site-header.open .main-nav,
  .site-header.open .top-search {
    position: absolute;
    left: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid #334155;
    border-radius: 18px;
    background: #0f172a;
  }

  .site-header.open .main-nav {
    top: 68px;
  }

  .site-header.open .top-search {
    top: 365px;
  }

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

  .feature-grid,
  .list-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .hero-carousel {
    height: 540px;
  }

  .hero-copy {
    bottom: 70px;
  }

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

  .wide-card,
  .rank-card {
    grid-template-columns: 108px 1fr;
  }

  .wide-card {
    min-height: 160px;
  }

  .wide-info {
    padding: 14px;
  }

  .footer-grid,
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
  }
}
