:root {
  --primary: #0073e6;
  --primary-dark: #005bb3;
  --primary-soft: #e6f2ff;
  --accent: #e67300;
  --accent-soft: #fff3e6;
  --neutral-50: #f8f9fa;
  --neutral-100: #e9ecef;
  --neutral-200: #dee2e6;
  --neutral-500: #6c757d;
  --neutral-700: #343a40;
  --neutral-900: #0d0f12;
  --white: #ffffff;
  --shadow-sm: 0 4px 12px rgba(13, 15, 18, 0.08);
  --shadow-md: 0 14px 32px rgba(13, 15, 18, 0.14);
  --shadow-lg: 0 24px 60px rgba(13, 15, 18, 0.24);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1280px;
}

* {
  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(--neutral-900);
  background: var(--neutral-50);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(222, 226, 230, 0.72);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.98);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: clamp(20px, 2.2vw, 28px);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  font-size: 15px;
  box-shadow: 0 10px 20px rgba(0, 115, 230, 0.24);
}

.brand-text,
.text-gradient {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--neutral-700);
  font-weight: 600;
}

.site-nav a {
  position: relative;
  padding: 10px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--primary);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--neutral-100);
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--neutral-900);
  border-radius: 999px;
}

.page-main {
  padding-top: 76px;
  min-height: 72vh;
}

.hero-slider {
  position: relative;
  height: clamp(520px, 70vh, 760px);
  overflow: hidden;
  background: var(--neutral-900);
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 28%, rgba(0, 115, 230, 0.28), transparent 34%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.45) 48%, rgba(0, 0, 0, 0.24));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  color: var(--white);
  max-width: var(--container);
}

.hero-content h1 {
  max-width: 780px;
  margin: 14px 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.8;
}

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

.hero-tags span,
.detail-meta span,
.movie-card__meta span,
.movie-list-item__meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
}

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

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

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

.btn-primary {
  color: var(--white);
  background: var(--primary);
  box-shadow: 0 12px 26px rgba(0, 115, 230, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(0, 91, 179, 0.34);
}

.btn-primary--full {
  width: 100%;
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: var(--white);
  font-size: 34px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-control--prev {
  left: 24px;
}

.hero-control--next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  padding: 0;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--white);
}

.search-entry {
  position: relative;
  z-index: 2;
  margin-top: -54px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.search-entry h2,
.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  line-height: 1.2;
}

.search-entry p,
.page-hero p,
.text-card p {
  color: var(--neutral-500);
  line-height: 1.8;
}

.search-entry__form {
  display: flex;
  gap: 12px;
}

.search-entry__form input,
.filter-panel input,
.filter-panel select {
  min-height: 48px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  background: var(--white);
  padding: 0 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-entry__form input {
  flex: 1;
  min-width: 0;
}

.search-entry__form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 115, 230, 0.12);
}

.section-block {
  padding: 64px 0;
}

.section-block--light {
  background: var(--white);
}

.section-block--gradient {
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

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

.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
}

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

.eyebrow {
  display: inline-flex;
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  margin-bottom: 8px;
}

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

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

.movie-card {
  content-visibility: auto;
  contain-intrinsic-size: 340px;
}

.movie-card__link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card__link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.movie-card__poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--neutral-900);
}

.movie-card--wide .movie-card__poster {
  aspect-ratio: 16 / 9;
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card__link:hover img {
  transform: scale(1.08);
}

.movie-card__year,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.66);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 10px;
  right: auto;
  background: var(--accent);
}

.movie-card__body {
  padding: 16px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}

.movie-card__meta span {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  color: var(--accent);
  background: var(--accent-soft);
}

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

.category-tile {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--neutral-900);
  box-shadow: var(--shadow-sm);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 172px;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.72;
}

.category-tile span,
.category-tile small {
  position: absolute;
  left: 18px;
  color: var(--white);
}

.category-tile span {
  bottom: 42px;
  font-size: 21px;
  font-weight: 800;
}

.category-tile small {
  bottom: 20px;
  color: rgba(255, 255, 255, 0.82);
}

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

.movie-list-item a {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-list-item a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.movie-list-item img {
  width: 136px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.movie-list-item h3 {
  margin: 0;
  font-size: 20px;
}

.movie-list-item p {
  margin: 8px 0 12px;
  color: var(--neutral-500);
  line-height: 1.65;
}

.movie-list-item__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-rank {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 800;
}

.movie-list-item__meta span {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 115, 230, 0.35), transparent 28%),
    radial-gradient(circle at 76% 20%, rgba(230, 115, 0, 0.32), transparent 24%),
    linear-gradient(135deg, #090b10, #151a22 62%, #07080b);
}

.page-hero--compact {
  padding: 78px 0 64px;
}

.page-hero h1 {
  max-width: 860px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--neutral-500);
  font-size: 14px;
}

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

.breadcrumb--dark {
  color: rgba(255, 255, 255, 0.64);
}

.breadcrumb--dark a {
  color: var(--white);
}

.filter-panel {
  position: sticky;
  top: 88px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 30px;
  padding: 18px;
  border: 1px solid rgba(222, 226, 230, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.filter-panel__main {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(140px, 0.6fr));
  gap: 14px;
  width: 100%;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel__count {
  white-space: nowrap;
  color: var(--neutral-500);
}

.filter-panel__count strong {
  color: var(--primary);
}

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

.category-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-card__covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--neutral-900);
}

.category-card__covers img {
  width: 100%;
  height: 95px;
  object-fit: cover;
}

.category-card__body {
  padding: 24px;
}

.category-card__body h2 {
  margin: 0 0 10px;
}

.category-card__body p {
  color: var(--neutral-500);
  line-height: 1.7;
}

.category-card__body span {
  color: var(--primary);
  font-weight: 800;
}

.detail-top {
  padding: 28px 0;
  background: var(--neutral-900);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  padding-top: 36px;
}

.detail-primary,
.side-card,
.text-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.movie-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--neutral-900);
  overflow: hidden;
}

.player-video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--neutral-900);
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: var(--neutral-900);
  color: var(--white);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-cover__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(0, 115, 230, 0.12), transparent 26%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35));
}

.player-cover__button {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 22px 42px rgba(0, 115, 230, 0.38);
  font-size: 30px;
  padding-left: 5px;
}

.detail-content {
  padding: 26px;
}

.detail-content h1 {
  font-size: clamp(28px, 4vw, 44px);
}

.detail-meta {
  margin: 16px 0 20px;
}

.detail-meta span {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.detail-one-line {
  font-size: 18px;
  color: var(--neutral-700);
  line-height: 1.8;
}

.tag-row--detail {
  margin: 22px 0;
}

.detail-content section {
  margin-top: 28px;
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-content section p {
  margin: 0;
  color: var(--neutral-700);
  line-height: 1.9;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 98px;
  align-self: start;
}

.side-card {
  padding: 18px;
}

.side-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
}

.side-card h2 {
  margin: 0 0 16px;
  line-height: 1.35;
}

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

.text-card {
  padding: 28px;
}

.text-card--accent {
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

.site-footer {
  margin-top: 60px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--neutral-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-logo {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 24px;
  font-weight: 800;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

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

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

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.54);
}

[data-movie-card].is-hidden {
  display: none;
}

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 76px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
  }

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

  .site-nav a {
    padding: 14px 16px;
    border-radius: 12px;
  }

  .site-nav a:hover,
  .site-nav a.is-active {
    background: var(--primary-soft);
  }

  .site-nav a::after {
    display: none;
  }

  .hero-control {
    display: none;
  }

  .search-entry,
  .filter-panel,
  .footer-grid,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .search-entry {
    margin-top: -34px;
  }

  .search-entry__form,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

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

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

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

  .category-card__covers {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    bottom: 58px;
  }

  .hero-actions,
  .search-entry__form {
    display: grid;
  }

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

  .movie-list-item a {
    grid-template-columns: 98px 1fr;
    gap: 12px;
  }

  .movie-list-item img {
    width: 98px;
    aspect-ratio: 3 / 4;
  }

  .movie-list-item h3 {
    font-size: 17px;
  }

  .movie-list-item p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .detail-content,
  .text-card {
    padding: 20px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
