:root {
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --cyan-500: #06b6d4;
  --orange-500: #f97316;
  --red-500: #ef4444;
  --green-500: #22c55e;
  --teal-600: #0d9488;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 22px 45px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.22);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
}

.main-nav a {
  opacity: 0.95;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.search-form {
  position: relative;
  width: min(260px, 28vw);
}

.search-form input,
.page-tools input,
.page-tools select {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 10px 42px 10px 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.search-form button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
}

.mobile-panel {
  display: none;
  padding: 0 0 16px;
}

.mobile-panel a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
}

.mobile-panel a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--gray-900), var(--gray-800));
}

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

.hero-slide.is-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(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.05));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(32px, calc((100vw - 1180px) / 2));
  right: 32px;
  bottom: 70px;
  max-width: 760px;
  color: #fff;
}

.hero-badge,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--red-500);
}

.badge.soft {
  color: var(--blue-600);
  background: #eff6ff;
}

.badge.gray {
  color: var(--gray-600);
  background: var(--gray-100);
}

.hero h1,
.hero h2 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 26px;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  color: #fff;
  background: var(--blue-600);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--blue-700);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.3);
}

.btn.light {
  color: var(--blue-600);
  background: #fff;
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 46px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 32px;
  background: #fff;
}

.section {
  padding: 58px 0;
}

.section.white {
  background: #fff;
}

.section.orange {
  background: linear-gradient(90deg, var(--orange-500), var(--red-500));
}

.section.green {
  background: linear-gradient(135deg, var(--green-500), var(--teal-600));
}

.section.blue {
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
}

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

.section-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
}

.section.white .section-title,
.section .section-title {
  color: var(--gray-900);
}

.section.orange .section-title,
.section.green .section-title,
.section.blue .section-title,
.section.orange .section-subtitle,
.section.green .section-subtitle,
.section.blue .section-subtitle {
  color: #fff;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--gray-600);
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

.scroll-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.scroll-button:hover {
  background: rgba(255, 255, 255, 0.32);
}

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

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

.movie-card.compact {
  width: 280px;
  flex: 0 0 280px;
}

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--gray-200);
}

.poster.tall {
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover .poster img,
.related-item:hover img {
  transform: scale(1.08);
}

.poster-tag {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(37, 99, 235, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

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

.card-body p {
  margin: 0;
  color: var(--gray-600);
  font-size: 14px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

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

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

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

.category-card {
  display: block;
  min-height: 160px;
  padding: 24px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, var(--green-500), var(--teal-600));
}

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

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

.category-card p {
  margin: 0;
  opacity: 0.9;
}

.list-card {
  display: flex;
  gap: 18px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.list-thumb {
  flex: 0 0 220px;
  height: 130px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--gray-200);
}

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

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

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

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

.rank-thumb {
  width: 96px;
  height: 64px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--gray-200);
}

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

.page-hero {
  padding: 54px 0;
  color: #fff;
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  font-weight: 900;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.page-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 20px;
  margin: 0 0 26px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.page-tools input,
.page-tools select {
  width: auto;
  min-width: 220px;
  color: var(--gray-900);
  background: var(--gray-100);
  box-shadow: inset 0 0 0 1px var(--gray-200);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 30px;
}

.panel {
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow: var(--shadow-strong);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.38), transparent);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-box.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-large {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--blue-600);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.35);
  cursor: pointer;
}

.detail-card {
  padding: 28px;
  margin-top: 24px;
}

.detail-card h1 {
  margin: 14px 0 8px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  font-weight: 900;
}

.detail-card h2 {
  margin: 28px 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.detail-card p {
  color: var(--gray-700);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud span {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 14px;
}

.sidebar {
  position: sticky;
  top: 86px;
  padding: 22px;
}

.sidebar h2 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 900;
}

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

.related-item {
  display: flex;
  gap: 12px;
}

.related-thumb {
  width: 126px;
  height: 78px;
  overflow: hidden;
  flex: 0 0 126px;
  border-radius: 12px;
  background: var(--gray-200);
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-title {
  margin: 0 0 4px;
  font-weight: 800;
  line-height: 1.35;
}

.related-meta {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
}

.footer {
  color: #d1d5db;
  background: var(--gray-900);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0;
}

.footer h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer p,
.footer a {
  color: #9ca3af;
  font-size: 14px;
}

.footer a:hover {
  color: #60a5fa;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #6b7280;
  text-align: center;
  font-size: 13px;
}

.empty-state {
  padding: 60px 20px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

@media (max-width: 1024px) {
  .grid,
  .grid.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .main-nav,
  .header-inner > .search-form {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .mobile-panel.is-open {
    display: block;
  }

  .mobile-panel .search-form {
    width: 100%;
    margin: 8px 0 14px;
  }

  .hero {
    height: 520px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 78px;
  }

  .hero-dots {
    left: 20px;
    right: auto;
    bottom: 36px;
  }

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

  .section {
    padding: 42px 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .list-card,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .list-card {
    flex-direction: column;
  }

  .list-thumb {
    width: 100%;
    flex-basis: auto;
  }

  .rank-item {
    display: flex;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .grid,
  .grid.three,
  .grid.five {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    width: 240px;
    flex-basis: 240px;
  }

  .page-tools input,
  .page-tools select {
    width: 100%;
  }

  .related-thumb {
    width: 110px;
    flex-basis: 110px;
  }
}
