:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --blue-600: #2563eb;
  --white: #ffffff;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
  --soft-shadow: 0 14px 32px rgba(15, 23, 42, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 36%, #f1f5f9 100%);
  color: var(--slate-900);
  line-height: 1.65;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--slate-950), var(--slate-900) 48%, #082f49);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.30);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-600));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.42);
  font-size: 18px;
}

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

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.02em;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--slate-300);
  font-weight: 650;
  transition: 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
  background: rgba(34, 211, 238, 0.14);
}

.nav-search {
  position: relative;
  width: 260px;
}

.nav-search input,
.local-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.78);
  outline: none;
  transition: 180ms ease;
}

.nav-search input:focus,
.local-search input:focus {
  border-color: rgba(34, 211, 238, 0.76);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 460px;
  overflow: auto;
  display: none;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

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

.search-panel a {
  display: block;
  padding: 11px 12px;
  border-radius: 14px;
  color: var(--slate-200);
}

.search-panel a:hover {
  background: rgba(34, 211, 238, 0.12);
  color: var(--white);
}

.search-panel strong {
  display: block;
}

.search-panel span {
  display: block;
  color: var(--slate-400);
  font-size: 13px;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel a {
  display: block;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--slate-200);
  background: rgba(255, 255, 255, 0.06);
}

.mobile-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 48px;
  align-items: center;
  padding: 76px max(32px, calc((100vw - 1180px) / 2)) 86px;
  background-size: cover;
  background-position: center;
  color: var(--white);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 700ms ease, transform 900ms ease;
}

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

.hero-content {
  max-width: 780px;
}

.eyebrow,
.page-hero span,
.section-heading span,
.ranking-band span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--cyan-400);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0;
  max-width: 720px;
  color: var(--slate-200);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 999px;
  padding: 6px 11px;
  color: #dffbff;
  background: rgba(8, 145, 178, 0.18);
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.ghost-dark-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 800;
  transition: 180ms ease;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-600));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.26);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.34);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(203, 213, 225, 0.36);
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(10px);
}

.ghost-button:hover,
.ghost-dark-button:hover {
  border-color: rgba(34, 211, 238, 0.72);
  transform: translateY(-2px);
}

.ghost-dark-button {
  color: var(--slate-900);
  border: 1px solid var(--slate-200);
  background: var(--white);
}

.hero-poster {
  min-height: 470px;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 32px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  transition: 220ms ease;
}

.hero-poster:hover {
  transform: translateY(-6px) scale(1.01);
}

.hero-poster span,
.detail-poster span,
.poster-play,
.player-cover span {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-600));
  box-shadow: 0 0 38px rgba(34, 211, 238, 0.42);
}

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

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

.hero-dot.is-active {
  background: var(--cyan-400);
}

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

.light-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading h2,
.preview-title h2,
.detail-text h2,
.player-section h2,
.detail-side h2 {
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-heading p,
.preview-title p {
  margin: 0;
  color: var(--slate-600);
  font-size: 17px;
}

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

.category-tile {
  min-height: 190px;
  border-radius: var(--radius-xl);
  padding: 24px;
  color: var(--white);
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: 200ms ease;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.category-tile em {
  display: block;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.84);
  font-style: normal;
}

.tile-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.tile-samples span {
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: 210ms ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background-color: #0f172a;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 22%, rgba(34, 211, 238, 0.25), transparent 36%);
  opacity: 0;
  transition: 200ms ease;
}

.movie-card:hover .poster::after {
  opacity: 1;
}

.poster-region,
.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(8px);
}

.poster-region {
  top: 12px;
  right: 12px;
}

.poster-year {
  left: 12px;
  bottom: 12px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 58px;
  height: 58px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: 200ms ease;
}

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

.movie-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.movie-info strong {
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
}

.movie-info em {
  display: -webkit-box;
  margin-top: 8px;
  min-height: 44px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  margin-top: 12px;
  color: var(--slate-500);
  font-size: 13px;
}

.tag-row span {
  color: var(--slate-700);
  background: #ecfeff;
}

.movie-card-compact .movie-info strong {
  font-size: 16px;
}

.movie-card-compact .movie-info em {
  min-height: 40px;
  font-size: 13px;
}

.ranking-band {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 32px;
  padding: 36px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-950), #0e7490 54%, #2563eb);
  box-shadow: var(--shadow);
}

.ranking-band h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 48px);
}

.ranking-band p {
  max-width: 700px;
  margin: 0;
  color: var(--slate-200);
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  border-radius: 34px;
  padding: 66px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-950), #075985 58%, #0891b2);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 880px;
  margin: 0 0 16px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--slate-200);
  font-size: 18px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.filter-bar button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.filter-bar button.is-active {
  color: var(--slate-900);
  background: var(--white);
}

.stacked-previews {
  display: grid;
  gap: 34px;
}

.category-preview {
  width: min(1180px, 100%);
  margin: 0 auto;
}

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

.preview-title a {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--slate-900);
}

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

.archive-link {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--white);
  transition: 180ms ease;
}

.archive-link:hover {
  border-color: rgba(34, 211, 238, 0.72);
  transform: translateY(-2px);
  box-shadow: var(--soft-shadow);
}

.archive-link span {
  color: var(--slate-500);
  font-size: 13px;
  text-align: right;
}

.local-search {
  max-width: 420px;
  margin-top: 26px;
}

.local-search input {
  color: var(--white);
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--slate-500);
  font-size: 14px;
}

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

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  border-radius: 34px;
  padding: 36px;
  background: linear-gradient(135deg, var(--slate-950), #0f172a 48%, #083344);
  box-shadow: var(--shadow);
}

.detail-poster {
  min-height: 500px;
  border-radius: 28px;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.detail-info {
  color: var(--white);
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.detail-info p {
  max-width: 760px;
  margin: 0;
  color: var(--slate-200);
  font-size: 18px;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--slate-950);
  box-shadow: var(--shadow);
}

.cinema-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
}

.player-cover span,
.player-cover strong {
  position: relative;
  z-index: 2;
}

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

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

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

.detail-text {
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  padding: 28px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.detail-text p {
  margin: 12px 0 0;
  color: var(--slate-700);
  font-size: 16px;
}

.detail-side {
  grid-column: 2;
  grid-row: 1 / span 2;
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  padding: 24px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.detail-side dl {
  margin: 0;
}

.detail-side dt {
  margin-top: 14px;
  color: var(--slate-500);
  font-size: 13px;
}

.detail-side dd {
  margin: 4px 0 0;
  color: var(--slate-900);
  font-weight: 750;
}

.detail-side a {
  color: var(--cyan-500);
}

.site-footer {
  margin-top: 60px;
  color: var(--slate-300);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-900));
}

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

.footer-grid p {
  max-width: 480px;
  color: var(--slate-400);
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 8px;
}

.footer-grid a:hover {
  color: var(--cyan-400);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 0 26px;
  color: var(--slate-500);
  font-size: 14px;
}

[data-movie-card].is-hidden {
  display: none;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .detail-hero,
  .detail-text-section {
    grid-template-columns: 1fr;
  }

  .detail-side {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: 70px;
    gap: 14px;
  }

  .main-nav {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

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

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

  .hero {
    min-height: 610px;
  }

  .hero-slide {
    padding: 62px 20px 82px;
  }

  .hero-actions,
  .detail-actions,
  .ranking-band,
  .preview-title {
    align-items: stretch;
    flex-direction: column;
  }

  .section,
  .light-section {
    padding-top: 52px;
    padding-bottom: 52px;
  }

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

  .movie-info {
    padding: 14px;
  }

  .movie-info strong {
    font-size: 15px;
  }

  .page-hero,
  .detail-hero,
  .ranking-band {
    border-radius: 24px;
    padding: 28px;
  }

  .detail-poster {
    min-height: 420px;
  }

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

@media (max-width: 520px) {
  .category-grid,
  .movie-grid,
  .small-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .archive-link {
    flex-direction: column;
  }

  .archive-link span {
    text-align: left;
  }

  .detail-poster {
    min-height: 360px;
  }
}
