:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #ffffff;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-2: #f97316;
  --accent-soft: rgba(245, 158, 11, 0.18);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --header-h: 72px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 36rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

main {
  padding-top: var(--header-h);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: var(--header-h);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.site-logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28);
  font-size: 14px;
}

.site-logo-text {
  font-size: 21px;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--soft);
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 285px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
  height: 40px;
  padding: 0 13px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.76);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button {
  height: 40px;
  padding: 0 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.24);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.62);
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.hero-section {
  position: relative;
  min-height: calc(80vh - var(--header-h));
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms 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-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.2) 44%, rgba(2, 6, 23, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(80vh - var(--header-h));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 0 90px;
}

.hero-kicker,
.page-kicker,
.section-heading span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: clamp(38px, 8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-movie-title {
  display: block;
  margin-top: 18px;
  color: #fbbf24;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.1;
  font-weight: 850;
}

.hero-content p {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  font-size: 13px;
}

.hero-tags span {
  padding: 7px 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 32px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
}

.secondary-button {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.hero-search {
  display: flex;
  width: min(520px, 100%);
  margin-top: 24px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(14px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 0 14px;
}

.hero-search button {
  min-width: 90px;
  height: 42px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  cursor: pointer;
}

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

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

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

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

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

.page-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 76px;
}

.page-hero {
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 30rem);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 900px;
  margin: 18px 0 0;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.8;
}

.section-block {
  margin-top: 56px;
}

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

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
}

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

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

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 24px 50px rgba(245, 158, 11, 0.12);
}

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.small .movie-poster,
.movie-grid.compact .movie-poster {
  aspect-ratio: 3 / 4;
}

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

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

.movie-poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 56%);
  opacity: 0.88;
}

.movie-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: rgba(245, 158, 11, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-card-meta-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-card-meta-top span,
.movie-card-meta-bottom,
.rank-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  color: white;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 750;
}

.movie-card-meta-top span:first-child {
  background: rgba(245, 158, 11, 0.9);
}

.movie-card-meta-bottom {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.rank-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  color: #111827;
  background: #fbbf24;
}

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

.movie-card-body h3 {
  margin: 0;
  color: white;
  font-size: 17px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-card-link:hover h3 {
  color: #fbbf24;
}

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

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

.category-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.category-card:hover img {
  transform: scale(1.08);
}

.category-card-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.18));
}

.category-card-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.category-card-content span {
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
}

.category-card-content h3 {
  margin: 6px 0 8px;
  font-size: 22px;
}

.category-card-content p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
}

.filter-panel {
  margin-top: 34px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
}

.filter-grid span {
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.filter-grid input,
.filter-grid select {
  min-height: 46px;
  padding: 0 13px;
}

.empty-filter {
  display: none;
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.74);
  text-align: center;
}

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

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

.player-shell {
  margin-top: 0;
  background: #000;
  border-bottom: 1px solid var(--line);
}

.player-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.22));
  z-index: 3;
}

.player-cover.is-hidden {
  display: none;
  pointer-events: none;
}

.player-cover h2 {
  max-width: 780px;
  margin: 0 0 16px;
  font-size: clamp(24px, 4vw, 42px);
}

.player-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-play-button {
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
  font-size: 24px;
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.3);
}

.player-small-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

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

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

.detail-card,
.related-box {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.detail-card {
  padding: 28px;
}

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

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

.meta-pill,
.tag-pill {
  padding: 7px 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 24px;
}

.content-panel {
  margin-top: 22px;
  padding: 22px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
}

.content-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.content-panel p {
  margin: 0;
  color: var(--soft);
  line-height: 1.9;
}

.content-panel p + p {
  margin-top: 14px;
}

.related-box {
  position: sticky;
  top: 94px;
  padding: 20px;
}

.related-box h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 9px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: rgba(148, 163, 184, 0.1);
}

.related-item img {
  width: 96px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.related-item h3 {
  display: -webkit-box;
  margin: 0 0 6px;
  color: white;
  font-size: 14px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item:hover h3 {
  color: #fbbf24;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.horizontal-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-color: var(--accent) rgba(15, 23, 42, 0.8);
}

.horizontal-row .movie-card {
  width: 260px;
  flex: 0 0 260px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 34px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.footer-brand p,
.site-footer li,
.footer-bottom p {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.site-footer a:hover {
  color: #fbbf24;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1080px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

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

  .filter-grid,
  .movie-detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .related-box {
    position: static;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  .header-inner {
    width: min(100% - 24px, 1180px);
  }

  .site-logo-text {
    font-size: 18px;
  }

  .hero-section,
  .hero-content {
    min-height: calc(88vh - var(--header-h));
  }

  .hero-content {
    padding-bottom: 104px;
  }

  .hero-control {
    display: none;
  }

  .page-hero {
    padding: 30px 22px;
  }

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

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

  .movie-card-body h3 {
    font-size: 15px;
  }

  .player-cover {
    padding: 20px;
  }

  .player-play-button {
    width: 58px;
    height: 58px;
  }

  .player-small-button {
    display: none;
  }

  .detail-card {
    padding: 20px;
  }

  .related-item {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .related-item img {
    width: 86px;
    height: 58px;
  }
}
