:root {
  --primary-50: #f0fdfa;
  --primary-100: #ccfbf1;
  --primary-500: #14b8a6;
  --primary-600: #0d9488;
  --accent-50: #ecfeff;
  --accent-500: #06b6d4;
  --secondary-500: #f97316;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.14), transparent 30rem),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f9fafb 100%);
  color: var(--gray-900);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

img {
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.nav-shell,
.section-shell,
.footer-shell,
.detail-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

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

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

.brand-name {
  background: linear-gradient(90deg, var(--primary-600), var(--accent-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 21px;
}

.brand.compact .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary-600);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--gray-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--gray-700);
}

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-slide img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.52) 44%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0) 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(1240px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.hero-kicker,
.section-heading span,
.category-panel > span,
.page-hero span,
.overview-copy span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.14);
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 800;
}

.hero-content .hero-kicker {
  background: rgba(255, 255, 255, 0.18);
  color: #ccfbf1;
  backdrop-filter: blur(8px);
}

.hero-content h1,
.hero-content h2 {
  max-width: 820px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.hero-movie-title {
  margin-top: 16px;
  font-size: clamp(28px, 4vw, 44px) !important;
}

.hero-content p {
  max-width: 720px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.detail-meta,
.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.card-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
}

.card-meta span,
.tag-row span,
.detail-meta span {
  background: var(--primary-50);
  color: var(--primary-600);
}

.hero-actions,
.section-heading,
.search-inline,
.filter-selects,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  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 {
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(20, 184, 166, 0.24);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.btn-light {
  background: #ffffff;
  color: var(--gray-900);
}

.carousel-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 34px;
  backdrop-filter: blur(10px);
}

.carousel-control.prev {
  left: 24px;
}

.carousel-control.next {
  right: 24px;
}

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

.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.25s ease, background 0.25s ease;
}

.carousel-dots button.is-active {
  width: 28px;
  background: #ffffff;
}

.search-hero {
  position: relative;
  z-index: 5;
  margin-top: -54px;
  padding: 0 16px;
}

.search-panel,
.content-panel,
.category-panel,
.content-card,
.filter-bar,
.category-overview-card {
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.search-panel {
  padding: 22px;
  backdrop-filter: blur(18px);
}

.search-panel label,
.filter-search label,
.filter-selects label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 800;
}

.search-inline input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--gray-200);
  border-radius: 15px;
  background: #ffffff;
  padding: 0 16px;
  color: var(--gray-900);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-inline input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.search-inline input {
  flex: 1;
}

.section-shell {
  padding: 76px 0 0;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 26px;
}

.section-heading h2,
.category-panel h2,
.page-hero h1,
.overview-copy h2 {
  color: var(--gray-900);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: var(--primary-600);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: var(--shadow-card);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.poster-link img {
  width: 100%;
  height: 100%;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.mini-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.card-body {
  padding: 18px;
}

.card-meta {
  margin-bottom: 10px;
}

.movie-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.7;
}

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

.split-section {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  align-items: start;
}

.content-panel,
.category-panel {
  padding: 26px;
}

.compact-heading {
  margin-bottom: 18px;
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 54px 82px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, 0.38);
  box-shadow: var(--shadow-card);
}

.rank-num {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--secondary-500), var(--primary-500));
  color: #ffffff;
  font-weight: 900;
}

.rank-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}

.rank-copy h3 {
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 850;
}

.rank-copy p {
  display: -webkit-box;
  margin-bottom: 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.6;
}

.large-rank-list .rank-item {
  grid-template-columns: 64px 104px 1fr;
}

.category-grid {
  display: grid;
  gap: 14px;
}

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

.category-tile {
  display: block;
  padding: 18px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, var(--primary-50));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.45);
}

.category-tile span {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-900);
  font-weight: 900;
}

.category-tile p,
.category-panel p,
.overview-copy p,
.page-hero p {
  color: var(--gray-500);
  line-height: 1.8;
}

.page-hero {
  min-height: 330px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(6, 182, 212, 0.08)),
    radial-gradient(circle at 75% 10%, rgba(249, 115, 22, 0.18), transparent 26rem),
    #ffffff;
}

.page-hero > div {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0 56px;
}

.page-hero p {
  max-width: 760px;
  margin-top: 16px;
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 18px;
  padding: 20px;
  margin-bottom: 28px;
}

.rich-filter-bar {
  grid-template-columns: minmax(260px, 1fr) 1.25fr;
}

.filter-selects {
  flex-wrap: wrap;
  align-items: end;
}

.filter-selects label {
  min-width: 150px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 26px;
  padding: 26px;
}

.overview-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.overview-copy p {
  margin: 14px 0 22px;
}

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

.mini-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: var(--gray-900);
  color: #ffffff;
  box-shadow: var(--shadow-card);
}

.mini-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  transition: transform 0.35s ease;
}

.mini-card span {
  display: block;
  padding: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--gray-900);
  color: #ffffff;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  filter: blur(1px);
}

.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.72)),
    linear-gradient(0deg, rgba(17, 24, 39, 1), rgba(17, 24, 39, 0.2));
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
}

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

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
}

.detail-info h1 {
  max-width: 860px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
}

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

.detail-tags span,
.detail-meta span {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
}

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  padding-top: 46px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.24));
  color: #ffffff;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 20px 45px rgba(20, 184, 166, 0.36);
  font-size: 28px;
}

.player-cover strong {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 900;
}

.player-cover em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.76);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 900;
}

.content-card p {
  color: var(--gray-700);
  font-size: 16px;
  line-height: 2;
}

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

.footer-shell {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 54px 0;
}

.footer-brand p {
  max-width: 430px;
  margin-top: 16px;
  line-height: 1.8;
}

.site-footer h3 {
  margin-bottom: 14px;
  color: #ffffff;
  font-weight: 900;
}

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

.site-footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}

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

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

  .split-section,
  .category-overview-card,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 220px 1fr;
  }

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

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

  .nav-links {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-100);
  }

  .hero-section,
  .hero-content {
    min-height: 600px;
  }

  .hero-content {
    padding: 68px 0 82px;
  }

  .carousel-control {
    display: none;
  }

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

  .search-inline,
  .section-heading,
  .filter-selects {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading {
    gap: 10px;
  }

  .compact-grid,
  .mini-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    width: min(260px, 72vw);
  }

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

@media (max-width: 520px) {
  .nav-shell,
  .section-shell,
  .footer-shell,
  .detail-shell,
  .page-hero > div,
  .hero-content {
    width: min(100% - 24px, 1240px);
  }

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

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

  .hero-content p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .movie-grid {
    grid-template-columns: 1fr;
  }

  .rank-item,
  .large-rank-list .rank-item {
    grid-template-columns: 44px 78px 1fr;
  }

  .rank-num {
    width: 38px;
    height: 38px;
  }

  .card-body,
  .content-panel,
  .category-panel,
  .content-card,
  .category-overview-card {
    padding: 18px;
  }
}
