:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #eff6ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --amber: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.brand-text,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--blue);
  background: #eff6ff;
  transform: translateY(-1px);
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
}

.nav-search input,
.mobile-search input,
.filter-panel input,
.search-hero input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input {
  width: 180px;
  padding: 10px 12px;
}

.nav-search button,
.mobile-search button,
.search-hero button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  padding: 10px 14px;
  cursor: pointer;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  padding: 10px;
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #0f172a;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

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

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.76) 46%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  color: #ffffff;
  padding: 110px 0 90px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-subtitle {
  max-width: 760px;
  margin: 20px 0 0;
  color: #e0f2fe;
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 750;
}

.hero-text {
  max-width: 680px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

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

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.35);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
}

.soft-button {
  color: var(--blue);
  background: #eff6ff;
}

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

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

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

.hero-tags span,
.info-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 750;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: #ffffff;
}

.main-section,
.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.main-section {
  padding: 58px 0 0;
}

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

.section-heading h2,
.page-heading h1,
.detail-text h2,
.related-section h2,
.player-section h2 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.04em;
}

.section-heading h2,
.detail-text h2,
.related-section h2,
.player-section h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-heading p,
.page-heading p,
.category-card p,
.card-desc,
.rank-content p,
.detail-lead,
.detail-text p,
.search-note {
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dbeafe;
}

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

.movie-card:hover .poster-link img,
.category-card:hover img,
.rank-cover:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.78));
}

.year-badge,
.play-badge,
.score-badge {
  position: absolute;
  z-index: 2;
}

.year-badge {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
}

.card-body {
  padding: 16px;
}

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

.card-title:hover,
.rank-title:hover {
  color: var(--blue);
}

.card-desc {
  display: -webkit-box;
  min-height: 50px;
  margin: 8px 0 12px;
  overflow: hidden;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-row {
  color: var(--muted);
  font-size: 13px;
}

.meta-row strong {
  color: var(--amber);
}

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

.tag-row span,
.category-chips a,
.detail-chip,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.tag-row span,
.category-chips a,
.detail-chip {
  padding: 6px 9px;
  color: #1e40af;
  background: #eff6ff;
}

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

.category-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.category-card p {
  margin: 0;
}

.category-card .sample-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #dbeafe;
  transition: transform 0.32s ease;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.category-chips a:hover {
  color: #ffffff;
  background: var(--blue);
}

.feature-band {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: stretch;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid rgba(191, 219, 254, 0.8);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.feature-band .poster-link {
  border-radius: 22px;
  aspect-ratio: 16 / 9;
}

.feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.feature-copy h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 140px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

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

.rank-cover {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #dbeafe;
}

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

.rank-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 850;
}

.rank-content p {
  margin: 6px 0 10px;
}

.page-hero {
  background:
    radial-gradient(circle at 78% 30%, rgba(6, 182, 212, 0.22), transparent 32%),
    linear-gradient(135deg, #1d4ed8, #06b6d4);
  color: #ffffff;
  padding: 72px 0;
}

.page-hero .page-shell {
  display: grid;
  gap: 14px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

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

.filter-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px 0 24px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.filter-panel label {
  color: var(--text);
  font-weight: 850;
  white-space: nowrap;
}

.filter-panel input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
}

.search-hero {
  max-width: 760px;
  display: flex;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
}

.search-hero input {
  flex: 1;
  padding: 16px 18px;
}

.search-hero button {
  min-width: 110px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 28px 0 18px;
}

.breadcrumb a,
.breadcrumb span {
  padding: 6px 10px;
  color: #475569;
  background: #ffffff;
  border: 1px solid var(--line);
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: stretch;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: #dbeafe;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.detail-lead {
  margin: 18px 0 0;
  font-size: 18px;
}

.detail-chip {
  margin-top: 18px;
}

.info-tags {
  margin-top: 22px;
}

.info-tags span {
  color: #1e40af;
  background: #eff6ff;
}

.player-section,
.detail-text,
.related-section {
  margin-top: 34px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 22px;
  background: #000000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.76));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 38px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.42);
}

.detail-text p {
  margin: 12px 0 0;
  font-size: 17px;
}

.detail-text h2 + p {
  margin-top: 10px;
}

.detail-text h2:not(:first-child) {
  margin-top: 26px;
}

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

.hidden-card {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 34px;
  margin-top: 22px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 70px;
  padding: 36px 0;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

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

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

  .menu-button {
    display: block;
    margin-left: auto;
  }

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

  .feature-band,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster img {
    min-height: auto;
    max-height: 560px;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 62px;
  }

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

  .hero {
    min-height: 620px;
  }

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

  .hero-text {
    font-size: 16px;
  }

  .movie-grid,
  .category-grid,
  .related-section .movie-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .page-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-item {
    grid-template-columns: 44px 96px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .rank-title {
    font-size: 17px;
  }

  .rank-content p {
    display: none;
  }

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-hero,
  .player-section,
  .detail-text,
  .related-section {
    padding: 18px;
    border-radius: 22px;
  }

  .player-cover span {
    width: 68px;
    height: 68px;
    font-size: 30px;
  }
}
