:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --orange-500: #f97316;
  --pink-500: #ec4899;
  --green-500: #22c55e;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.10);
}

* {
  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(--slate-900);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 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;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 12px 35px rgba(2, 6, 23, 0.28);
}

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

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

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, #38bdf8, var(--cyan-500), var(--blue-500));
  box-shadow: 0 12px 25px rgba(6, 182, 212, 0.34);
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-name {
  font-size: 20px;
  letter-spacing: 0.03em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  position: relative;
  padding: 22px 0;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 14px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan-500);
  transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  padding: 0 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  background: rgba(255, 255, 255, 0.10);
  color: var(--white);
}

.hero-carousel {
  position: relative;
  height: 560px;
  min-height: 520px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

.hero-track,
.hero-slide,
.hero-slide img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background:
    radial-gradient(circle at 72% 30%, rgba(6, 182, 212, 0.25), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.25) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.32);
}

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

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.90);
}

.hero-meta,
.hero-tags,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-meta span,
.hero-tags span {
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.hero-meta span {
  padding: 7px 13px;
  font-weight: 700;
}

.hero-tags {
  margin-top: 18px;
}

.hero-tags span {
  padding: 6px 12px;
  font-size: 13px;
}

.hero-actions {
  margin-top: 28px;
}

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

.primary-button {
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
  box-shadow: 0 14px 28px rgba(6, 182, 212, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.soft-button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.soft-button {
  color: var(--cyan-600);
  background: #ecfeff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  font-size: 38px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.page-section {
  padding: 72px 0;
}

.page-section.tight {
  padding: 44px 0;
}

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

.section-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-title-group h1,
.section-title-group h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.2;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
  box-shadow: 0 14px 24px rgba(6, 182, 212, 0.22);
}

.section-more {
  color: var(--cyan-600);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link,
.category-card,
.info-panel,
.detail-card,
.search-panel,
.list-card a {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: var(--shadow-soft);
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), transparent);
}

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

.movie-card-link:hover .movie-cover img {
  transform: scale(1.07);
}

.movie-year {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--cyan-600);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--slate-600);
  line-height: 1.65;
  font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--slate-700);
  background: var(--slate-100);
  font-size: 12px;
  font-weight: 700;
}

.feature-band {
  border-radius: 34px;
  padding: 44px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.region-block {
  margin-top: 36px;
}

.region-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.region-head h3 {
  margin: 0;
  font-size: 26px;
}

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

.list-card a {
  display: grid;
  grid-template-columns: auto 78px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.list-card img {
  width: 78px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: var(--slate-900);
}

.list-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.list-card p {
  margin: 0 0 6px;
  color: var(--slate-600);
  line-height: 1.6;
}

.list-card span {
  color: var(--cyan-600);
  font-size: 13px;
  font-weight: 800;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange-500), var(--pink-500));
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 18% 20%, rgba(6, 182, 212, 0.35), transparent 26%),
    linear-gradient(135deg, var(--cyan-600), var(--blue-600));
}

.page-hero .page-container {
  padding: 72px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.breadcrumb a {
  font-weight: 800;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.8;
}

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

.category-card {
  display: block;
  min-height: 210px;
  padding: 28px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -52px;
  bottom: -58px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(37, 99, 235, 0.16));
}

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

.category-card p {
  margin: 0 0 28px;
  color: var(--slate-600);
  line-height: 1.72;
}

.search-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  padding: 18px;
  margin-bottom: 30px;
  border-radius: 24px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--slate-900);
  background: var(--white);
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 30px;
  align-items: start;
}

.player-box {
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
}

.watch-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.watch-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(6, 182, 212, 0.16), transparent 38%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.20));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-play {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
  box-shadow: 0 18px 36px rgba(6, 182, 212, 0.34);
}

.player-error {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  padding: 12px 16px;
  border-radius: 14px;
  color: var(--white);
  text-align: center;
  background: rgba(220, 38, 38, 0.85);
}

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

.detail-card,
.info-panel {
  padding: 28px;
  border-radius: 26px;
}

.detail-card {
  margin-top: 26px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--slate-200);
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--slate-700);
  background: var(--slate-100);
  font-weight: 800;
}

.detail-meta span:first-child {
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
}

.detail-card h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-card p {
  margin: 0 0 24px;
  color: var(--slate-700);
  font-size: 16px;
  line-height: 1.9;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.info-panel {
  position: sticky;
  top: 92px;
}

.info-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 20px;
  background: var(--slate-900);
}

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

.info-list div {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--slate-200);
}

.info-list dt {
  margin-bottom: 4px;
  color: var(--slate-500);
  font-size: 13px;
}

.info-list dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 800;
  line-height: 1.55;
}

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

.site-footer {
  margin-top: 74px;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-inner {
  padding: 48px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-grid p {
  max-width: 520px;
  margin: 18px 0 0;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 18px;
}

.footer-grid a {
  display: block;
  margin: 10px 0;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: var(--cyan-500);
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
  box-shadow: var(--shadow-soft);
}

.back-to-top.is-visible {
  display: block;
}

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.compact-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .info-panel {
    position: static;
  }

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

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

  .mobile-menu-button {
    display: block;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 96px;
  }

  .page-section {
    padding: 48px 0;
  }

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

  .movie-grid,
  .movie-grid.compact-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .feature-band {
    padding: 28px 18px;
    border-radius: 26px;
  }

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

  .list-card a {
    grid-template-columns: auto 72px 1fr;
  }

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