:root {
  --bg: #f6f9fc;
  --panel: #ffffff;
  --panel-soft: #eef8ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --brand-dark: #1e40af;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(37, 99, 235, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 32rem), var(--bg);
  line-height: 1.65;
}

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

img {
  display: block;
  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: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-dark);
  background: #e0f2fe;
  transform: translateY(-1px);
}

.nav-toggle {
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
  cursor: pointer;
}

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

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.hero-track,
.hero-slide,
.hero-bg {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg img {
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: blur(2px) saturate(1.2);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.36) 100%), radial-gradient(circle at 70% 24%, rgba(6, 182, 212, 0.32), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.62fr);
  align-items: center;
  gap: 58px;
  padding: 86px 0 96px;
}

.hero-copy {
  max-width: 720px;
}

.hero-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-tags span,
.card-tags span,
.detail-copy .hero-tags span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 5px 11px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

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

.hero-actions,
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.btn-light {
  color: var(--brand-dark);
  background: #e0f2fe;
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section-block {
  margin-top: 34px;
  margin-bottom: 54px;
}

.intro-panel,
.page-hero,
.detail-hero,
.detail-text,
.watch-section {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.intro-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 34px;
  margin-top: -38px;
  position: relative;
  z-index: 8;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-text h2,
.watch-section h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.intro-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  font-size: clamp(28px, 4vw, 46px);
}

.intro-panel p,
.page-hero p,
.detail-one-line,
.detail-text p {
  margin: 14px 0 0;
  color: var(--muted);
}

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

.section-heading > a {
  color: var(--brand-dark);
  font-weight: 800;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.07);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.86));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: #dbeafe;
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.38);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #dbeafe;
}

.card-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.06);
}

.cover-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.3);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-tags span {
  color: var(--brand-dark);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.card-body h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.card-body h2 a:hover {
  color: var(--brand);
}

.card-body p {
  min-height: 48px;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 4px 9px;
  background: #f1f5f9;
}

.movie-card.is-small {
  display: grid;
  grid-template-columns: 112px 1fr;
}

.movie-card.is-small .card-cover img {
  height: 100%;
  min-height: 160px;
}

.movie-card.is-small .card-body h2 {
  font-size: 18px;
}

.movie-card.is-small .card-body p {
  min-height: 0;
}

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

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 170px;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.rail-card {
  scroll-snap-align: start;
  display: grid;
  gap: 10px;
  border-radius: 18px;
  color: var(--text);
  font-weight: 800;
}

.rail-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.page-main {
  padding-top: 28px;
}

.page-hero {
  padding: clamp(34px, 6vw, 68px);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(236, 254, 255, 0.94));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(140px, 0.5fr));
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.empty-state {
  display: none;
  margin-top: 18px;
  padding: 34px;
  border: 1px dashed #93c5fd;
  border-radius: var(--radius);
  color: var(--brand-dark);
  text-align: center;
  background: #eff6ff;
  font-weight: 800;
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  padding: clamp(24px, 5vw, 54px);
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 60px);
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.detail-copy .hero-tags span {
  color: var(--brand-dark);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.detail-one-line {
  font-size: 18px;
}

.detail-meta {
  margin-top: 18px;
}

.watch-section,
.detail-text {
  padding: clamp(20px, 4vw, 34px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.34), rgba(2, 6, 23, 0.68));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.32);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 20px;
}

.detail-text h2 + p {
  margin-bottom: 26px;
  font-size: 17px;
}

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

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 0.8fr);
  gap: 34px;
  padding: 54px 0;
}

.footer-logo {
  color: #fff;
}

.footer-brand p {
  margin: 16px 0 0;
  color: #94a3b8;
}

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

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 18px 16px;
  color: #94a3b8;
  text-align: center;
}

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero-poster {
    display: none;
  }

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

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

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

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 12px;
  }

  .hero {
    min-height: 620px;
  }

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

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

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

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

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

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

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

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

  .movie-card.is-small {
    grid-template-columns: 96px 1fr;
  }

  .movie-card.is-small .card-cover img {
    min-height: 142px;
  }

  .hero-controls {
    bottom: 18px;
  }
}
