:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0284c7;
  --brand-2: #2563eb;
  --brand-soft: #e0f2fe;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 30rem), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.03em;
}

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

.brand-text {
  font-size: 1.18rem;
}

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

.nav-link,
.mobile-link {
  color: #475569;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #0369a1;
  background: var(--brand-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #e0f2fe;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #0369a1;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

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

.mobile-link {
  padding: 12px 14px;
  font-weight: 700;
}

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

.hero {
  position: relative;
  min-height: 640px;
  margin: 28px auto 48px;
  overflow: hidden;
  border-radius: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, #082f49, #1d4ed8);
  box-shadow: var(--shadow);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: scale(1.02);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.76) 48%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-bg img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.image-faded {
  opacity: 0 !important;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(680px, 86%);
  min-height: 640px;
  padding: 70px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  margin-bottom: 16px;
  color: #bae6fd;
  border: 1px solid rgba(186, 230, 253, 0.35);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.16);
  font-weight: 700;
  font-size: 0.9rem;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
}

.hero p {
  max-width: 620px;
  margin: 24px 0 0;
  color: #e0f2fe;
  font-size: clamp(1rem, 2vw, 1.24rem);
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4);
}

.ghost-btn {
  color: #e0f2fe;
  border: 1px solid rgba(224, 242, 254, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.hero-search {
  position: absolute;
  right: 34px;
  bottom: 34px;
  z-index: 3;
  width: min(430px, calc(100% - 68px));
}

.hero-search form,
.search-box {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.hero-search input,
.hero-search button,
.search-box input {
  min-height: 46px;
  border: 0;
  outline: 0;
  border-radius: 16px;
  font: inherit;
}

.hero-search input,
.search-box input {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  color: var(--text);
  background: #f8fafc;
}

.hero-search button {
  padding: 0 20px;
  color: #ffffff;
  background: #0284c7;
  font-weight: 800;
  cursor: pointer;
}

.hero-dots {
  position: absolute;
  left: 70px;
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 36px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dots button.active {
  width: 56px;
  background: #ffffff;
}

.hero-tags,
.detail-tags {
  margin-top: 18px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 54px;
}

.category-strip a,
.category-card,
.info-card,
.rank-card,
.search-panel,
.page-hero,
.player-shell,
.detail-article article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.category-strip a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
  transition: 0.2s ease;
}

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

.category-strip strong,
.category-card strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.category-strip span,
.category-card span {
  color: #0284c7;
  font-weight: 700;
}

.content-section {
  margin: 0 0 58px;
}

.content-section.no-margin {
  margin: 0;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.section-heading h2,
.info-card h2,
.detail-article h2 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.2;
}

.section-heading p,
.info-card p,
.detail-article p,
.page-hero p,
.search-panel p {
  margin: 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: 0.2s ease;
}

.movie-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.movie-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe 45%, #f8fafc);
}

.movie-cover::before,
.detail-poster::before {
  content: "影";
  position: absolute;
  inset: auto 14px 14px auto;
  color: rgba(2, 132, 199, 0.18);
  font-size: 3rem;
  font-weight: 900;
}

.movie-cover img,
.detail-poster img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
}

.movie-cover figcaption {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 4px 9px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  font-size: 0.75rem;
  font-weight: 700;
}

.movie-info {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 15px;
  flex: 1;
}

.movie-info h2 {
  display: -webkit-box;
  min-height: 2.7em;
  margin: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-info p {
  display: -webkit-box;
  min-height: 3.9em;
  margin: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.movie-meta,
.tag-row,
.quick-filter,
.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-meta {
  justify-content: space-between;
  color: #64748b;
  font-size: 0.84rem;
}

.tag-row span,
.pill-cloud a,
.quick-filter button,
.detail-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 0.82rem;
  font-weight: 700;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  margin-bottom: 58px;
}

.pill-cloud {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.pill-cloud.small {
  padding: 0;
  border: 0;
  background: transparent;
}

.pill-cloud a {
  min-height: 34px;
  padding: 0 14px;
}

.rank-card {
  padding: 24px;
}

.rank-list,
.full-rank-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-list li + li,
.full-rank-list li + li {
  border-top: 1px solid var(--line);
}

.rank-list a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
}

.rank-list span,
.rank-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #ffffff;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  font-weight: 900;
}

.rank-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em,
.rank-title em {
  color: #64748b;
  font-style: normal;
}

.text-link {
  width: 100%;
  margin-top: 16px;
  color: #0369a1;
  background: #e0f2fe;
}

.page-main {
  padding-top: 28px;
}

.search-panel,
.page-hero {
  margin: 0 0 36px;
  padding: clamp(24px, 5vw, 46px);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 24px;
  align-items: center;
}

.search-panel h1,
.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.quick-filter {
  grid-column: 1 / -1;
}

.quick-filter button {
  border: 0;
  cursor: pointer;
}

.category-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card,
.info-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  transition: 0.2s ease;
}

.full-rank-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.rank-row a {
  display: grid;
  grid-template-columns: 54px 56px minmax(0, 1fr) minmax(160px, auto) 72px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
}

.rank-row img {
  width: 56px;
  height: 78px;
  border-radius: 12px;
  background: #e0f2fe;
}

.rank-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-title strong,
.rank-title em,
.rank-tags {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: #0284c7;
  font-weight: 900;
  text-align: right;
}

.detail-main {
  padding-top: 28px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-radius: 34px;
  background: linear-gradient(135deg, #082f49, #1d4ed8);
  box-shadow: var(--shadow);
}

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

.detail-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  min-height: 620px;
  padding: clamp(28px, 6vw, 70px);
  color: #ffffff;
}

.detail-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 26px;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  box-shadow: 0 24px 55px rgba(2, 6, 23, 0.35);
}

.detail-copy h1 {
  font-size: clamp(2.3rem, 6vw, 5rem);
}

.detail-copy .lead {
  max-width: 760px;
  margin: 20px 0 0;
  color: #e0f2fe;
  font-size: 1.16rem;
}

.detail-meta a {
  min-height: 34px;
  padding: 0 14px;
  color: #e0f2fe;
  border: 1px solid rgba(186, 230, 253, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  margin: 36px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.28), rgba(2, 6, 23, 0.55));
  cursor: pointer;
  font: inherit;
}

.player-overlay.hidden {
  display: none;
}

.play-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.42);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #ffffff;
}

.detail-article {
  margin-bottom: 42px;
}

.detail-article article {
  padding: clamp(24px, 5vw, 44px);
}

.detail-article p {
  margin-bottom: 24px;
  color: #334155;
  font-size: 1.04rem;
}

.info-grid {
  margin-bottom: 60px;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  display: block;
  margin: 8px 0;
  color: #64748b;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
  color: #64748b;
  border-top: 1px solid var(--line);
}

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

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

  .split-layout,
  .search-panel {
    grid-template-columns: 1fr;
  }
}

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

  .nav-toggle {
    display: block;
  }

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

  .hero-content {
    width: 100%;
    padding: 34px 24px 150px;
  }

  .hero-search {
    left: 20px;
    right: 20px;
    bottom: 22px;
    width: auto;
  }

  .hero-dots {
    left: 24px;
    bottom: 104px;
  }

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

  .category-strip,
  .category-grid,
  .info-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: min(230px, 75vw);
  }

  .rank-row a {
    grid-template-columns: 44px 48px minmax(0, 1fr);
  }

  .rank-tags,
  .rank-score {
    display: none;
  }
}

@media (max-width: 420px) {
  main,
  .page-main,
  .detail-main,
  .header-inner,
  .mobile-nav,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 20px, 1180px);
  }

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