:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --sky: #e0f2fe;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-strong: 0 25px 70px rgba(15, 23, 42, 0.20);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.55), #ffffff 28rem, #f8fafc 100%);
  line-height: 1.65;
}

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

img,
video {
  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.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1240px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

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

.brand-text {
  font-size: 24px;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand.compact .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.brand.compact .brand-text {
  font-size: 21px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-link:hover,
.nav-link.is-active {
  color: var(--blue);
  background: #eff6ff;
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 13px;
  color: var(--blue);
  background: #eff6ff;
  cursor: pointer;
}

.hero {
  position: relative;
  height: 60vh;
  min-height: 520px;
  overflow: hidden;
  color: #ffffff;
}

.hero-media,
.hero-media img,
.hero-shade,
.hero-blue {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.44) 55%, rgba(0, 0, 0, 0.12));
}

.hero-blue {
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.58), rgba(14, 165, 233, 0.12), transparent 72%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #bae6fd;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-kicker::before,
.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 26px var(--cyan);
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: 19px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--blue);
  background: #dbeafe;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

.hero-actions,
.detail-info .btn {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  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: #ffffff;
  background: var(--blue);
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.34);
}

.btn.primary:hover {
  background: var(--blue-dark);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(12px);
}

.btn.light {
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 74px 24px;
}

.content-section.soft-panel {
  max-width: none;
  background: linear-gradient(180deg, #f8fafc, #eef6ff);
}

.content-section.soft-panel > .section-head,
.content-section.soft-panel > .movie-grid {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

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

.section-more {
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: #dbeafe;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.08);
  filter: brightness(0.72);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.74);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(10px);
}

.duration-badge {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.movie-meta-row,
.card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.movie-meta-row {
  margin-bottom: 10px;
}

.pill {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.rating {
  color: #ca8a04;
  font-weight: 800;
  font-size: 13px;
}

.movie-card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card-title a:hover {
  color: var(--blue);
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-info {
  margin-bottom: 12px;
  color: #6b7280;
  font-size: 13px;
}

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

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

.category-card {
  min-height: 178px;
  padding: 24px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card.large {
  min-height: 210px;
}

.category-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.25);
}

.category-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 23px;
}

.category-card em {
  display: block;
  color: var(--blue);
  font-style: normal;
  font-weight: 800;
}

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

.genre-cloud,
.topic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.genre-cloud a,
.topic-link {
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--blue);
  background: #eff6ff;
  font-weight: 800;
}

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

.topic-link {
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.cta-section {
  margin-top: 24px;
  padding: 86px 24px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.cta-section h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
}

.cta-section p {
  margin: 0 auto 28px;
  max-width: 720px;
  color: #e0f2fe;
}

.page-hero {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.page-hero-bg,
.page-hero-bg img,
.page-hero-overlay {
  position: absolute;
  inset: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.page-hero-overlay {
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.85), rgba(37, 99, 235, 0.62), rgba(6, 182, 212, 0.42));
}

.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 86px 24px 70px;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.listing-section {
  padding-top: 38px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.filter-line {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.filter-line label {
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.filter-line input,
.filter-line select {
  width: 100%;
  height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 0 13px;
  color: #111827;
  background: #ffffff;
  outline: none;
}

.filter-line input:focus,
.filter-line select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-actions {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.filter-actions strong {
  color: var(--blue);
  font-size: 22px;
}

.filter-actions button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--blue);
  background: #dbeafe;
  font-weight: 800;
  cursor: pointer;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.detail-backdrop,
.detail-backdrop img,
.detail-overlay {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) scale(1.06);
}

.detail-overlay {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.88));
}

.detail-shell {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 24px 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
  color: #dbeafe;
  font-size: 14px;
}

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

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

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.44);
}

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.detail-one-line {
  max-width: 900px;
  margin: 0 0 18px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-content {
  padding-top: 54px;
}

.detail-content > h2 {
  margin: 0 0 18px;
  font-size: 32px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.52));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-button {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #ffffff;
  font-size: 34px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

.player-overlay strong {
  font-size: 20px;
}

.text-panel {
  margin-top: 28px;
  padding: 28px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.text-panel h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.text-panel p {
  margin: 0 0 22px;
  color: #374151;
  font-size: 17px;
}

.text-panel p:last-child {
  margin-bottom: 0;
}

.sitemap-section h1,
.sitemap-section h2 {
  margin: 0 0 18px;
}

.sitemap-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 34px;
}

.sitemap-groups > div {
  padding: 22px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.sitemap-groups a {
  display: inline-flex;
  margin: 0 10px 10px 0;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--blue);
  background: #eff6ff;
  font-weight: 800;
}

.sitemap-movies {
  margin: 0;
  padding: 0;
  columns: 4 220px;
  list-style: none;
}

.sitemap-movies li {
  break-inside: avoid;
  margin: 0 0 8px;
}

.sitemap-movies a {
  color: #374151;
}

.sitemap-movies a:hover {
  color: var(--blue);
}

.site-footer {
  position: relative;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.footer-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 42px;
}

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

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

.footer-columns h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.footer-columns a {
  display: block;
  margin-bottom: 8px;
  color: #4b5563;
}

.footer-columns a:hover {
  color: var(--blue);
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.32);
  cursor: pointer;
}

.is-hidden-by-filter {
  display: none;
}

@media (min-width: 1024px) {
  .hero {
    height: 85vh;
  }
}

@media (max-width: 1120px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .filter-line.primary {
    grid-column: span 3;
  }

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero {
    min-height: 560px;
  }

  .movie-grid,
  .category-grid,
  .topic-grid,
  .sitemap-groups,
  .footer-shell,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .filter-line.primary {
    grid-column: auto;
  }

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

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

@media (max-width: 560px) {
  .nav-shell,
  .hero-content,
  .content-section,
  .page-hero-content,
  .detail-shell,
  .footer-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero h1,
  .detail-info h1 {
    letter-spacing: -0.04em;
  }

  .movie-grid {
    gap: 18px;
  }

  .poster-wrap {
    height: 220px;
  }

  .player-button {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }
}
