:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --amber-500: #f59e0b;
  --rose-500: #f43f5e;
  --white: #ffffff;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 15px 35px rgba(15, 23, 42, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--slate-50) 0%, #ffffff 52%, #eef8fb 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  box-shadow: 0 15px 30px rgba(2, 6, 23, 0.24);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-name {
  font-size: 21px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan-500));
  box-shadow: 0 12px 24px rgba(6, 182, 212, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  position: relative;
  padding: 24px 0 22px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 16px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan-500);
  transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 22%, rgba(6, 182, 212, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 42%, rgba(15, 23, 42, 0.32) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 68px 0;
  color: var(--white);
}

.kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #a5f3fc;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.14);
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content h2 {
  max-width: 780px;
  margin: 22px 0 10px;
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.08;
}

.hero-content p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
}

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

.btn-ghost {
  color: var(--cyan-600);
  background: #ecfeff;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.page-chip,
.tag,
.tag-line {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.90);
  background: rgba(255, 255, 255, 0.14);
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-control.prev {
  left: max(18px, calc((100% - 1180px) / 2));
}

.hero-control.next {
  right: max(18px, calc((100% - 1180px) / 2));
}

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

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

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

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.32), transparent 35%),
    linear-gradient(135deg, var(--cyan-600), var(--blue-600) 52%, var(--slate-900));
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

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

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.page-chip {
  padding: 8px 13px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.14);
}

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

.section {
  padding: 68px 0;
}

.section.compact {
  padding-top: 36px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-subtitle {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--slate-600);
  line-height: 1.8;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--slate-500);
  font-size: 12px;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-line {
  width: fit-content;
  margin-top: auto;
  padding: 6px 10px;
  color: var(--cyan-600);
  background: #ecfeff;
}

.movie-card.compact,
.movie-card.search-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  min-height: 166px;
}

.movie-card.compact .poster-wrap,
.movie-card.search-card .poster-wrap {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card.compact .card-body strong,
.movie-card.search-card .card-body strong {
  min-height: auto;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 228px;
  padding: 28px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.26), transparent 30%),
    linear-gradient(135deg, var(--slate-900), var(--blue-600));
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.18);
}

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

.category-card p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.category-card span {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.14);
}

.feature-panel {
  border-radius: 32px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  padding: clamp(28px, 5vw, 52px);
  box-shadow: inset 0 0 0 1px rgba(8, 145, 178, 0.09);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 26px;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.filter-search {
  display: grid;
  gap: 8px;
  color: var(--slate-600);
  font-size: 14px;
  font-weight: 700;
}

.filter-search input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  color: var(--slate-900);
  background: var(--slate-50);
  outline: none;
}

.filter-search input:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-actions button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--slate-700);
  background: var(--slate-100);
  transition: color 0.2s ease, background 0.2s ease;
}

.filter-actions button:hover,
.filter-actions button.is-active {
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
}

.empty-state {
  display: none;
  margin: 30px 0;
  padding: 34px;
  border-radius: var(--radius-xl);
  text-align: center;
  color: var(--slate-600);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px 88px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(5px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.rank-num {
  display: inline-flex;
  justify-content: center;
  color: var(--cyan-600);
  font-size: 28px;
  font-weight: 900;
}

.rank-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: var(--slate-900);
}

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

.rank-copy {
  display: grid;
  gap: 6px;
}

.rank-copy strong {
  color: var(--slate-900);
  font-size: 18px;
}

.rank-copy em {
  color: var(--slate-500);
  font-style: normal;
  font-size: 13px;
}

.rank-copy span {
  color: var(--slate-600);
  line-height: 1.6;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 28px auto 20px;
  color: var(--slate-500);
  font-size: 14px;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.26);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 30px;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.28);
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--white);
  background: rgba(244, 63, 94, 0.86);
}

.detail-card,
.copy-card {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.detail-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-lead {
  color: var(--slate-600);
  font-size: 17px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.detail-meta span,
.tag {
  padding: 8px 12px;
  color: var(--cyan-600);
  background: #ecfeff;
}

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

.copy-card {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 34px);
}

.copy-card h2 {
  margin: 0 0 14px;
  color: var(--slate-900);
  font-size: 26px;
}

.copy-card p {
  margin: 0 0 20px;
  color: var(--slate-700);
  line-height: 1.9;
}

.info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-list div {
  display: grid;
  gap: 5px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--slate-100);
}

.info-list dt {
  color: var(--slate-500);
  font-size: 13px;
}

.info-list dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 800;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

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

.site-footer p {
  margin: 14px 0 0;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 12px;
}

.footer-links a:hover {
  color: var(--cyan-500);
}

.footer-title {
  margin-top: 0 !important;
  color: var(--white);
  font-weight: 800;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
  border-top: 1px solid rgba(226, 232, 240, 0.12);
  text-align: center;
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  box-shadow: var(--shadow-card);
}

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

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

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

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border-radius: 18px;
    background: var(--slate-900);
    box-shadow: var(--shadow-soft);
  }

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

  .nav-link {
    padding: 16px 18px;
  }

  .nav-link::after {
    display: none;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-control {
    display: none;
  }

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

  .movie-card.compact,
  .movie-card.search-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .section-head {
    display: block;
  }

  .rank-item {
    grid-template-columns: 46px 72px minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .brand-name {
    font-size: 18px;
  }

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

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

  .movie-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 174px;
  }

  .movie-card .poster-wrap {
    height: 100%;
    aspect-ratio: auto;
  }

  .card-body {
    padding: 14px;
  }

  .filter-actions button {
    flex: 1 1 auto;
  }
}
