:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --blue-700: #1d4ed8;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.08);
  --shadow-md: 0 12px 30px rgb(15 23 42 / 0.10);
  --shadow-lg: 0 24px 60px rgb(15 23 42 / 0.18);
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-900);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 42%, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.94);
  border-bottom: 1px solid rgb(226 232 240 / 0.72);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(var(--max-width), calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: white;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky-600), var(--blue-700));
  box-shadow: 0 10px 20px rgb(2 132 199 / 0.26);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 15px;
  color: var(--gray-700);
  border-radius: 14px;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--sky-700);
  background: var(--sky-100);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--gray-800);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

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

.hero-carousel {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) blur(2px);
  transform: scale(1.03);
}

.hero-overlay {
  background:
    radial-gradient(circle at 75% 20%, rgb(14 165 233 / 0.45), transparent 34%),
    linear-gradient(90deg, rgb(8 18 33 / 0.94) 0%, rgb(8 18 33 / 0.78) 44%, rgb(8 18 33 / 0.34) 100%),
    linear-gradient(180deg, rgb(2 6 23 / 0.18), rgb(2 6 23 / 0.88));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max-width), calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 56px;
  align-items: center;
  padding: 92px 0 110px;
}

.hero-copy {
  color: white;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sky-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: var(--sky-200);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 16px 0 20px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgb(226 232 240 / 0.92);
  font-size: 18px;
}

.tag-row,
.year-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-row span,
.year-chips span {
  padding: 7px 12px;
  color: var(--sky-700);
  background: var(--sky-100);
  border: 1px solid var(--sky-200);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy .tag-row span {
  color: white;
  background: rgb(255 255 255 / 0.14);
  border-color: rgb(255 255 255 / 0.22);
  backdrop-filter: blur(12px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  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: white;
  background: linear-gradient(135deg, var(--sky-600), var(--blue-700));
  box-shadow: 0 16px 34px rgb(14 165 233 / 0.28);
}

.btn.ghost {
  color: white;
  background: rgb(255 255 255 / 0.14);
  border: 1px solid rgb(255 255 255 / 0.24);
  backdrop-filter: blur(12px);
}

.detail-info .btn.ghost,
.content-section .btn.ghost {
  color: var(--sky-700);
  background: var(--sky-100);
  border-color: var(--sky-200);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  transform: rotate(1deg);
}

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.48);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: white;
}

.home-search-panel,
.content-section,
.category-preview,
.filter-panel,
.breadcrumb,
.detail-hero,
.player-section,
.detail-article {
  width: min(var(--max-width), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.home-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 26px;
  align-items: center;
  margin-top: -48px;
  padding: 28px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 5;
}

.home-search-panel h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-article h2 {
  margin: 8px 0 0;
  color: var(--gray-900);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.home-search-panel h2,
.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.home-search {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--gray-900);
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 14px;
  outline: none;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgb(14 165 233 / 0.12);
}

.home-search button {
  min-width: 92px;
  color: white;
  border: 0;
  border-radius: 14px;
  background: var(--sky-600);
  font-weight: 800;
}

.content-section,
.category-preview {
  padding: 72px 0;
}

.content-section.tinted {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - var(--max-width)) / 2));
  padding-right: max(16px, calc((100vw - var(--max-width)) / 2));
  background: linear-gradient(120deg, var(--sky-100), #eff6ff);
}

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

.section-head a {
  color: var(--sky-700);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--sky-200);
  box-shadow: var(--shadow-md);
}

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky-50), var(--gray-100));
}

.card-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  min-height: 30px;
  padding: 0 12px;
  color: white;
  background: rgb(2 132 199 / 0.92);
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 8px 18px rgb(2 6 23 / 0.24);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  color: white;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 22px rgb(239 68 68 / 0.28);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover {
  color: var(--sky-700);
}

.card-meta {
  margin: 8px 0;
  color: var(--gray-500);
  font-size: 13px;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  color: var(--gray-700);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card.compact .card-body {
  padding: 13px;
}

.movie-card.compact .card-title {
  min-height: 44px;
  font-size: 15px;
}

.movie-card.compact .card-body p {
  display: none;
}

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

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

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

.category-tile {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  min-height: 180px;
  padding: 16px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-image {
  overflow: hidden;
  border-radius: 18px;
  background: var(--gray-100);
}

.category-image img {
  width: 100%;
  height: 100%;
  min-height: 148px;
  object-fit: cover;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.category-tile p {
  margin: 0 0 14px;
  color: var(--gray-700);
  font-size: 14px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-links a {
  padding: 6px 10px;
  color: var(--sky-700);
  background: var(--sky-50);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.page-hero {
  background:
    radial-gradient(circle at 85% 0%, rgb(14 165 233 / 0.32), transparent 32%),
    linear-gradient(135deg, #0f172a 0%, #075985 100%);
  color: white;
  padding: 86px max(16px, calc((100vw - var(--max-width)) / 2));
}

.page-hero.slim {
  padding-top: 76px;
  padding-bottom: 76px;
}

.page-hero h1 {
  color: white;
  font-size: clamp(36px, 5vw, 58px);
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: rgb(224 242 254 / 0.92);
  font-size: 18px;
}

.category-hero {
  display: grid;
  align-items: center;
}

.category-hero .year-chips {
  margin-top: 24px;
}

.filter-panel {
  margin-top: 34px;
  padding: 22px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.filter-row {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 16px;
}

.filter-row label {
  display: grid;
  gap: 7px;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 750;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 28px 0 0;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--sky-700);
  font-weight: 750;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 34px;
  align-items: center;
  padding: 44px 0 38px;
}

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

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.detail-info .lead {
  max-width: 860px;
  margin: 18px 0;
  color: var(--gray-700);
  font-size: 19px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  padding: 8px 12px;
  color: var(--gray-800);
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
}

.detail-info .btn {
  margin-top: 26px;
}

.player-section {
  padding: 12px 0 32px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgb(2 6 23 / 0.24), rgb(2 6 23 / 0.74));
  cursor: pointer;
  z-index: 2;
}

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

.play-button {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.96);
  box-shadow: 0 24px 50px rgb(2 6 23 / 0.42);
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
}

.play-button span {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 26px solid var(--sky-600);
}

.detail-article {
  padding: 18px 0 38px;
}

.detail-article h2 {
  margin-top: 28px;
  font-size: 30px;
}

.detail-article p {
  margin: 14px 0 0;
  color: var(--gray-700);
  font-size: 17px;
}

.related-section {
  padding-top: 28px;
}

.site-footer {
  margin-top: 40px;
  color: rgb(203 213 225);
  background: var(--gray-900);
}

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

.footer-brand {
  color: white;
  font-size: 22px;
}

.site-footer p {
  max-width: 420px;
  margin: 12px 0 0;
  color: rgb(148 163 184);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 16px;
}

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

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

.footer-bottom {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  color: rgb(100 116 139);
  border-top: 1px solid rgb(51 65 85);
}

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

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

  .mobile-toggle {
    display: block;
  }

  .hero-content,
  .home-search-panel,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    gap: 32px;
    padding-top: 64px;
  }

  .hero-poster {
    max-width: 360px;
    margin: 0 auto;
  }

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

@media (max-width: 640px) {
  .hero-carousel {
    min-height: 760px;
  }

  .hero-content {
    padding-bottom: 86px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-info .lead {
    font-size: 16px;
  }

  .home-search,
  .section-head,
  .compact-head {
    align-items: stretch;
    flex-direction: column;
  }

  .home-search {
    display: grid;
  }

  .movie-grid.three,
  .movie-grid.four,
  .ranking-list,
  .category-grid,
  .category-grid.large,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .category-tile {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding-top: 28px;
  }

  .play-button {
    width: 72px;
    height: 72px;
  }
}
