:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #111a2f;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --gray-50: #f8fafc;
  --gray-100: #eef2f7;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --purple-500: #a855f7;
  --pink-500: #ec4899;
  --radius-lg: 24px;
  --shadow-soft: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 14px 34px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--purple-500));
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.38);
  font-size: 14px;
}

.logo-text {
  font-size: 24px;
  background: linear-gradient(90deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.header-search input,
.mobile-search input {
  border: 0;
  outline: 0;
  color: #fff;
  background: rgba(51, 65, 85, 0.92);
  border-radius: 999px;
  padding: 10px 16px;
  min-width: 230px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #94a3b8;
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.ghost-btn,
.play-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-btn,
.play-button {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--purple-500));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.26);
}

.header-search button {
  padding: 10px 18px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
}

.secondary-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(14px);
}

.ghost-btn {
  color: var(--blue-600);
  background: rgba(37, 99, 235, 0.09);
}

.header-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 24px;
}

.mobile-nav {
  padding: 0 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 12px 0;
}

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

.mobile-search button {
  color: #fff;
  background: var(--blue-600);
  padding: 0 16px;
}

.mobile-link {
  display: block;
  color: #cbd5e1;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
}

.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  color: #fff;
  background: radial-gradient(circle at 20% 12%, rgba(59, 130, 246, 0.32), transparent 34%),
    radial-gradient(circle at 78% 20%, rgba(168, 85, 247, 0.28), transparent 34%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.35));
  z-index: 2;
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 640px;
}

.hero-slide.active {
  display: block;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.05);
}

.hero-content {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 54px;
  min-height: 640px;
  padding: 74px 0;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(147, 197, 253, 0.22);
  border-radius: 999px;
  padding: 8px 14px;
  margin-bottom: 18px;
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 16px;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  max-width: 700px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 26px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 7px 12px;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
  aspect-ratio: 3 / 4;
  transform: rotate(2deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.88));
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 5;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 38px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dot.active {
  background: #fff;
}

main {
  min-height: 60vh;
}

.section {
  padding: 56px 0;
}

.section.alt {
  background: #fff;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.lead {
  margin: 8px 0 0;
  color: var(--gray-500);
  max-width: 720px;
}

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.16);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
  aspect-ratio: 2 / 3;
}

.featured-card .card-cover {
  aspect-ratio: 16 / 10;
}

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

.movie-card:hover .card-cover img,
.compact-card:hover img {
  transform: scale(1.08);
}

.card-year {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 800;
}

.card-body h3 {
  margin: 8px 0 6px;
  font-size: 16px;
  line-height: 1.28;
}

.card-body p {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  color: var(--gray-700);
  background: var(--gray-100);
  padding: 4px 8px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #172554, #6d28d9);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #312e81, #be185d);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: #dbeafe;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: 22px;
  padding: 12px 16px;
  box-shadow: var(--shadow-card);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--purple-500));
  border-radius: 15px;
  font-weight: 900;
}

.rank-item img {
  width: 88px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.rank-item p {
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow-card);
}

.compact-card img {
  width: 74px;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.4s ease;
}

.compact-card strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.35;
}

.compact-card em {
  display: block;
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin: 24px 0;
  background: #fff;
  border-radius: 22px;
  padding: 14px;
  box-shadow: var(--shadow-card);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  outline: none;
  padding: 12px 14px;
  background: #fff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.page-hero {
  padding: 70px 0 40px;
  color: #fff;
  background: radial-gradient(circle at 20% 18%, rgba(37, 99, 235, 0.36), transparent 32%),
    radial-gradient(circle at 80% 12%, rgba(236, 72, 153, 0.24), transparent 30%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-weight: 700;
}

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

.player-card,
.detail-card,
.side-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.player-card {
  overflow: hidden;
  margin-bottom: 26px;
}

.video-box {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.64));
  pointer-events: none;
}

.play-button {
  pointer-events: auto;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  font-size: 20px;
}

.video-box.playing .play-overlay {
  display: none;
}

.player-caption {
  padding: 18px 22px;
}

.player-caption h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.player-caption p {
  margin: 0;
  color: var(--gray-500);
}

.detail-card {
  padding: 26px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-card p {
  color: var(--gray-700);
  margin: 0 0 16px;
}

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

.info-box {
  background: var(--gray-100);
  border-radius: 16px;
  padding: 12px;
}

.info-box b {
  display: block;
  color: var(--gray-500);
  font-size: 12px;
  margin-bottom: 4px;
}

.info-box span {
  font-weight: 800;
}

.detail-tags span {
  color: var(--blue-600);
  background: rgba(37, 99, 235, 0.10);
  padding: 7px 11px;
}

.side-card {
  padding: 18px;
  position: sticky;
  top: 92px;
}

.side-card .compact-card {
  box-shadow: none;
  border: 1px solid #e2e8f0;
}

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

.site-footer {
  margin-top: 0;
  color: #cbd5e1;
  background: var(--slate-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  max-width: 420px;
  margin: 0;
  color: #94a3b8;
}

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

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #fff;
}

.empty-state {
  display: none;
  background: #fff;
  border-radius: 22px;
  padding: 28px;
  color: var(--gray-500);
  box-shadow: var(--shadow-card);
}

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 840px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header-inner {
    gap: 12px;
  }

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

  .hero,
  .hero-slide,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 46px 0 76px;
  }

  .hero-poster {
    max-width: 260px;
    justify-self: center;
    transform: none;
  }

  .section-head {
    display: block;
  }

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

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .info-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

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

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

  .movie-grid,
  .feature-grid,
  .related-grid,
  .category-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-item img {
    display: none;
  }

  .detail-card,
  .side-card {
    padding: 18px;
  }
}
