* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fbff;
  --surface: #ffffff;
  --surface-soft: #eef6ff;
  --text: #152033;
  --muted: #64748b;
  --line: #dbe7f5;
  --brand: #2563eb;
  --brand-dark: #1e40af;
  --accent: #06b6d4;
  --shadow: 0 18px 45px rgba(30, 64, 175, 0.13);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 36rem),
    linear-gradient(180deg, #f7fbff 0%, #eef6ff 52%, #f8fbff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(219, 231, 245, 0.85);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 900;
  white-space: nowrap;
  color: #0f172a;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-dark);
  background: #eaf2ff;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 8px 10px;
  background: transparent;
}

.header-search button,
.big-search button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.primary-btn.slim {
  display: inline-flex;
  padding: 9px 16px;
}

.ghost-btn,
.more-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.22);
  padding: 11px 18px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.more-link {
  border-color: var(--line);
  color: var(--brand-dark);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

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

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  gap: 8px;
  flex-wrap: wrap;
}

main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
}

.hero-shell {
  position: relative;
  min-height: 610px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 36px;
  padding: 74px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background:
    linear-gradient(100deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.72) 46%, rgba(14, 165, 233, 0.22)),
    var(--hero-image) center / cover no-repeat;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.24), transparent 20rem),
    linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.44));
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
  color: #0f4a6e;
  background: rgba(224, 242, 254, 0.95);
}

.large-tags span {
  font-size: 14px;
}

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

.hero-poster {
  display: block;
  border-radius: 30px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  transform: rotate(2deg);
}

.poster-image {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

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

.hero-controls button {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-size: 28px;
}

.hero-dots {
  position: absolute;
  left: 74px;
  bottom: 38px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 7px;
  border-radius: 999px;
  opacity: 0.55;
}

.hero-dot.active {
  opacity: 1;
  background: #ffffff;
}

.section-block,
.wide-panel,
.page-hero,
.category-overview-card,
.detail-content,
.player-section {
  margin-top: 28px;
}

.wide-panel,
.section-block,
.page-hero,
.category-overview-card,
.detail-content {
  border: 1px solid rgba(219, 231, 245, 0.88);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.08);
}

.wide-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
}

.wide-panel h2,
.section-head h2,
.page-hero h1,
.detail-copy h1,
.content-main h2,
.content-side h2 {
  margin: 0;
  color: #0f172a;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.wide-panel h2,
.section-head h2 {
  font-size: clamp(24px, 3vw, 38px);
}

.big-search {
  min-width: min(520px, 100%);
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.big-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 12px 16px;
  background: transparent;
}

.section-block {
  padding: 30px;
}

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

.section-head.inline {
  align-items: center;
}

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

.category-tile {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.tile-image,
.overview-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.58;
  transform: scale(1.03);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover .tile-image {
  transform: scale(1.1);
  opacity: 0.76;
}

.tile-body {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 8px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.9));
}

.tile-body strong {
  font-size: 21px;
  font-weight: 950;
}

.tile-body em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.16);
}

.cover-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #f0f9ff);
}

.card-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 5px 8px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

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

.movie-card h3 {
  min-height: 52px;
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 950;
}

.movie-card h3 a:hover,
.rank-title:hover,
.overview-links a:hover {
  color: var(--brand);
}

.movie-card p {
  margin: 8px 0 0;
  min-height: 64px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.movie-card.compact p {
  display: none;
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 24px;
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.rank-item a {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #ffffff;
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  font-weight: 950;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 950;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.large-list .rank-item a {
  grid-template-columns: 64px minmax(0, 1fr) 190px;
}

.page-hero {
  padding: 44px;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.22), transparent 24rem),
    linear-gradient(135deg, #ffffff, #eef6ff);
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 70px);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

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

.filter-bar input {
  min-width: min(520px, 100%);
}

.category-overview-list {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

.category-overview-card .overview-media {
  position: relative;
  min-height: 260px;
  opacity: 1;
}

.overview-content {
  padding: 30px;
}

.overview-content h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 950;
}

.overview-content p {
  color: var(--muted);
  line-height: 1.8;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.overview-links a {
  border-radius: 999px;
  padding: 8px 12px;
  background: #eef6ff;
  color: #1e40af;
  font-weight: 800;
}

.detail-page {
  display: block;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 34px;
  background:
    linear-gradient(105deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.74), rgba(14, 165, 233, 0.26)),
    var(--detail-image) center / cover no-repeat;
  box-shadow: var(--shadow);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 20rem),
    linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.42));
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
  min-height: 620px;
  padding: 64px;
}

.detail-poster {
  display: block;
  border-radius: 30px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.detail-copy h1 {
  color: #ffffff;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 1.05;
}

.lead-text {
  max-width: 820px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.9;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.detail-copy .primary-btn {
  display: inline-flex;
  margin-top: 28px;
}

.player-section {
  border-radius: 28px;
  padding: 18px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  font-size: 38px;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.38);
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  padding: 34px;
}

.content-main p {
  margin: 12px 0 24px;
  color: #475569;
  font-size: 17px;
  line-height: 2;
}

.content-side {
  border-radius: 22px;
  padding: 22px;
  background: #f8fbff;
}

.content-side dl {
  margin: 16px 0 0;
  display: grid;
  gap: 12px;
}

.content-side dt {
  color: var(--muted);
  font-weight: 800;
}

.content-side dd {
  margin: -8px 0 0;
  color: #0f172a;
  font-weight: 800;
  line-height: 1.7;
}

.is-hidden-card {
  display: none !important;
}

.site-footer {
  max-width: 1320px;
  margin: 30px auto 0;
  padding: 0 24px 30px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--muted);
}

.footer-inner strong {
  color: #0f172a;
}

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

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

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

  .hero-slide,
  .detail-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    max-width: 300px;
  }

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  main,
  .header-inner,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-shell,
  .detail-hero {
    min-height: 760px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 34px 24px 70px;
  }

  .detail-inner {
    min-height: 760px;
    padding: 34px 24px;
  }

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

  .hero-controls {
    right: 18px;
    bottom: 18px;
  }

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

  .big-search,
  .filter-bar {
    width: 100%;
  }

  .big-search {
    border-radius: 22px;
    flex-direction: column;
  }

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

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .large-list .rank-item a,
  .rank-item a {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 2;
  }
}

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

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

  .section-block,
  .page-hero,
  .wide-panel,
  .detail-content {
    padding: 22px;
  }
}
