* {
  box-sizing: border-box;
}

:root {
  --blue-950: #172554;
  --blue-900: #1e3a8a;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --yellow-400: #facc15;
  --red-500: #ef4444;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-800);
  background: var(--gray-50);
  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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.98), rgba(37, 99, 235, 0.96), rgba(8, 145, 178, 0.96));
  color: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo {
  font-size: 22px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--blue-900);
  background: linear-gradient(135deg, var(--yellow-400), #ffffff);
  box-shadow: 0 10px 25px rgba(250, 204, 21, 0.28);
  font-size: 15px;
}

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

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  font-weight: 650;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  width: min(280px, 26vw);
}

.site-search-input,
.local-filter-input,
.filter-controls select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  outline: none;
  padding: 11px 16px;
  color: var(--gray-900);
  background: rgba(255, 255, 255, 0.94);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.site-search-input:focus,
.local-filter-input:focus,
.filter-controls select:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 520px;
  overflow: auto;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  color: var(--gray-900);
  box-shadow: var(--shadow);
}

.search-result-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: var(--gray-100);
}

.search-result-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--gray-200);
}

.search-result-item strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.search-result-item span {
  color: var(--gray-500);
  font-size: 13px;
}

.mobile-nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 11px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
}

.mobile-nav-panel {
  display: none;
  padding: 0 24px 18px;
}

.mobile-nav-panel.is-open {
  display: grid;
  gap: 8px;
}

.container,
.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(90deg, var(--blue-950), var(--blue-700), var(--cyan-600));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.78), rgba(8, 145, 178, 0.62)),
    radial-gradient(circle at 72% 22%, rgba(34, 211, 238, 0.3), transparent 36%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  height: 540px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.62fr);
  align-items: center;
  gap: 44px;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #eff6ff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  font-weight: 750;
}

.hero h1,
.hero h2 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.hero h2 {
  font-size: clamp(30px, 4.5vw, 58px);
}

.hero-title-extra {
  display: block;
  color: var(--cyan-400);
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  font-size: clamp(16px, 2.2vw, 22px);
  color: rgba(239, 246, 255, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0;
}

.btn,
.btn-secondary {
  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 {
  color: var(--blue-950);
  background: linear-gradient(135deg, var(--yellow-400), #ffffff);
  box-shadow: 0 14px 30px rgba(250, 204, 21, 0.28);
}

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

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-search-card {
  margin-top: 28px;
  max-width: 640px;
  position: relative;
}

.hero-search-card .site-search-input {
  min-height: 54px;
  padding-left: 20px;
  font-size: 16px;
}

.hero-side-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-side-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  opacity: 0.94;
}

.hero-side-content {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 24px;
  background: linear-gradient(180deg, transparent, rgba(3, 7, 18, 0.92));
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hero-tags span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--blue-900);
  background: #dffafe;
  font-size: 12px;
  font-weight: 750;
}

.hero-dots,
.hero-arrows {
  position: absolute;
  z-index: 2;
}

.hero-dots {
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.active {
  background: var(--white);
}

.hero-arrows {
  right: 26px;
  bottom: 22px;
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
}

.section {
  padding: 64px 0;
}

.section.alt {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.section-title h2,
.page-title h1,
.detail-title h1 {
  margin: 8px 0 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-title p,
.page-title p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--gray-600);
  font-size: 17px;
}

.section-more {
  color: var(--blue-600);
  font-weight: 850;
}

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

.movie-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

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

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: var(--gray-200);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-year,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(3, 7, 18, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.poster-year {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--red-500), #fb923c);
}

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

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

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

.movie-card-body h3 {
  margin: 8px 0;
  color: var(--gray-900);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card-body p {
  margin: 0;
  min-height: 48px;
  color: var(--gray-600);
  font-size: 14px;
}

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

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

.category-card {
  display: block;
  min-height: 170px;
  padding: 24px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-900), var(--cyan-600));
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 950;
}

.category-card span {
  color: rgba(255, 255, 255, 0.86);
}

.page-hero {
  padding: 72px 0 46px;
  color: var(--white);
  background:
    radial-gradient(circle at 12% 15%, rgba(34, 211, 238, 0.32), transparent 28%),
    linear-gradient(120deg, var(--blue-950), var(--blue-700), var(--cyan-600));
}

.page-title h1,
.page-title p {
  color: var(--white);
}

.page-title p {
  color: rgba(239, 246, 255, 0.9);
  max-width: 760px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.filter-bar strong {
  display: block;
  font-size: 18px;
  color: var(--gray-900);
}

.filter-bar span {
  color: var(--gray-500);
  font-size: 14px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px 130px;
  gap: 12px;
  min-width: min(100%, 540px);
}

.filter-controls .local-filter-input,
.filter-controls select {
  border-color: var(--gray-200);
  border-radius: 14px;
  background: var(--gray-50);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--blue-600);
  font-weight: 750;
}

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

.detail-card,
.sidebar-card,
.text-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.detail-title {
  padding: 28px 28px 0;
}

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

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--blue-900);
  background: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

.player-shell {
  position: relative;
  margin-top: 28px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.watch-video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0;
  color: var(--white);
  background: #000000;
  cursor: pointer;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.18), rgba(3, 7, 18, 0.72));
}

.player-cover.is-hidden {
  display: none;
}

.play-circle {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--blue-950);
  background: linear-gradient(135deg, var(--yellow-400), var(--white));
  box-shadow: 0 24px 45px rgba(0, 0, 0, 0.3);
  font-size: 30px;
  padding-left: 5px;
}

.detail-body {
  padding: 28px;
}

.detail-body h2,
.text-card h2,
.sidebar-card h2 {
  margin: 0 0 14px;
  color: var(--gray-900);
  font-size: 24px;
  font-weight: 950;
}

.detail-body p,
.text-card p {
  color: var(--gray-700);
  font-size: 16px;
  margin: 0 0 18px;
}

.sidebar-card {
  padding: 20px;
  position: sticky;
  top: 96px;
}

.small-movie-link {
  display: grid;
  grid-template-columns: 26px 58px 1fr;
  gap: 11px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}

.small-movie-link:last-child {
  border-bottom: 0;
}

.small-movie-link img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--gray-200);
}

.small-movie-link strong {
  display: block;
  color: var(--gray-900);
  font-size: 14px;
  line-height: 1.35;
}

.small-movie-link em {
  display: block;
  margin-top: 4px;
  color: var(--gray-500);
  font-style: normal;
  font-size: 12px;
}

.small-rank {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
  font-size: 12px;
  font-weight: 900;
}

.pagination-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.pagination-links a {
  flex: 1;
  padding: 14px 16px;
  border-radius: 16px;
  background: #eff6ff;
  color: var(--blue-700);
  font-weight: 850;
  text-align: center;
}

.no-results {
  padding: 26px;
  border-radius: var(--radius-lg);
  color: var(--gray-600);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.site-footer {
  margin-top: 70px;
  color: var(--gray-300);
  background: var(--gray-900);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: var(--white);
  font-size: 19px;
}

.footer-brand p {
  max-width: 420px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 16px;
}

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

.site-footer li + li {
  margin-top: 9px;
}

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

.footer-bottom {
  padding: 18px 24px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-300);
}

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

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

  .header-search {
    margin-left: auto;
    width: min(340px, 42vw);
  }

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

  .hero-side-card {
    display: none;
  }

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

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

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

  .sidebar-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    padding: 0 16px;
    gap: 12px;
  }

  .logo {
    font-size: 18px;
  }

  .header-search {
    display: none;
  }

  .hero,
  .hero-inner {
    min-height: 620px;
  }

  .hero-inner {
    height: 620px;
    padding: 0 18px;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

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

  .hero-arrows {
    display: none;
  }

  .section {
    padding: 44px 0;
  }

  .container,
  .section-inner {
    padding: 0 16px;
  }

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

  .filter-controls {
    width: 100%;
    grid-template-columns: 1fr;
  }

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

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

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

  .movie-card-body p {
    min-height: auto;
    font-size: 13px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.compact,
  .movie-grid.wide-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .hero h2 {
    font-size: 32px;
  }

  .play-circle {
    width: 68px;
    height: 68px;
  }
}
