:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --cyan: #06b6d4;
  --teal: #0d9488;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: #f8fafc;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.site-nav {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-icon,
.footer-logo span {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

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

.nav-links {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.nav-link {
  font-size: 15px;
  font-weight: 650;
  color: #475569;
  padding: 8px 0;
  transition: color 0.2s ease;
}

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

.nav-search {
  display: flex;
  align-items: center;
  width: 290px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.nav-search input,
.search-strip input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.nav-search input {
  padding: 10px 14px;
}

.nav-search button,
.search-strip button,
.search-page-form button {
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--primary-dark);
  font-size: 22px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 24px 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-menu a {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  font-weight: 650;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 660px;
  color: #fff;
  background: radial-gradient(circle at 15% 15%, rgba(34, 211, 238, 0.28), transparent 30%), linear-gradient(135deg, #2563eb 0%, #0891b2 52%, #0f766e 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: linear-gradient(30deg, rgba(255,255,255,0.2) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.2) 87.5%, rgba(255,255,255,0.2)), linear-gradient(150deg, rgba(255,255,255,0.2) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.2) 87.5%, rgba(255,255,255,0.2));
  background-size: 72px 126px;
}

.hero-shell {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 86px 24px 72px;
}

.hero-slider {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
  gap: 54px;
  align-items: center;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.hero-badge,
.page-hero span,
.section-heading span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.hero-badge {
  padding: 9px 16px;
  color: #eff6ff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy h1 span,
.hero-copy h2 span {
  color: #cffafe;
}

.hero-desc {
  max-width: 680px;
  margin: 0;
  color: #e0f2fe;
  font-size: 19px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-meta span,
.movie-meta-line span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.detail-info .btn.primary {
  width: fit-content;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
}

.btn.ghost {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 470px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateY(-4deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: perspective(900px) rotateY(0deg) translateY(-4px);
}

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

.hero-poster::after,
.poster-link::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.68), rgba(0,0,0,0.04) 58%);
}

.hero-play,
.play-mark {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(37, 99, 235, 0.88);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.hero-play {
  left: 26px;
  bottom: 74px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

.hero-poster strong {
  position: absolute;
  z-index: 2;
  left: 26px;
  right: 26px;
  bottom: 26px;
  font-size: 26px;
}

.hero-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}

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

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

.search-strip,
.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px;
}

.search-strip {
  transform: translateY(-38px);
  margin-bottom: -38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: center;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-strip h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-card h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.15;
}

.search-strip h2 {
  font-size: 30px;
}

.search-strip p,
.page-hero p,
.content-card p,
.movie-card-body p,
.rank-body p {
  color: var(--muted);
  line-height: 1.75;
}

.search-strip form,
.search-page-form,
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}

.search-strip input,
.search-page-form input {
  padding: 12px 14px;
}

.search-strip button,
.search-page-form button {
  border-radius: 12px;
}

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

.section-heading.slim {
  align-items: center;
}

.section-heading span,
.page-hero span {
  margin-bottom: 8px;
  color: var(--primary);
  background: #dbeafe;
  padding: 7px 12px;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading a {
  color: var(--primary-dark);
  font-weight: 800;
}

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

.category-card,
.category-overview-card,
.content-card,
.movie-card,
.rank-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.category-card {
  min-height: 196px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
  display: inline-flex;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 900;
}

.category-card h3,
.category-overview-card h3 {
  margin: 20px 0 8px;
  color: var(--ink);
  font-size: 22px;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5.3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

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

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

.play-mark {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

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

.movie-card-body h3 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}

.movie-card-body h3 a:hover,
.rank-body h3 a:hover {
  color: var(--primary);
}

.movie-card-body p {
  min-height: 52px;
  margin: 0 0 12px;
  font-size: 14px;
}

.movie-meta-line span,
.tag-row span,
.detail-meta span,
.detail-tags a {
  color: #475569;
  background: #f1f5f9;
}

.tag-row span:first-child,
.detail-tags a:hover {
  color: var(--primary-dark);
  background: #dbeafe;
}

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

.movie-card.compact {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
}

.movie-card.compact .poster-link {
  aspect-ratio: auto;
  min-height: 170px;
}

.movie-card.compact .movie-card-body p {
  min-height: 0;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 90px;
  padding: 22px;
  border-radius: 26px;
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: var(--shadow);
}

.rank-panel .section-heading h2,
.rank-panel .rank-body h3,
.rank-panel .rank-body h3 a {
  color: #fff;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-panel .rank-item {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

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

.rank-poster {
  display: block;
  overflow: hidden;
  border-radius: 14px;
}

.rank-poster img {
  width: 74px;
  height: 96px;
  object-fit: cover;
}

.rank-body h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 18px;
}

.rank-body p {
  margin: 0 0 8px;
  font-size: 14px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 80px 24px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #0891b2, #0f766e);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background: radial-gradient(circle at 20% 30%, #fff, transparent 18%), radial-gradient(circle at 80% 20%, #fff, transparent 14%);
}

.page-hero > div {
  position: relative;
  max-width: 960px;
  text-align: center;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
}

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

.filter-bar {
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
}

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

.category-overview-card {
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-overview-head span {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.category-overview-head strong {
  color: var(--primary);
  font-size: 14px;
}

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

.category-samples a {
  color: #475569;
  font-weight: 650;
}

.category-samples a:hover {
  color: var(--primary);
}

.full-rank {
  gap: 18px;
}

.full-rank .rank-item {
  grid-template-columns: 54px 96px minmax(0, 1fr);
  padding: 16px;
}

.full-rank .rank-poster img {
  width: 96px;
  height: 124px;
}

.search-page-form {
  max-width: 820px;
  margin: 0 auto 28px;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  color: #fff;
  overflow: hidden;
}

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

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(7px) scale(1.05);
}

.detail-bg::after {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.52));
}

.detail-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #bfdbfe;
  margin-bottom: 34px;
  font-weight: 650;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

.detail-info {
  display: grid;
  gap: 20px;
}

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

.detail-one-line {
  max-width: 820px;
  margin: 0;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta span,
.detail-tags a {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(2, 6, 23, 0.32));
  cursor: pointer;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.35);
  font-size: 32px;
}

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

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

.content-card {
  padding: 28px;
}

.content-card h2 {
  font-size: 28px;
}

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

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr;
  gap: 44px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.footer-brand p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links h3 {
  margin: 0 0 8px;
  color: #fff;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 24px;
  text-align: center;
  color: #94a3b8;
}

[hidden] {
  display: none !important;
}

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

  .nav-search {
    margin-left: auto;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero-slide,
  .split-layout,
  .detail-layout,
  .detail-text-grid,
  .search-strip {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .site-nav {
    height: auto;
    min-height: 66px;
    padding: 12px 16px;
  }

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

  .nav-search {
    display: none;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-shell {
    padding: 56px 16px 46px;
  }

  .hero-slider {
    min-height: auto;
  }

  .hero-slide {
    gap: 28px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 360px;
  }

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

  .hero-actions,
  .filter-bar,
  .search-strip form,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .search-strip,
  .section-wrap {
    padding: 38px 16px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .movie-grid,
  .compact-grid,
  .category-movie-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.compact,
  .rank-item,
  .full-rank .rank-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .movie-card.compact .poster-link {
    min-height: 144px;
  }

  .rank-num {
    display: none;
  }

  .detail-content {
    padding: 28px 16px 48px;
  }

  .detail-layout {
    gap: 26px;
  }

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

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