* {
  box-sizing: border-box;
}

:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #172033;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --teal-100: #ccfbf1;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
  --shadow-dark: 0 26px 70px rgba(2, 6, 23, 0.42);
  --radius-xl: 1.25rem;
  --radius-2xl: 1.75rem;
}

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(--slate-900);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f1f5f9 100%);
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-800), var(--slate-700), var(--slate-800));
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(14px);
}

.header-inner,
.footer-inner,
.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--slate-900);
  font-weight: 900;
  background: linear-gradient(135deg, var(--teal-400), var(--teal-100));
  box-shadow: 0 12px 24px rgba(45, 212, 191, 0.24);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--slate-300);
  font-size: 0.75rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.93rem;
  font-weight: 650;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--teal-400);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.1s ease;
  background-position: center;
  background-size: cover;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(45, 212, 191, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.74) 46%, rgba(15, 23, 42, 0.32) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 72vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(260px, 0.72fr);
  align-items: center;
  gap: 42px;
  padding: 54px 0;
}

.hero-copy {
  max-width: 700px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  color: var(--teal-100);
  background: rgba(20, 184, 166, 0.2);
  backdrop-filter: blur(12px);
  padding: 7px 14px;
  font-size: 0.88rem;
  font-weight: 750;
}

.hero-title {
  margin: 20px 0 12px;
  font-size: clamp(2.3rem, 7vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.hero-site-title {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.18rem, 2vw, 1.65rem);
  font-weight: 750;
}

.hero-desc {
  max-width: 640px;
  margin: 0 0 24px;
  color: var(--slate-200);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.hero-meta,
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--slate-200);
  background: rgba(255, 255, 255, 0.16);
  padding: 6px 11px;
  font-size: 0.85rem;
  font-weight: 650;
}

.hero-actions,
.section-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 10px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: var(--teal-500);
  box-shadow: 0 16px 30px rgba(20, 184, 166, 0.32);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--teal-600);
}

.btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.btn-light {
  color: var(--slate-900);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.hero-poster {
  position: relative;
  display: grid;
  justify-items: end;
}

.hero-poster-card {
  width: min(360px, 88vw);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(18px);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, var(--slate-800), var(--teal-600));
}

.hero-poster-caption {
  padding: 18px;
}

.hero-poster-caption strong {
  display: block;
  font-size: 1.08rem;
}

.hero-poster-caption span {
  display: block;
  margin-top: 4px;
  color: var(--slate-200);
  font-size: 0.88rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 5;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: var(--teal-400);
}

.page-hero,
.detail-hero {
  color: var(--white);
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.2), transparent 38%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
  padding: 74px 0;
}

.page-hero h1,
.detail-copy h1 {
  margin: 12px 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--slate-200);
  font-size: 1.05rem;
}

.section {
  padding: 64px 0;
}

.section.compact {
  padding: 42px 0;
}

.section-dark {
  width: min(1180px, calc(100% - 32px));
  margin: 64px auto;
  color: var(--white);
  background:
    radial-gradient(circle at 92% 8%, rgba(20, 184, 166, 0.24), transparent 34%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
  border-radius: var(--radius-2xl);
  padding: 42px;
  box-shadow: var(--shadow-dark);
}

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

.section-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-header p {
  margin: 8px 0 0;
  color: var(--slate-500);
}

.section-dark .section-header p {
  color: var(--slate-300);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  height: 100%;
  border-radius: var(--radius-xl);
  color: var(--slate-900);
  background: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.movie-card:focus-within {
  transform: translateY(-8px);
  box-shadow: 0 26px 55px rgba(15, 23, 42, 0.18);
}

.cover-link {
  position: relative;
  display: block;
  overflow: hidden;
  color: inherit;
}

.card-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, var(--slate-800), var(--teal-600));
  transition: transform 0.3s ease;
}

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

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(10px);
}

.card-badge {
  top: 12px;
  right: 12px;
  padding: 5px 10px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 36px;
  height: 36px;
  background: var(--teal-500);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.28;
}

.card-body h3 a:hover,
.card-body h3 a:focus-visible {
  color: var(--teal-600);
}

.card-body p {
  margin: 0 0 14px;
  color: var(--slate-600);
  font-size: 0.92rem;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  color: var(--slate-500);
  font-size: 0.82rem;
}

.type-chip {
  border-radius: 8px;
  color: var(--teal-600);
  background: rgba(20, 184, 166, 0.12);
  padding: 3px 8px;
  font-weight: 750;
}

.feature-card {
  display: grid;
  grid-template-columns: 0.92fr 1fr;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.feature-card img {
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--slate-800), var(--teal-600));
}

.feature-copy {
  padding: 24px;
}

.feature-copy h3 {
  margin: 10px 0 8px;
  font-size: 1.45rem;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: var(--white);
  min-height: 220px;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
  box-shadow: var(--shadow-soft);
  padding: 26px;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -52px;
  top: -52px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.2);
}

.category-tile h2,
.category-tile h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
}

.category-tile p,
.category-tile .mini-list {
  position: relative;
  z-index: 1;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mini-list a {
  border-radius: 999px;
  color: var(--slate-100);
  background: rgba(255, 255, 255, 0.14);
  padding: 6px 10px;
  font-size: 0.83rem;
}

.catalog-tools,
.search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 190px;
  gap: 12px;
  margin: 28px 0 30px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.catalog-tools input,
.catalog-tools select,
.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 14px;
  color: var(--slate-900);
  background: var(--white);
  padding: 0 14px;
  outline: none;
}

.catalog-tools input:focus,
.catalog-tools select:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

.empty-state {
  display: none;
  border-radius: var(--radius-xl);
  padding: 34px;
  text-align: center;
  color: var(--slate-600);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-300);
  font-size: 0.9rem;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--teal-400);
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.44fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

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

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, var(--slate-800), var(--teal-600));
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.detail-tags .tag-pill {
  color: var(--teal-100);
  background: rgba(20, 184, 166, 0.18);
}

.player-section {
  padding: 56px 0 30px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--slate-950);
  box-shadow: var(--shadow-dark);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: var(--white);
  border: 0;
  background: radial-gradient(circle at center, rgba(20, 184, 166, 0.22), rgba(2, 6, 23, 0.76));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--slate-950);
  background: var(--teal-400);
  box-shadow: 0 18px 40px rgba(45, 212, 191, 0.34);
}

.play-ring::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 27px solid currentColor;
}

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

.prose-card,
.aside-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

.prose-card h2,
.aside-card h2,
.aside-card h3 {
  margin-top: 0;
}

.prose-card p {
  color: var(--slate-700);
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  padding-bottom: 10px;
}

.info-list dt {
  color: var(--slate-500);
}

.info-list dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 700;
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 72px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--slate-800), var(--teal-600));
}

.related-item strong {
  display: block;
  line-height: 1.28;
}

.related-item span {
  display: block;
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 0.82rem;
}

.related-item:hover strong,
.related-item:focus-visible strong {
  color: var(--teal-600);
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.pagination-links a {
  border-radius: 999px;
  color: var(--slate-700);
  background: var(--white);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  padding: 8px 13px;
  font-weight: 750;
}

.pagination-links a:hover,
.pagination-links a:focus-visible {
  color: var(--white);
  background: var(--teal-600);
}

.site-footer {
  margin-top: 60px;
  color: var(--slate-300);
  background: var(--slate-950);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

.footer-title {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 850;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: flex-end;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--teal-400);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px 0;
  text-align: center;
  color: var(--slate-500);
  font-size: 0.9rem;
}

@media (max-width: 1040px) {
  .grid-5 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .aside-card {
    order: -1;
  }
}

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

  .nav-links {
    position: fixed;
    inset: 68px 0 auto 0;
    display: grid;
    gap: 0;
    padding: 12px 16px 20px;
    background: var(--slate-800);
    box-shadow: 0 22px 40px rgba(2, 6, 23, 0.36);
    transform: translateY(-130%);
    transition: transform 0.24s ease;
  }

  body.nav-open .nav-links {
    transform: translateY(0);
  }

  .nav-links a {
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

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

  .hero-poster {
    justify-items: start;
  }

  .hero-poster-card {
    width: min(280px, 70vw);
  }

  .catalog-tools,
  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .footer-inner,
  .container {
    width: min(100% - 24px, 1180px);
  }

  .section {
    padding: 42px 0;
  }

  .section-dark {
    width: min(100% - 24px, 1180px);
    padding: 24px;
    margin: 42px auto;
  }

  .section-header {
    display: block;
  }

  .grid-5,
  .grid-4,
  .grid-3 {
    grid-template-columns: 1fr;
  }

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

  .hero-title {
    font-size: clamp(2rem, 12vw, 3.3rem);
  }

  .page-hero,
  .detail-hero {
    padding: 48px 0;
  }

  .prose-card,
  .aside-card {
    padding: 22px;
  }
}
