:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --blue-950: #172554;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --orange-50: #fff7ed;
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --orange-500: #f97316;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 22px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-xl: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-800);
  font-family: 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;
}

button {
  border: 0;
  cursor: pointer;
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--gray-900);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: #fff;
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.28);
}

.brand-text {
  white-space: nowrap;
  font-size: 20px;
}

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

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  background: var(--teal-50);
  color: var(--teal-700);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.header-search input,
.mobile-search input,
.quick-filter input,
.quick-filter select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gray-800);
}

.header-search input {
  width: 180px;
  padding: 7px 8px 7px 14px;
}

.header-search button,
.mobile-search button {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--teal-600);
  color: #fff;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--gray-100);
}

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

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--gray-200);
  background: #fff;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  padding: 8px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
}

.mobile-search input {
  flex: 1;
  padding: 10px;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #fff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--teal-500);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-kicker {
  margin-bottom: 16px;
  padding: 8px 16px;
}

.eyebrow {
  margin-bottom: 10px;
  padding: 6px 12px;
  background: var(--teal-50);
  color: var(--teal-700);
}

.hero h1,
.hero h2 {
  margin: 0 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-title-link {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 800;
  color: var(--teal-100);
}

.hero-copy > p:not(.hero-title-link) {
  max-width: 660px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
  color: #f3f4f6;
  font-size: 14px;
}

.hero-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

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

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--teal-500);
  color: #fff;
  box-shadow: 0 14px 30px rgba(20, 184, 166, 0.28);
}

.btn.primary:hover {
  background: var(--teal-600);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.26);
  color: #fff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 12;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.78);
}

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

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

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

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.hero-dot.is-active {
  width: 32px;
  background: #fff;
}

.section {
  padding: 56px 0;
}

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

.section-heading.wide {
  align-items: center;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.story-card h2,
.ranking-section h2,
.overview-card h2 {
  margin: 0;
  color: var(--gray-800);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 38px);
}

.section-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--gray-600);
}

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

.intro-panel {
  padding-bottom: 24px;
}

.quick-filter {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.quick-filter input,
.quick-filter select {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--gray-50);
}

.quick-filter input {
  flex: 1;
}

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

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

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

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: var(--gray-200);
  box-shadow: var(--shadow-md);
}

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

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

.poster-gradient,
.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72));
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal-700);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  top: 10px;
  left: 10px;
  background: var(--teal-500);
}

.rank-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.movie-card-body {
  padding-top: 12px;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--gray-800);
  font-size: 17px;
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card:hover h3 {
  color: var(--teal-700);
}

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

.card-desc {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hot-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--orange-50), var(--red-50));
}

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

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

.ranking-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.ranking-number {
  display: grid;
  flex: 0 0 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red-500), var(--orange-500));
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.ranking-main {
  flex: 1;
  min-width: 0;
}

.ranking-main strong,
.ranking-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-main strong {
  color: var(--gray-800);
}

.ranking-main span {
  color: var(--gray-500);
  font-size: 13px;
}

.ranking-item img {
  width: 86px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.rail {
  display: flex;
  gap: 18px;
  padding-bottom: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.rail .movie-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.category-card strong,
.category-card em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
  color: #fff;
}

.category-card strong {
  bottom: 64px;
  font-size: 24px;
  font-style: normal;
  font-weight: 900;
}

.category-card em {
  bottom: 22px;
  display: -webkit-box;
  overflow: hidden;
  color: #e5e7eb;
  font-size: 14px;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-hero {
  padding: 72px 0;
  background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.22), transparent 30%), linear-gradient(135deg, #0f172a, #0f766e);
  color: #fff;
}

.page-hero.compact-hero,
.page-hero.search-hero {
  padding: 82px 0;
}

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

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #d1fae5;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.overview-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.overview-thumb {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.overview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overview-card > div {
  padding: 22px;
}

.overview-card h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

.overview-card p {
  margin: 0 0 16px;
  color: var(--gray-600);
}

.catalog-filter,
.search-filter {
  margin-bottom: 28px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: #0f172a;
  color: #fff;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(12px);
  transform: scale(1.04);
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
}

.detail-layout {
  position: relative;
  z-index: 2;
  padding: 48px 0 60px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

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

.detail-copy h1 {
  color: #fff;
  font-size: clamp(36px, 5vw, 58px);
}

.detail-one-line {
  max-width: 820px;
  margin: 14px 0 18px;
  color: #e5e7eb;
  font-size: 18px;
}

.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span,
.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
  font-size: 14px;
}

.player-card {
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow-lg);
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-player video,
.player-cover,
.player-cover img,
.player-dark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-player video,
.player-cover img {
  object-fit: cover;
}

.player-cover {
  z-index: 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  color: #fff;
  background: #000;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-dark {
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72));
}

.player-button {
  position: relative;
  z-index: 2;
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.95);
  box-shadow: 0 18px 40px rgba(20, 184, 166, 0.3);
  font-size: 32px;
}

.player-cover strong {
  position: absolute;
  right: 26px;
  bottom: 24px;
  left: 26px;
  z-index: 2;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 22px;
}

.player-error {
  min-height: 0;
  color: #fecaca;
  text-align: center;
}

.player-error:not(:empty) {
  padding: 12px;
}

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

.story-card {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.story-card h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 16px;
}

.ranking-section + .ranking-section {
  margin-top: 52px;
}

.site-footer {
  margin-top: 56px;
  padding: 36px 0;
  border-top: 1px solid var(--gray-200);
  background: #fff;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.footer-links {
  display: flex;
  gap: 16px;
  color: var(--teal-700);
  font-weight: 800;
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-copy {
    max-width: calc(100% - 24px);
  }

  .hero-copy > p:not(.hero-title-link) {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .section-heading,
  .section-heading.wide,
  .quick-filter,
  .footer-grid {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .catalog-grid,
  .small-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .ranking-grid,
  .ranking-grid.long-list,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

  .hot-panel {
    padding: 24px;
  }

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

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

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

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

  .hero {
    height: 620px;
  }

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

  .hero-meta {
    gap: 8px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .movie-grid,
  .catalog-grid,
  .small-grid,
  .related-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .rail .movie-card {
    flex-basis: 220px;
  }

  .ranking-item img {
    display: none;
  }

  .page-hero,
  .page-hero.compact-hero,
  .page-hero.search-hero {
    padding: 58px 0;
  }

  .detail-layout {
    padding: 34px 0 44px;
  }
}
