:root {
  color-scheme: light;
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #f3f4f6;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #111827;
  --dark-soft: #1f2937;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #dbeafe;
  --yellow: #facc15;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
  font-size: 14px;
  padding-left: 2px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  color: var(--text);
}

.brand-text em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.brand-dark .brand-text strong {
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  background: var(--dark);
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 6px;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  height: 70vh;
  overflow: hidden;
  background: #0f172a;
}

.hero-slider > h1 {
  position: absolute;
  z-index: 4;
  left: max(24px, calc((100vw - 1280px) / 2 + 16px));
  top: 88px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(24px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 760px;
  text-shadow: 0 20px 40px rgba(0, 0, 0, 0.36);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 1.4s ease;
  pointer-events: none;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.86) 0%, rgba(17, 24, 39, 0.12) 38%, rgba(17, 24, 39, 0.22) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 128px;
  max-width: 1280px;
}

.hero-content > * {
  max-width: 680px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-kicker span {
  color: var(--yellow);
}

.hero-kicker em {
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
  font-weight: 600;
}

.hero-content h2 {
  margin: 22px 0 18px;
  color: #ffffff;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-shadow: 0 22px 42px rgba(0, 0, 0, 0.42);
}

.hero-content p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

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

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

.primary-btn {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.30);
}

.primary-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  z-index: 6;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.50);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease;
  backdrop-filter: blur(8px);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.section-main,
.section-muted,
.home-search {
  padding: 56px 0;
}

.section-muted {
  background: var(--surface-soft);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  color: var(--text);
}

.section-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-box {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  min-height: 46px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.filter-select,
.filter-reset {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: #374151;
  padding: 0 14px;
  font-weight: 650;
}

.filter-reset {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 45%);
  opacity: 0.9;
}

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

.poster-year {
  left: 10px;
  bottom: 10px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: #ffffff;
  font-size: 12px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--yellow);
  color: #111827;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
}

.poster-play {
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  padding-left: 2px;
  backdrop-filter: blur(6px);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

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

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card .tag-row span,
.detail-tags span {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 40%),
    #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.35);
}

.category-card span {
  display: block;
  color: var(--text);
  font-size: 22px;
  font-weight: 850;
}

.category-card strong {
  display: inline-flex;
  margin: 10px 0;
  color: var(--blue);
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.page-hero,
.detail-hero {
  background:
    linear-gradient(120deg, rgba(17, 24, 39, 0.96), rgba(30, 64, 175, 0.90)),
    #111827;
  color: #ffffff;
}

.page-hero {
  padding: 82px 0;
}

.small-hero,
.category-hero,
.ranking-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
}

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

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

.detail-hero {
  padding: 42px 0 54px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: #d1d5db;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  align-items: center;
  gap: 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
}

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

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.detail-meta em {
  color: #bfdbfe;
  font-style: normal;
  font-weight: 800;
}

.detail-info .primary-btn {
  margin-top: 26px;
}

.player-section {
  padding: 44px 0 12px;
  background: #0b1120;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.45));
  color: #ffffff;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34);
  font-size: 32px;
  padding-left: 5px;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.detail-article,
.detail-aside {
  padding: 28px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-article h2,
.detail-aside h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 22px;
  color: #374151;
  font-size: 17px;
  line-height: 1.86;
  white-space: pre-line;
}

.detail-aside {
  height: fit-content;
  display: grid;
  gap: 12px;
}

.detail-aside a {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: #374151;
  font-weight: 750;
}

.detail-aside a:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.site-footer {
  background: #111827;
  color: #d1d5db;
}

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

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  color: #9ca3af;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-col h2 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 17px;
}

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

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

.empty-state {
  padding: 36px;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

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

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

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

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

  .hero-slider {
    min-height: 640px;
    height: 78vh;
  }

  .hero-slider > h1 {
    top: 92px;
    left: 16px;
    right: 16px;
  }

  .hero-content {
    padding-top: 150px;
  }

  .hero-control {
    display: none;
  }

  .filter-bar,
  .section-head,
  .detail-grid,
  .detail-layout,
  .footer-wrap {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar {
    display: grid;
  }

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

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

  .category-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    display: grid;
  }

  .detail-poster {
    max-width: 260px;
  }
}

@media (max-width: 520px) {
  .container,
  .nav-wrap,
  .mobile-menu,
  .footer-wrap {
    width: min(100% - 24px, 1280px);
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 620px;
  }

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

  .hero-actions {
    display: grid;
  }

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

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

  .movie-card p {
    font-size: 13px;
  }

  .section-main,
  .section-muted,
  .home-search {
    padding: 40px 0;
  }
}
