:root {
  color-scheme: light;
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-300: #7dd3fc;
  --sky-500: #0ea5e9;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --blue-600: #2563eb;
  --violet-600: #7c3aed;
  --yellow-300: #fde047;
  --orange-500: #f97316;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.75rem;
  --shadow-soft: 0 18px 48px rgba(14, 165, 233, 0.16);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
  --shadow-hover: 0 20px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 32rem),
    linear-gradient(180deg, #f0f9ff 0%, #ffffff 36%, #f9fafb 100%);
}

body.no-scroll {
  overflow: hidden;
}

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(--cyan-500), var(--sky-500), var(--blue-600));
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.22);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-600);
  font-weight: 900;
  border-radius: 999px;
  background: var(--white);
  box-shadow: inset 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.brand-text {
  font-size: 1.24rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

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

.nav-link,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(255, 255, 255, 0.92);
  border: 0;
  background: transparent;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-toggle:hover {
  color: var(--yellow-300);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 180px;
  padding: 8px;
  display: grid;
  gap: 4px;
  color: var(--gray-800);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-hover);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.dropdown-panel a:hover {
  color: var(--blue-600);
  background: var(--sky-100);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 278px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.filter-input,
.filter-select,
.search-main input {
  width: 100%;
  border: 1px solid rgba(14, 165, 233, 0.24);
  outline: 0;
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.94);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input {
  height: 40px;
  padding: 0 76px 0 18px;
  border-radius: 999px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-main button {
  border: 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--yellow-300), var(--orange-500));
  box-shadow: 0 10px 18px rgba(249, 115, 22, 0.22);
}

.header-search button {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 0.84rem;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  padding: 8px 10px;
  color: var(--white);
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

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

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
}

.mobile-search button {
  padding: 0 14px;
  border-radius: 12px;
}

main {
  overflow: hidden;
}

.page-shell,
.section-wrap,
.hero-inner,
.footer-grid,
.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 560px;
  color: var(--white);
  overflow: hidden;
  background: linear-gradient(120deg, var(--cyan-500), var(--blue-600));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 22%, rgba(253, 224, 71, 0.28), transparent 16rem),
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, 0.24), transparent 20rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.38));
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(180deg, transparent, var(--sky-50));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 48px;
  padding: 68px 0 98px;
}

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

.eyebrow,
.meta-line,
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.eyebrow span,
.hero-tags span,
.tag-row span,
.detail-tags span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.eyebrow span {
  padding: 6px 12px;
  color: #075985;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.86);
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-lead {
  max-width: 610px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

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

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

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

.btn-primary:hover,
.btn-ghost:hover,
.btn-soft:hover {
  transform: translateY(-2px) scale(1.02);
}

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

.btn-soft {
  color: var(--blue-600);
  background: var(--sky-100);
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 520px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
}

.hero-search input {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
}

.hero-search button {
  min-width: 104px;
  border-radius: 999px;
  font-weight: 800;
}

.hero-stage {
  position: relative;
  min-height: 450px;
}

.hero-slider {
  position: relative;
  height: 450px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: scale(0.96) translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 270px;
  object-fit: cover;
}

.hero-slide-content {
  position: relative;
  margin-top: -150px;
  padding: 140px 24px 24px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.88) 45%, rgba(15, 23, 42, 0.96));
}

.hero-slide h2 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  line-height: 1.15;
}

.hero-slide p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.76);
}

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

.hero-tags span {
  padding: 5px 10px;
  color: var(--white);
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.18);
}

.slider-controls {
  position: absolute;
  right: 20px;
  bottom: -24px;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.slider-controls button {
  width: 46px;
  height: 46px;
  color: var(--blue-600);
  border: 0;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.section-wrap {
  padding: 56px 0;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 10px;
  color: var(--blue-600);
  font-weight: 800;
  border-radius: 999px;
  background: var(--sky-100);
}

.section-head h2,
.page-hero h1,
.detail-title h1,
.search-hero h1 {
  margin: 0;
  color: var(--gray-900);
  line-height: 1.12;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.section-head p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--gray-500);
}

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

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

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

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

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.55));
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--yellow-300), var(--orange-500));
  box-shadow: 0 10px 26px rgba(249, 115, 22, 0.28);
}

.card-body {
  padding: 16px;
}

.meta-line {
  color: var(--gray-500);
  font-size: 0.78rem;
}

.meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: var(--sky-300);
}

.movie-card h2 {
  min-height: 3.1rem;
  margin: 8px 0 8px;
  color: var(--gray-900);
  font-size: 1.05rem;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 3.2rem;
  margin: 0 0 12px;
  color: var(--gray-500);
  font-size: 0.92rem;
}

.tag-row span,
.detail-tags span,
.filter-chip {
  padding: 4px 9px;
  color: #0369a1;
  font-size: 0.75rem;
  background: var(--sky-100);
}

.category-strip {
  position: relative;
  margin-top: -46px;
  z-index: 2;
}

.category-strip .section-wrap {
  padding-top: 0;
}

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card a {
  display: grid;
  min-height: 100%;
}

.category-cover-stack {
  position: relative;
  height: 128px;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  background: linear-gradient(135deg, var(--sky-100), #ede9fe);
}

.category-cover-stack img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
}

.category-content {
  padding: 18px;
}

.category-index {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--blue-600);
  font-weight: 900;
}

.category-content h2 {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 1.25rem;
}

.category-content p {
  margin: 0 0 14px;
  color: var(--gray-500);
}

.category-more {
  color: var(--blue-600);
  font-weight: 800;
}

.page-hero,
.search-hero {
  padding: 70px 0 52px;
  background:
    radial-gradient(circle at 70% 25%, rgba(34, 211, 238, 0.22), transparent 18rem),
    linear-gradient(180deg, #ffffff 0%, var(--sky-50) 100%);
}

.page-hero .page-shell,
.search-hero .page-shell {
  display: grid;
  gap: 18px;
}

.page-hero h1,
.search-hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
}

.page-hero p,
.search-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--gray-500);
  font-size: 1.06rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.14);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.filter-input,
.filter-select {
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
}

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

.ranking-list .movie-card h2 {
  min-height: 2.8rem;
}

.detail-hero {
  padding: 44px 0 34px;
  background:
    radial-gradient(circle at 20% 10%, rgba(253, 224, 71, 0.18), transparent 16rem),
    linear-gradient(135deg, var(--sky-50), #ffffff 56%, #eff6ff);
}

.breadcrumb {
  margin-bottom: 24px;
  color: var(--gray-500);
  font-size: 0.94rem;
}

.breadcrumb a {
  color: var(--blue-600);
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: var(--sky-100);
  box-shadow: var(--shadow-hover);
}

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

.detail-title h1 {
  font-size: clamp(2rem, 5vw, 4.4rem);
}

.detail-title p {
  max-width: 760px;
  margin: 18px 0 20px;
  color: var(--gray-700);
  font-size: 1.12rem;
}

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

.detail-meta span {
  padding: 7px 12px;
  color: #075985;
  border-radius: 999px;
  background: var(--sky-100);
  font-weight: 700;
}

.player-section {
  padding: 40px 0 20px;
  background: var(--gray-900);
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.46);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.58));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay span {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 7px;
  border-radius: 999px;
  color: var(--blue-600);
  font-size: 2.6rem;
  background: var(--white);
  box-shadow: 0 20px 52px rgba(255, 255, 255, 0.24);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  padding: 44px 0;
}

.content-card,
.side-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: var(--gray-900);
  font-size: 1.5rem;
}

.content-card p {
  margin: 0 0 18px;
  color: var(--gray-700);
  font-size: 1.02rem;
}

.side-related {
  display: grid;
  gap: 14px;
}

.related-mini {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
}

.related-mini img {
  width: 76px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.related-mini strong {
  display: block;
  color: var(--gray-900);
  line-height: 1.35;
}

.related-mini span {
  color: var(--gray-500);
  font-size: 0.86rem;
}

.search-main {
  display: flex;
  gap: 10px;
  max-width: 760px;
}

.search-main input {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 18px;
}

.search-main button {
  min-width: 126px;
  border-radius: 18px;
  font-weight: 800;
}

.search-empty {
  display: none;
  padding: 26px;
  color: var(--gray-500);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.search-empty.show {
  display: block;
}

.site-footer {
  color: rgba(255, 255, 255, 0.82);
  background: var(--gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0 32px;
}

.footer-brand {
  color: var(--white);
  font-size: 1.2rem;
}

.footer-grid p {
  max-width: 430px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.62);
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 1.08rem;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  color: rgba(255, 255, 255, 0.48);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.92rem;
}

.hidden-card {
  display: none !important;
}

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

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

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

  .hero-stage {
    max-width: 520px;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-wrap {
    min-height: 64px;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 48px 0 82px;
  }

  .hero-search,
  .search-main {
    flex-direction: column;
    border-radius: 22px;
  }

  .hero-search button,
  .search-main button {
    min-height: 46px;
  }

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

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

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

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

@media (max-width: 560px) {
  .brand-text {
    font-size: 1.05rem;
  }

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

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

  .hero-slide,
  .player-box,
  .detail-poster {
    border-radius: 20px;
  }

  .play-overlay span {
    width: 72px;
    height: 72px;
    font-size: 2rem;
  }
}
