/*
  静态电影网站主样式
  根据上传原站的白底、青蓝渐变、圆角卡片、阴影、Sticky Header、Hero 首屏和播放器风格静态化整理。
*/
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #ecfeff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #0f766e;
  --primary-2: #2563eb;
  --primary-soft: #ccfbf1;
  --dark: #020617;
  --shadow: 0 18px 45px rgba(15, 23, 42, .12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

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

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
}

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 24px rgba(15, 118, 110, .28);
}

.brand-text {
  font-size: 24px;
  line-height: 1;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link,
.nav-button {
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: color .2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-button:hover {
  color: var(--primary);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  display: grid;
  width: 180px;
  padding: 10px;
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .2s ease;
}

.dropdown-panel a {
  padding: 8px 10px;
  border-radius: 10px;
  color: #475569;
}

.dropdown-panel a:hover {
  background: var(--surface-soft);
  color: var(--primary);
}

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

.header-search {
  display: flex;
  align-items: center;
  width: min(300px, 30vw);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.header-search input,
.wide-search input,
.filter-toolbar input,
.filter-toolbar select,
.search-page-form input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.header-search button,
.wide-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  cursor: pointer;
  white-space: nowrap;
}

.mobile-menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  background: #f1f5f9;
  font-size: 22px;
}

.mobile-nav-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-nav-panel a {
  display: block;
  padding: 12px 24px;
  color: #334155;
  font-weight: 700;
}

.mobile-nav-panel.is-open {
  display: block;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .7s ease, transform .7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
}

.hero-bg::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(45, 212, 191, .38), transparent 36%),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, .28), transparent 34%),
    linear-gradient(180deg, transparent, rgba(2, 6, 23, .72));
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  align-items: center;
  min-height: 680px;
  gap: 60px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 14px;
  color: #5eead4;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 22px 0;
  color: rgba(255, 255, 255, .82);
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 26px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, .36);
  backdrop-filter: blur(10px);
}

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

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

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 32px rgba(37, 99, 235, .28);
}

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

.ghost-button.light {
  color: var(--primary);
  border-color: rgba(15, 118, 110, .20);
  background: var(--surface-soft);
}

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

.hero-poster {
  position: relative;
  display: block;
  height: 500px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 32px;
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
  box-shadow: 0 32px 70px rgba(0, 0, 0, .36);
}

.hero-poster img,
.detail-poster img,
.movie-cover img,
.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster img.is-missing,
.detail-poster img.is-missing,
.movie-cover img.is-missing,
.ranking-cover img.is-missing {
  display: none;
}

.hero-poster span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  padding: 12px 14px;
  border-radius: 16px;
  color: #fff;
  background: rgba(2, 6, 23, .52);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .38);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: #5eead4;
}

.home-search-panel {
  position: relative;
  z-index: 3;
  margin-top: -54px;
}

.search-panel-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, .82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel-inner h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.search-panel-inner p {
  margin: 0;
  color: var(--muted);
}

.wide-search,
.search-page-form {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.wide-search input,
.search-page-form input {
  padding-left: 16px;
}

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

.muted-section {
  background: #f1f5f9;
}

.section-title {
  margin-bottom: 26px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.03em;
}

.section-title p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

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

.category-tile,
.category-overview-card,
.content-card,
.ranking-box,
.search-results article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.category-tile {
  position: relative;
  min-height: 170px;
  padding: 24px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -50px;
  bottom: -50px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(20, 184, 166, .18), rgba(37, 99, 235, .18));
}

.category-tile:hover,
.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-count {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 800;
}

.category-tile h3 {
  margin: 18px 0 8px;
  font-size: 24px;
}

.category-tile p {
  margin: 0 0 18px;
  color: var(--muted);
}

.ranking-box {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.ranking-head,
.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.ranking-head h2,
.category-overview-head h2 {
  margin: 0;
}

.ranking-head a {
  color: var(--primary);
  font-weight: 800;
}

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

.rank-list li {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-no,
.ranking-index {
  color: var(--primary);
  font-weight: 900;
}

.rank-list a {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, rgba(45, 212, 191, .50), transparent 36%),
    linear-gradient(135deg, #0f766e, #1d4ed8);
}

.cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: rgba(255, 255, 255, .86);
  text-align: center;
  font-size: 22px;
  font-weight: 900;
}

.movie-cover img {
  position: relative;
  z-index: 2;
  transition: transform .3s ease;
}

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

.movie-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h3 {
  min-height: 54px;
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

.movie-card h3 a:hover,
.ranking-row h2 a:hover,
.search-results h2 a:hover {
  color: var(--primary);
}

.movie-meta,
.movie-desc,
.category-overview-head p,
.content-card p,
.search-result-info {
  color: var(--muted);
}

.movie-meta,
.movie-desc {
  margin: 0 0 10px;
  font-size: 14px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.detail-tags span {
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
}

.center-actions {
  justify-content: center;
  margin-top: 34px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0;
  color: #fff;
  background:
    radial-gradient(circle at 10% 0%, rgba(45, 212, 191, .38), transparent 36%),
    linear-gradient(135deg, #06172f 0%, #0f766e 52%, #1d4ed8 100%);
}

.page-hero-inner p {
  max-width: 780px;
}

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

.category-overview-card {
  padding: 24px;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: 1fr 190px 190px;
  gap: 16px;
  margin-bottom: 26px;
}

.filter-toolbar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-toolbar input,
.filter-toolbar select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 70px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.ranking-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
}

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

.ranking-info p {
  margin: 0;
  color: var(--muted);
}

.small-meta {
  margin: 10px 0 0;
}

.small-meta span {
  color: #475569;
  border-color: var(--line);
  background: #f8fafc;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.detail-hero-inner {
  position: relative;
  padding: 42px 0 76px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, .72);
}

.breadcrumb a:hover {
  color: #5eead4;
}

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

.detail-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

.big-fallback {
  font-size: 30px;
}

.detail-copy h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.detail-tags {
  margin: 22px 0 28px;
}

.detail-tags span {
  color: #cffafe;
  background: rgba(15, 23, 42, .38);
  border: 1px solid rgba(255, 255, 255, .16);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .16);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-trigger {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  min-height: 58px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 42px rgba(0, 0, 0, .35);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.play-trigger.is-hidden {
  display: none;
}

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

.content-card {
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  font-size: 16px;
}

.search-page-wrap {
  max-width: 880px;
}

.search-page-form {
  margin-bottom: 18px;
}

.search-results {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.search-results article {
  padding: 18px;
}

.search-results h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.search-results p {
  margin: 0 0 10px;
  color: var(--muted);
}

.site-footer {
  padding: 48px 0;
  color: #cbd5e1;
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

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

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

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

  .hero-poster {
    display: none;
  }

  .ranking-box {
    position: static;
  }

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

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

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 40px;
  }

  .search-panel-inner,
  .filter-toolbar,
  .ranking-row {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-row .ghost-button {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .category-grid,
  .catalog-grid,
  .movie-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .wide-search,
  .search-page-form,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    border-radius: 22px;
  }

  .wide-search button,
  .search-page-form button {
    min-height: 44px;
  }
}
