:root {
  --bg: #f7f9ff;
  --panel: #ffffff;
  --panel-soft: #eef5ff;
  --text: #111827;
  --muted: #637083;
  --line: #dbe6f4;
  --brand: #2563eb;
  --brand-dark: #1e40af;
  --brand-soft: #dbeafe;
  --shadow: 0 18px 45px rgba(30, 64, 175, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 32rem),
    linear-gradient(180deg, #f9fbff 0%, #eef5ff 48%, #f7f9ff 100%);
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(219, 230, 244, 0.9);
  backdrop-filter: blur(18px);
}

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

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

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

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

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

.nav-link,
.nav-more-button {
  border: 0;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 2px;
}

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

.nav-more {
  position: relative;
}

.nav-more-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 190px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

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

.nav-more-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 12px;
  color: #334155;
  font-size: 0.93rem;
}

.nav-more-panel a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: 0.2s ease;
}

.header-search input {
  width: 190px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.filter-bar button,
.primary-button,
.ghost-button,
.play-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.play-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.header-search button {
  padding: 10px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  margin-left: auto;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: #334155;
}

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

.hero {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

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

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

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

.hero-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  filter: blur(3px);
  opacity: 0.58;
}

.hero-shade {
  background:
    radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.36), transparent 28rem),
    linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.74) 46%, rgba(15, 23, 42, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  gap: 46px;
  align-items: center;
  padding: 58px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(2.45rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
  max-width: 780px;
}

.hero-one-line {
  max-width: 740px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.02rem, 2vw, 1.28rem);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-tags span {
  padding: 8px 12px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.13);
}

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

.primary-button,
.ghost-button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.primary-button:hover,
.ghost-button:hover,
.play-button:hover,
.header-search button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 470px;
  border-radius: 28px;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

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

.hero-controls {
  position: absolute;
  left: 58px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

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

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

.hero-search {
  position: relative;
  z-index: 8;
  width: min(820px, calc(100% - 32px));
  margin: -34px auto 0;
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(219, 230, 244, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

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

.hero-search button {
  padding: 0 24px;
}

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

.section {
  margin-top: 58px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.text-link {
  color: var(--brand);
  font-weight: 900;
}

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

.category-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.26), transparent 8rem),
    linear-gradient(135deg, var(--brand), #7c3aed);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.category-card:nth-child(2n) {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 8rem),
    linear-gradient(135deg, #0f766e, #2563eb);
}

.category-card:nth-child(3n) {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 8rem),
    linear-gradient(135deg, #9333ea, #db2777);
}

.category-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.category-card p {
  margin: 10px 0;
  color: rgba(255, 255, 255, 0.86);
}

.category-card span {
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(219, 230, 244, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.35), transparent 8rem),
    linear-gradient(135deg, #1d4ed8, #7c3aed);
}

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

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

.poster-frame.poster-empty::after,
.hero-poster.poster-empty::after {
  content: "高清电影大全";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
}

.meta-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.meta-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, #f97316, #e11d48);
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.card-meta a {
  color: var(--brand);
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 1.03rem;
  line-height: 1.32;
}

.movie-card h3 a:hover {
  color: var(--brand);
}

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

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  color: #1e3a8a;
  background: var(--brand-soft);
  font-size: 0.78rem;
}

.feature-panel,
.filter-panel,
.detail-hero,
.player-card,
.content-card,
.related-panel {
  border: 1px solid rgba(219, 230, 244, 0.92);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.feature-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  padding: 28px;
}

.hot-list {
  display: grid;
  gap: 12px;
}

.hot-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.hot-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  font-weight: 900;
}

.hot-title {
  font-weight: 900;
}

.hot-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.hot-score {
  color: #e11d48;
  font-weight: 900;
}

.filter-panel {
  padding: 20px;
  margin-bottom: 22px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 170px 150px auto;
  gap: 10px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 12px 14px;
}

.filter-bar button {
  padding: 0 18px;
  color: #ffffff;
  background: #0f172a;
}

.count-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
  overflow: hidden;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumb {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--brand);
  font-weight: 800;
}

.detail-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #1e3a8a;
  background: var(--brand-soft);
  font-weight: 800;
}

.detail-one-line {
  color: var(--muted);
  font-size: 1.06rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 22px;
  margin-top: 24px;
}

.player-card,
.content-card,
.related-panel {
  padding: 22px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.45), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.66));
  color: #ffffff;
  padding: 24px;
}

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

.play-button {
  min-width: 150px;
  margin-top: 16px;
  font-size: 1rem;
}

.player-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.content-card h2,
.related-panel h2,
.player-card h2 {
  margin: 0 0 14px;
  font-size: 1.36rem;
}

.content-card p {
  margin: 0 0 16px;
  color: #334155;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.side-card img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
}

.side-card h3 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.32;
}

.side-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.site-footer {
  margin-top: 80px;
  padding: 42px 0 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
}

.footer-inner p {
  max-width: 620px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #334155;
  background: var(--panel-soft);
  font-weight: 800;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 16px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.22s ease;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.empty-result {
  display: none;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
}

.empty-result.visible {
  display: block;
}

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

  .mobile-menu-button {
    display: block;
  }

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

  .mobile-nav .nav-link {
    display: block;
    padding: 11px 12px;
    border-radius: 14px;
  }

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

  .mobile-search button {
    padding: 11px 16px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 36px;
  }

  .hero-poster {
    display: none;
  }

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

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

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

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

@media (max-width: 720px) {
  .header-inner,
  .page-main,
  .hero,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, 1240px);
  }

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

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

  .hero-content {
    padding: 28px 22px 82px;
  }

  .hero-controls {
    left: 24px;
    bottom: 28px;
  }

  .hero-search {
    width: calc(100% - 18px);
    flex-direction: column;
    border-radius: 24px;
  }

  .hero-search button {
    padding: 13px 18px;
  }

  .section-head {
    display: block;
  }

  .category-grid,
  .movie-grid,
  .movie-grid.large {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

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

  .movie-card p {
    font-size: 0.86rem;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .detail-poster {
    max-width: 220px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .hot-row {
    grid-template-columns: 38px 1fr;
  }

  .hot-score {
    grid-column: 2;
  }
}
