:root {
  --color-primary: #0284c7;
  --color-primary-dark: #0369a1;
  --color-accent: #d97706;
  --color-accent-light: #fef3c7;
  --color-bg: #f8fafc;
  --color-card: #ffffff;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-dark: #0f172a;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 24px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 50px rgba(15, 23, 42, 0.18);
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.header-inner {
  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;
  color: var(--color-dark);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.28);
}

.brand-text {
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

.main-nav > a,
.nav-dropdown > button {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #334155;
  cursor: pointer;
}

.main-nav > a:hover,
.main-nav > a.is-active,
.nav-dropdown:hover > button {
  color: var(--color-primary-dark);
  background: #e0f2fe;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 180px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  padding: 9px 10px;
  border-radius: 10px;
  color: #475569;
}

.nav-dropdown-menu a:hover {
  color: var(--color-primary-dark);
  background: #f0f9ff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #0f172a;
}

.hero {
  position: relative;
  height: min(680px, calc(100vh - 72px));
  min-height: 520px;
  overflow: hidden;
  background: var(--color-dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
}

.hero-slide.is-active {
  display: block;
}

.hero-backdrop,
.detail-backdrop,
.ranking-feature-cover,
.rank-poster,
.poster,
.detail-cover {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(2, 132, 199, 0.34), transparent 34%),
    linear-gradient(135deg, #0f172a, #1e293b 52%, #92400e);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-backdrop img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
  animation: fadeIn 0.5s ease-in-out;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.28)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
}

.hero-copy {
  max-width: 700px;
  color: #fff;
  animation: slideUp 0.5s ease-out;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.88);
}

.eyebrow span {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
}

.hero h1 {
  margin: 18px 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  display: -webkit-box;
  max-width: 680px;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hero-tags,
.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.movie-tags span,
.detail-meta span,
.rank-meta span,
.year-nav a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.hero-tags span {
  padding: 6px 11px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(8px);
}

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

.btn-primary,
.btn-ghost,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 14px 32px rgba(2, 132, 199, 0.32);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(2, 132, 199, 0.38);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.36);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 26px;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.section {
  padding: 72px 0;
}

.section-light {
  background: #fff;
}

.section-gradient {
  background: linear-gradient(135deg, #f0f9ff, #fef3c7);
}

.section-head,
.section-head-row {
  margin-bottom: 28px;
}

.section-head {
  max-width: 760px;
}

.section-head-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section h2,
.page-hero h1,
.detail-info h1 {
  margin: 8px 0 0;
  color: var(--color-dark);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-head p,
.page-hero p,
.category-panel p,
.category-overview-card p,
.content-card p,
.detail-one-line,
.player-caption p,
.rank-info p,
.ranking-feature-card p {
  color: var(--color-muted);
}

.search-box,
.inline-filter {
  display: flex;
  gap: 10px;
}

.search-box input,
.inline-filter input {
  width: min(340px, 58vw);
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
}

.search-box input:focus,
.inline-filter input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.search-box button {
  height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  color: #fff;
  background: var(--color-primary);
  cursor: pointer;
}

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

.movie-scroll .movie-card {
  width: 210px;
  flex: 0 0 210px;
  scroll-snap-align: start;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 18px;
  background: var(--color-card);
  box-shadow: var(--shadow-sm);
  transition: 0.22s ease;
}

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

.movie-card-link {
  display: block;
  height: 100%;
}

.poster {
  aspect-ratio: 3 / 4;
}

.poster img,
.rank-poster img,
.ranking-feature-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster img,
.ranking-feature-card:hover img,
.rank-item:hover img {
  transform: scale(1.04);
}

.poster::after,
.rank-poster::after,
.ranking-feature-cover::after,
.detail-cover::after,
.hero-backdrop.is-missing::before,
.detail-backdrop.is-missing::before {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  text-align: center;
  background:
    radial-gradient(circle at 20% 18%, rgba(14, 165, 233, 0.32), transparent 35%),
    linear-gradient(135deg, #0f172a, #1e293b 55%, #78350f);
}

.poster.is-missing::after,
.rank-poster.is-missing::after,
.ranking-feature-cover.is-missing::after,
.detail-cover.is-missing::after,
.hero-backdrop.is-missing::before,
.detail-backdrop.is-missing::before {
  display: flex;
}

.poster-year {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-primary-dark);
  font-size: 12px;
  font-weight: 700;
}

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

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

.movie-tags span {
  padding: 4px 8px;
  color: var(--color-primary-dark);
  background: #e0f2fe;
}

.movie-card-small {
  display: grid;
  grid-template-columns: 92px 1fr;
}

.movie-card-small .poster {
  height: 100%;
  min-height: 126px;
}

.movie-card-small .movie-card-link {
  display: contents;
}

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

.category-panel,
.category-overview-card,
.content-card,
.side-card,
.player-card,
.year-block,
.ranking-feature-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.category-panel {
  padding: 22px;
  transition: 0.2s ease;
}

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

.category-panel-head,
.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.category-panel-head span {
  font-size: 21px;
  font-weight: 800;
}

.category-panel-head strong {
  color: var(--color-primary);
}

.category-samples {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.category-samples a {
  display: block;
  overflow: hidden;
  color: #334155;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-samples a:hover,
.rank-info a:hover,
.ranking-feature-card a:hover {
  color: var(--color-primary-dark);
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 24px;
}

.editor-feature .movie-card,
.editor-feature .poster {
  height: 100%;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--color-dark);
}

.compact-hero {
  padding: 86px 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(2, 132, 199, 0.35), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(217, 119, 6, 0.28), transparent 30%),
    linear-gradient(135deg, #0f172a, #111827 64%, #312e81);
}

.compact-hero h1,
.compact-hero p {
  max-width: 780px;
  color: #fff;
}

.compact-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.compact-hero p {
  color: rgba(255, 255, 255, 0.82);
}

.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.year-nav a {
  padding: 6px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.overview-stack {
  display: grid;
  gap: 24px;
  padding: 48px 0;
}

.category-overview-card,
.year-block,
.content-card,
.side-card,
.player-card {
  padding: 24px;
}

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

.detail-hero {
  min-height: 560px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.46)),
    linear-gradient(0deg, #0f172a, transparent 54%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
  min-height: 560px;
  padding: 54px 0;
}

.detail-cover {
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

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

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

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

.detail-one-line {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-meta span,
.rank-meta span {
  padding: 5px 10px;
  color: #475569;
  background: #f1f5f9;
}

.detail-info .detail-meta span {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.12);
}

.detail-tags span {
  color: #fff;
  background: rgba(2, 132, 199, 0.82);
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.video-frame {
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow: var(--shadow-lg);
}

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

.player-caption {
  padding-top: 18px;
}

.player-caption h2,
.side-card h2,
.content-card h2 {
  margin: 0 0 8px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 16px 0 0;
}

.side-card dt {
  color: var(--color-muted);
}

.side-card dd {
  margin: 0;
  font-weight: 700;
}

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

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

.ranking-feature-card {
  overflow: hidden;
  background: #fff;
}

.ranking-feature-cover {
  display: block;
  aspect-ratio: 16 / 10;
}

.ranking-feature-cover span,
.rank-poster span {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  font-weight: 900;
}

.ranking-feature-card > div {
  padding: 20px;
}

.ranking-feature-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.rank-poster {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
}

.rank-info h3 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.site-footer {
  padding: 54px 0;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: #fff;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
}

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 6px 0;
  color: #cbd5e1;
}

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

.footer-links {
  columns: 2;
}

.is-hidden-by-filter {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .main-nav {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-md);
  }

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

  .nav-dropdown-menu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
  }

  .nav-dropdown:hover .nav-dropdown-menu {
    display: grid;
  }

  .hero {
    height: auto;
    min-height: 620px;
  }

  .hero-control {
    display: none;
  }

  .hero h1 {
    font-size: 42px;
  }

  .section-head-row {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .ranking-feature-grid,
  .overview-samples,
  .editor-grid,
  .editor-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .section {
    padding: 52px 0;
  }

  .hero {
    min-height: 650px;
  }

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

  .movie-card-small {
    grid-template-columns: 86px 1fr;
  }

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

  .movie-card h3 {
    font-size: 15px;
  }

  .rank-item {
    grid-template-columns: 96px 1fr;
  }

  .rank-info h3 {
    font-size: 18px;
  }
}
