:root {
  --bg: #f8fbff;
  --bg-soft: #edf6ff;
  --card: rgba(255, 255, 255, 0.86);
  --card-solid: #ffffff;
  --line: #dbe8f7;
  --text: #142033;
  --muted: #64748b;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --cyan: #06b6d4;
  --violet: #7c3aed;
  --shadow: 0 20px 50px rgba(37, 99, 235, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.22), transparent 32rem),
    linear-gradient(135deg, #f8fbff 0%, #eff6ff 42%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.7;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(248, 251, 255, 0.86);
  border-bottom: 1px solid rgba(219, 232, 247, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.nav-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: max-content;
  font-weight: 800;
  color: #0f172a;
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0.9rem;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.brand-text {
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 0.55rem 0.78rem;
  border-radius: 999px;
  color: #475569;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.header-search,
.quick-search,
.page-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-search input,
.quick-search input,
.page-search input {
  min-width: 13rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0.7rem 1rem;
  color: var(--text);
  outline: none;
}

.header-search input:focus,
.quick-search input:focus,
.page-search input:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.header-search button,
.quick-search button,
.page-search button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1.12rem;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.20);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: white;
  color: var(--text);
  padding: 0.55rem 0.75rem;
}

.hero {
  max-width: 1320px;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
  position: relative;
}

.hero-track {
  position: relative;
  overflow: hidden;
  min-height: 36rem;
  border-radius: 2rem;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.62fr);
  align-items: center;
  gap: 2rem;
  padding: 4.5rem;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

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

.hero-bg img {
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.15);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 34%, rgba(6, 182, 212, 0.32), transparent 22rem),
    linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.88));
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #93c5fd;
}

.hero h1 {
  max-width: 48rem;
  margin: 0;
  color: white;
  font-size: clamp(2.35rem, 5vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 1.25rem 0 0.5rem;
  color: #e0f2fe;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.hero-desc {
  max-width: 48rem;
  margin: 0;
  color: rgba(226, 232, 240, 0.92);
  font-size: 1.04rem;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags {
  margin-top: 1.3rem;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  border-radius: 999px;
  padding: 0.35rem 0.72rem;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-size: 0.82rem;
  font-weight: 700;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.65rem;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 0.72rem 1.12rem;
  color: white;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.inner-actions .ghost-btn {
  color: var(--blue);
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.06);
}

.hero-poster {
  max-width: 24rem;
  justify-self: end;
  border-radius: 1.8rem;
  overflow: hidden;
  transform: rotate(2.5deg);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 1.8rem;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.hero-controls button {
  border: 0;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-controls > button {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  font-size: 1.5rem;
}

.hero-dots {
  display: flex;
  gap: 0.42rem;
}

.hero-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 2rem;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.quick-panel {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(20rem, 1.5fr);
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}

.quick-card,
.quick-search {
  border: 1px solid rgba(219, 232, 247, 0.9);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
  padding: 1.2rem;
}

.quick-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}

.quick-card span {
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
}

.quick-card strong {
  font-size: 1.05rem;
}

.quick-card.strong {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.quick-card.strong span {
  color: #dbeafe;
}

.quick-search input {
  flex: 1;
}

.content-section,
.split-section {
  margin-top: 2rem;
}

.section-head,
.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.1rem;
}

.section-head h2,
.panel-head h2,
.page-hero h1,
.detail-copy h1,
.story-block h2 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.16;
}

.section-head h2,
.panel-head h2 {
  font-size: clamp(1.55rem, 2.5vw, 2.4rem);
}

.section-head > p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
}

.compact-head {
  align-items: center;
}

.text-link {
  color: var(--blue);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(219, 232, 247, 0.9);
  border-radius: var(--radius);
  background: var(--card-solid);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 54px rgba(37, 99, 235, 0.15);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #f8fafc);
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 0.8rem;
  top: 0.8rem;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-body {
  padding: 1rem;
}

.card-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-body h3 {
  margin: 0.5rem 0 0.45rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--blue);
}

.card-body p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.compact .card-body {
  padding: 0.85rem;
}

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

.category-tile {
  min-height: 9.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(219, 232, 247, 0.9);
  border-radius: var(--radius);
  padding: 1.1rem;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(6, 182, 212, 0.08)),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.category-tile strong {
  font-size: 1.25rem;
}

.category-tile span {
  color: var(--muted);
  font-size: 0.9rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  gap: 1.25rem;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 5.8rem;
  border: 1px solid rgba(219, 232, 247, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  padding: 1.1rem;
}

.rank-panel.wide {
  position: static;
}

.rank-list {
  display: grid;
  gap: 0.7rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 2.2rem 3.5rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 0.8rem;
  border-radius: 1rem;
  padding: 0.55rem;
  background: rgba(239, 246, 255, 0.72);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(219, 234, 254, 0.9);
  transform: translateX(3px);
}

.rank-num {
  color: var(--blue);
  font-weight: 900;
}

.rank-cover img {
  aspect-ratio: 2 / 3;
  border-radius: 0.75rem;
  object-fit: cover;
}

.rank-text {
  min-width: 0;
}

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

.rank-text em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.rank-score {
  color: var(--violet);
  font-weight: 900;
  text-align: right;
}

.page-hero,
.detail-hero {
  overflow: hidden;
  margin: 1.5rem 0 2rem;
  border: 1px solid rgba(219, 232, 247, 0.9);
  border-radius: 2rem;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 20rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.92));
  box-shadow: var(--shadow);
  padding: 2rem;
}

.page-hero h1 {
  max-width: 56rem;
  font-size: clamp(2rem, 4vw, 4rem);
}

.page-hero p {
  max-width: 54rem;
  color: var(--muted);
}

.small-hero {
  min-height: 16rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1.1rem;
  align-items: center;
  border: 1px solid rgba(219, 232, 247, 0.9);
  border-radius: var(--radius);
  background: white;
  padding: 1rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
}

.category-cover-stack img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.8rem;
}

.detail-hero {
  padding: 1.4rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 1.6rem;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1.6rem;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
}

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

.detail-copy h1 {
  font-size: clamp(2rem, 4vw, 4.2rem);
}

.detail-line {
  max-width: 60rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.detail-meta,
.detail-tags {
  margin: 1rem 0;
}

.player-section {
  margin: 2rem 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  background: #020617;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  border: 0;
  color: white;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.36));
  cursor: pointer;
  z-index: 2;
}

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

.play-icon {
  width: 4.8rem;
  height: 4.8rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.34);
  font-size: 1.9rem;
  padding-left: 0.18rem;
}

.player-overlay strong {
  font-size: clamp(1.2rem, 3vw, 2.1rem);
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.story-block {
  border: 1px solid rgba(219, 232, 247, 0.9);
  border-radius: var(--radius);
  background: white;
  padding: 1.35rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.story-block p {
  margin-bottom: 0;
  color: #334155;
}

.search-count {
  min-height: 1.5rem;
  color: var(--blue);
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid rgba(219, 232, 247, 0.9);
  background: rgba(248, 251, 255, 0.82);
  padding: 2rem 1.25rem;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  color: var(--blue);
  font-size: 1.2rem;
  font-weight: 900;
}

.site-footer p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.footer-links a {
  color: #475569;
  font-weight: 700;
}

.footer-copy {
  max-width: 1320px;
  margin: 1rem auto 0;
  color: #94a3b8;
  font-size: 0.88rem;
}

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 3rem;
  }

  .hero-poster {
    display: none;
  }

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

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-menu {
    order: 3;
    display: none;
    width: 100%;
    padding-top: 0.7rem;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .hero-track {
    min-height: 40rem;
  }

  .hero-slide {
    padding: 2rem;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .quick-panel {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .page-search {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-search input,
  .page-search input {
    width: 100%;
    min-width: 0;
  }

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

  .movie-grid,
  .featured-grid,
  .two-col-grid,
  .related-grid,
  .category-grid,
  .category-large-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .category-card-large,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 18rem;
  }

  .rank-item {
    grid-template-columns: 2rem 3rem minmax(0, 1fr) 2.5rem;
    gap: 0.55rem;
  }
}
