* {
  box-sizing: border-box;
}

:root {
  --blue-950: #0b1228;
  --blue-900: #0f1e46;
  --blue-800: #173b83;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-300: #93c5fd;
  --cyan-500: #06b6d4;
  --cyan-300: #67e8f9;
  --gray-950: #080b14;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-lg: 0 20px 35px rgba(15, 23, 42, 0.16);
  --shadow-xl: 0 25px 50px rgba(15, 23, 42, 0.25);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

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

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

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

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

.navbar {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--blue-600);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.94);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: #dbeafe;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  background: rgba(30, 64, 175, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--white);
}

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

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 85% 18%, rgba(103, 232, 249, 0.48), transparent 32%), linear-gradient(135deg, #0f1e46 0%, #1d4ed8 54%, #06b6d4 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 10, 28, 0.78), rgba(15, 30, 70, 0.38), rgba(6, 182, 212, 0.08));
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 44px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h1 span {
  display: block;
  margin-top: 12px;
  color: #bfdbfe;
  font-size: clamp(26px, 4vw, 42px);
}

.hero p {
  max-width: 680px;
  margin: 22px 0 30px;
  color: #dbeafe;
  font-size: clamp(18px, 2vw, 24px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--blue-600);
  background: var(--white);
  box-shadow: 0 18px 34px rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  background: #eff6ff;
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(12px);
}

.hero-media {
  position: relative;
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.32);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 55%);
}

.hero-card-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 2;
}

.hero-card-caption strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.hero-card-caption span {
  display: block;
  margin-top: 8px;
  color: #dbeafe;
  font-size: 14px;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

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

.hero-dots button.is-active {
  background: var(--white);
}

.section {
  padding: 64px 0;
}

.section.alt {
  background: var(--gray-100);
}

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

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

.section-heading h2,
.page-title h1,
.detail-main h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-title p {
  margin: 10px 0 0;
  color: var(--gray-600);
}

.text-link {
  color: var(--blue-600);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.movie-card.wide .poster-link {
  aspect-ratio: 16 / 10;
}

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

.movie-card:hover .poster-link img,
.compact-card:hover img,
.rank-card:hover img {
  transform: scale(1.07);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 48%);
  opacity: 0.75;
}

.year-badge,
.play-badge,
.rank-number {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.year-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: var(--white);
  background: rgba(37, 99, 235, 0.88);
  font-size: 12px;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  padding: 6px 11px;
  color: var(--blue-700);
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card h3 a:hover {
  color: var(--blue-600);
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 14px;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.detail-tags span,
.filter-chip {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue-700);
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.category-tile h2,
.category-tile h3 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 22px;
}

.category-tile p {
  position: relative;
  z-index: 2;
  margin: 12px 0 0;
  color: #dbeafe;
  font-size: 14px;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -36px;
  bottom: -42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.page-hero {
  padding: 76px 0 48px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-900), var(--blue-600), var(--cyan-500));
}

.page-title h1,
.page-title p {
  color: inherit;
}

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

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

.breadcrumb a:hover {
  color: var(--white);
}

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.rank-card img {
  width: 120px;
  height: 160px;
  border-radius: 14px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.rank-number {
  left: 18px;
  top: 18px;
  width: 34px;
  height: 34px;
  color: var(--white);
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.25);
}

.rank-card h2,
.rank-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

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

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

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

.compact-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.compact-card img {
  width: 78px;
  height: 104px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

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

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

.detail-main,
.detail-side,
.search-panel {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.detail-main {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: #020617;
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #020617;
  z-index: 3;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
}

.play-button {
  position: relative;
  z-index: 4;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: var(--blue-600);
  background: rgba(255, 255, 255, 0.94);
  font-size: 32px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(255, 255, 255, 0.25);
}

.player-cover.is-hidden {
  display: none;
}

.detail-content {
  padding: 28px;
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--gray-600);
  font-weight: 700;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--gray-100);
}

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

.content-block {
  margin-top: 28px;
}

.content-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-block p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
}

.detail-side {
  padding: 18px;
}

.detail-side h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.side-list {
  display: grid;
  gap: 12px;
}

.search-panel {
  padding: 22px;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr 180px 150px;
  gap: 12px;
}

.search-form input,
.search-form select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
  color: var(--gray-900);
  font-size: 15px;
  outline: none;
}

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

.search-form button {
  height: 48px;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
  font-weight: 900;
  cursor: pointer;
}

.search-summary {
  margin-top: 18px;
  color: var(--gray-600);
  font-weight: 700;
}

.site-footer {
  color: var(--gray-300);
  background: var(--gray-900);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  color: var(--white);
}

.footer-brand p {
  max-width: 420px;
  color: #9ca3af;
}

.footer-column h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-column a:hover {
  color: var(--blue-300);
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

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

  .nav-toggle {
    display: block;
  }

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

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

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

@media (max-width: 860px) {
  .hero,
  .hero-inner {
    min-height: 780px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 0 92px;
  }

  .hero-dots {
    bottom: 30px;
  }

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

  .search-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .navbar,
  .container,
  .hero-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero,
  .hero-inner {
    min-height: 720px;
  }

  .hero p {
    font-size: 17px;
  }

  .section {
    padding: 42px 0;
  }

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

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .rank-card {
    grid-template-columns: 92px 1fr;
    gap: 12px;
  }

  .rank-card img {
    width: 92px;
    height: 126px;
  }

  .detail-content {
    padding: 20px;
  }
}
