:root {
  --ocean-50: #f0f9ff;
  --ocean-100: #e0f2fe;
  --ocean-500: #0ea5e9;
  --ocean-600: #0284c7;
  --ocean-700: #0369a1;
  --island-50: #f0fdf4;
  --island-100: #dcfce7;
  --island-500: #22c55e;
  --island-600: #16a34a;
  --sand-50: #fefce8;
  --sand-100: #fef9c3;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 24px 60px rgba(2, 132, 199, 0.28);
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: var(--gray-50);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}

.nav-wrap {
  max-width: var(--container);
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.24);
}

.brand-name {
  font-size: 1.55rem;
  color: transparent;
  background: linear-gradient(90deg, var(--ocean-600), var(--island-600));
  -webkit-background-clip: text;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--gray-500);
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--gray-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 99px;
}

.hero-section {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(34, 197, 94, 0.34), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 52%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.68), transparent 48%);
}

.hero-inner {
  position: absolute;
  inset: 0;
  max-width: var(--container);
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: #bae6fd;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.35rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 18px 0 10px;
  font-size: clamp(1.6rem, 2.6vw, 3rem);
  line-height: 1.12;
}

.hero-summary {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tag-row span {
  color: var(--ocean-700);
  background: var(--ocean-50);
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  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: var(--white);
  background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
  box-shadow: var(--shadow-glow);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn.subtle {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(1deg);
  transition: transform 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-6px);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
  box-shadow: var(--shadow-glow);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  font-size: 2rem;
  cursor: pointer;
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

.hero-dot {
  width: 28px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.search-strip,
.content-section,
.page-main,
.footer-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.search-strip {
  margin-top: -42px;
  position: relative;
  z-index: 8;
}

.search-card,
.filter-panel,
.text-panel,
.category-overview-card,
.player-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.search-card {
  padding: 28px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: center;
}

.search-card h2,
.section-heading h2,
.text-panel h2,
.category-overview-card h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: -0.04em;
}

.search-card p,
.section-heading p,
.category-overview-card p {
  margin: 6px 0 0;
  color: var(--gray-500);
}

.content-section {
  padding-top: 56px;
  padding-bottom: 8px;
}

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

.section-more,
.text-link {
  color: var(--ocean-600);
  font-weight: 800;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 260px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x proximity;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ocean-50), var(--island-50));
}

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

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

.play-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.26);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(3px);
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 0.82rem;
}

.tag-row {
  margin-top: 10px;
}

.movie-info p {
  margin: 10px 0 0;
  color: var(--gray-500);
  font-size: 0.9rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact .movie-info p {
  -webkit-line-clamp: 1;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

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

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

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.18));
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 1;
}

.category-card strong {
  font-size: 1.25rem;
}

.category-card em {
  margin-top: 8px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 10px;
  color: var(--gray-700);
  font-weight: 800;
}

.filter-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--gray-50);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-input:focus {
  border-color: var(--ocean-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--gray-500);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.page-main {
  padding-top: 34px;
  padding-bottom: 60px;
}

.page-hero {
  border-radius: 32px;
  padding: 56px;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 16%, rgba(34, 197, 94, 0.45), transparent 32%),
    linear-gradient(135deg, #0f172a, #075985 52%, #166534);
  box-shadow: var(--shadow-card);
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
}

.compact-actions {
  margin-top: 22px;
}

.category-overview-list {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  padding: 18px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.overview-image {
  display: block;
  overflow: hidden;
  border-radius: 18px;
}

.overview-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.overview-links {
  margin: 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ocean-700);
  background: var(--ocean-50);
  font-size: 0.86rem;
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--gray-500);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--ocean-600);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 28px;
  border-radius: 32px;
  color: var(--white);
  background:
    radial-gradient(circle at 88% 8%, rgba(34, 197, 94, 0.35), transparent 32%),
    linear-gradient(135deg, #111827, #075985 58%, #166534);
  box-shadow: var(--shadow-card);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

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

.detail-copy h1 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.detail-one-line {
  max-width: 860px;
  margin: 18px 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
}

.detail-meta-list {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  color: rgba(255, 255, 255, 0.84);
}

.player-section {
  margin-top: 34px;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.28));
  cursor: pointer;
}

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

.player-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
  box-shadow: var(--shadow-glow);
  font-size: 2rem;
}

.detail-content {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.text-panel {
  padding: 28px;
}

.text-panel p {
  margin: 14px 0 0;
  color: var(--gray-700);
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.detail-switch {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.detail-switch a {
  padding: 18px;
  border-radius: 18px;
  color: var(--ocean-700);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  font-weight: 800;
}

.site-footer {
  margin-top: 64px;
  color: rgba(255, 255, 255, 0.74);
  background: var(--gray-900);
}

.footer-wrap {
  padding-top: 46px;
  padding-bottom: 30px;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 30px;
}

.footer-logo .brand-name {
  color: var(--white);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-content: flex-end;
  align-content: start;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 24px;
  text-align: center;
  font-size: 0.9rem;
}

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

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

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

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

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    padding: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-card);
  }

  .site-header.nav-open .nav-links {
    display: flex;
  }

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

  .nav-link:hover,
  .nav-link.active {
    background: var(--ocean-50);
  }

  .hero-section {
    min-height: 680px;
    height: auto;
  }

  .hero-inner {
    position: relative;
    min-height: 680px;
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 44px;
    padding-bottom: 72px;
  }

  .hero-poster {
    max-width: 260px;
    justify-self: start;
  }

  .hero-arrow {
    display: none;
  }

  .search-card,
  .detail-hero,
  .detail-content,
  .category-overview-card,
  .footer-wrap,
  .detail-switch {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 34px 24px;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .nav-wrap,
  .search-strip,
  .content-section,
  .page-main,
  .footer-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-name {
    font-size: 1.35rem;
  }

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

  .horizontal-row {
    grid-auto-columns: 78vw;
  }

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

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

  .player-icon {
    width: 62px;
    height: 62px;
  }
}
