:root {
  --blue: #2563eb;
  --cyan: #0891b2;
  --teal: #0d9488;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: 0 12px 30px rgba(8, 145, 178, 0.26);
}

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

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

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

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

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.66), transparent 38%), linear-gradient(135deg, var(--slate-950), #0e7490 48%, #042f2e 100%);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.08) contrast(1.08);
}

.hero-bg img.is-empty,
.poster-frame img.is-empty {
  display: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.64) 48%, rgba(8, 145, 178, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 56px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

.eyebrow.dark {
  color: var(--cyan);
  background: #ecfeff;
  box-shadow: inset 0 0 0 1px #bae6fd;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 16px;
  line-height: 1.1;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  font-size: clamp(28px, 4vw, 46px);
}

.hero-copy p,
.page-hero p,
.lead-text {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

.page-hero p {
  color: var(--slate-600);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

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

.primary-btn {
  color: var(--white);
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.26);
}

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

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.ghost-btn.light {
  color: var(--slate-800);
  background: rgba(255, 255, 255, 0.88);
}

.hero-poster {
  position: relative;
  display: block;
  min-height: 450px;
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.80), rgba(13, 148, 136, 0.86));
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.48);
}

.hero-poster img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  font-size: 18px;
  font-weight: 800;
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
}

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

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

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

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

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

.quick-search {
  position: relative;
  z-index: 5;
  margin-top: -48px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-panel {
  display: grid;
  gap: 10px;
}

.search-label {
  font-weight: 800;
  color: var(--slate-800);
}

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

.search-row input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--slate-800);
  background: var(--white);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-row input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.14);
}

.search-row button {
  height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 20px;
  color: var(--white);
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  font-weight: 800;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--cyan);
  background: #ecfeff;
  font-weight: 700;
}

.section-block {
  padding: 64px 0 0;
}

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

.section-heading span {
  display: block;
  color: var(--cyan);
  font-weight: 800;
}

.section-heading h2 {
  margin: 3px 0 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

.section-heading a,
.detail-switch a {
  color: var(--blue);
  font-weight: 800;
}

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  right: 10px;
  padding: 4px 8px;
  background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
  left: 10px;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(37, 99, 235, 0.82);
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.movie-card-body strong {
  color: var(--slate-900);
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-line {
  min-height: 42px;
  color: var(--slate-600);
  font-size: 13px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--slate-500);
  font-size: 12px;
  font-style: normal;
}

.card-meta em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
  gap: 28px;
  align-items: start;
}

.rank-panel,
.topic-panel,
.content-card,
.meta-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-panel,
.topic-panel {
  padding: 26px;
}

.compact-heading {
  align-items: center;
}

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

.movie-card.compact {
  flex-direction: row;
  align-items: stretch;
}

.movie-card.compact .poster-frame {
  width: 92px;
  flex: 0 0 92px;
  aspect-ratio: 2 / 3;
}

.movie-card.compact .movie-card-body {
  flex: 1;
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 16px;
}

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

.category-card,
.category-overview-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  overflow: hidden;
}

.category-card a,
.category-main-link {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.category-card span,
.category-main-link span {
  color: var(--blue);
  font-weight: 900;
  font-size: 18px;
}

.category-card strong,
.category-main-link p {
  margin: 0;
  color: var(--slate-600);
  font-size: 14px;
  font-weight: 500;
}

.category-samples {
  display: grid;
  gap: 6px;
  padding: 0 18px 18px;
}

.category-samples a {
  color: var(--slate-700);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-main {
  padding-bottom: 64px;
}

.page-hero {
  padding: 64px 0 8px;
}

.page-hero h1 {
  color: var(--slate-900);
}

.category-hero .search-panel,
.page-hero .search-panel {
  max-width: 720px;
  margin-top: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--slate-500);
  font-size: 14px;
  margin-bottom: 18px;
}

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

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

.category-overview-card {
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.category-samples.large {
  gap: 8px;
}

.top-rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(220px, 0.65fr) 70px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.ranking-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.ranking-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.ranking-meta {
  min-width: 0;
  color: var(--slate-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.ranking-play {
  color: var(--cyan);
  font-weight: 800;
  text-align: right;
}

.detail-main {
  padding-bottom: 64px;
}

.detail-hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
  background: radial-gradient(circle at 85% 20%, rgba(34, 211, 238, 0.36), transparent 34%), linear-gradient(135deg, var(--slate-950), #075985 52%, #0f766e 100%);
}

.detail-hero-inner {
  padding: 42px 0 56px;
}

.detail-hero .breadcrumb {
  color: rgba(255, 255, 255, 0.72);
}

.detail-hero .breadcrumb a {
  color: #cffafe;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.large-poster {
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.48);
}

.detail-copy h1 {
  color: var(--white);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
  font-size: 13px;
}

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

.player-section h2 {
  margin: 0 0 18px;
  color: var(--slate-900);
  font-size: clamp(24px, 4vw, 34px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.35), rgba(8, 145, 178, 0.26));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.36);
  font-size: 34px;
  padding-left: 5px;
}

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

.content-card,
.meta-card {
  padding: 26px;
}

.content-card h2,
.meta-card h2 {
  margin: 0 0 14px;
  color: var(--slate-900);
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
}

.meta-card {
  grid-row: span 2;
}

.meta-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.meta-card dt {
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 800;
}

.meta-card dd {
  margin: -8px 0 0;
  color: var(--slate-800);
  font-weight: 700;
}

.detail-switch {
  display: flex;
  gap: 14px;
}

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

.site-footer {
  margin-top: 70px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--slate-950);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

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

.site-footer p {
  max-width: 640px;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 700;
}

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

@media (max-width: 1080px) {
  .desktop-nav {
    gap: 8px;
  }

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

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

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

  .meta-card {
    grid-row: auto;
  }

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav.open {
    display: flex;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 48px;
    padding-bottom: 72px;
  }

  .hero-poster {
    min-height: 320px;
  }

  .hero-poster img {
    height: 320px;
  }

  .hero-control {
    display: none;
  }

  .quick-search {
    margin-top: -30px;
  }

  .movie-grid,
  .related-grid,
  .top-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-row {
    grid-template-columns: 42px minmax(0, 1fr) 64px;
  }

  .ranking-meta {
    grid-column: 2 / 4;
  }

  .footer-grid {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container,
  .site-header-inner,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .hero-copy p,
  .page-hero p,
  .lead-text {
    font-size: 17px;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row button {
    width: 100%;
  }

  .movie-grid,
  .related-grid,
  .top-rank-grid {
    gap: 12px;
  }

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

  .card-line {
    min-height: auto;
  }

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

  .movie-card.compact .poster-frame {
    width: 82px;
    flex-basis: 82px;
  }

  .player-shell {
    border-radius: 18px;
  }

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