:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #e5e7eb;
  --bright: #ffffff;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --gold: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 32rem),
    radial-gradient(circle at 75% 12%, rgba(34, 211, 238, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

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

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--bright);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

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

.nav-link,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  color: #cbd5e1;
  border: 0;
  background: transparent;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.dropdown-toggle:hover {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.28);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 46px;
  left: 0;
  width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.dropdown-link:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
}

.mobile-menu-button {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 24px 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.72);
  color: #d1d5db;
}

.page-main,
.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 70px;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.25) 76%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 72vh;
  margin: 0 auto;
  padding: 110px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.58fr);
  align-items: end;
  gap: 42px;
}

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

.hero-kicker,
.section-kicker,
.eyebrow {
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-copy h1 {
  margin: 0;
  color: var(--bright);
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 660px;
  margin-top: 20px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn-primary,
.btn-ghost,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.34);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.44);
}

.btn-ghost,
.section-more {
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.34);
  background: rgba(15, 23, 42, 0.66);
}

.btn-ghost:hover,
.section-more:hover {
  border-color: rgba(96, 165, 250, 0.74);
  background: rgba(37, 99, 235, 0.22);
}

.hero-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.hero-panel h2 {
  margin: 16px 0 8px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.hero-panel p {
  color: #cbd5e1;
  line-height: 1.65;
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(37, 99, 235, 0.72);
}

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

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

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

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

.hero-dot.is-active {
  background: #60a5fa;
  width: 54px;
}

.quick-search {
  max-width: 1280px;
  margin: -36px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 8;
}

.quick-search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.quick-search input,
.search-input,
.filter-select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  outline: none;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.62);
}

.quick-search input:focus,
.search-input:focus,
.filter-select:focus {
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.content-section {
  margin-top: 54px;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #ffffff;
  font-weight: 850;
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.82) 100%);
}

.poster-score,
.poster-play {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.poster-score {
  top: 10px;
  right: 10px;
  min-width: 42px;
  height: 28px;
  color: #111827;
  background: var(--gold);
}

.poster-play {
  left: 12px;
  bottom: 12px;
  height: 30px;
  padding: 0 12px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

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

.movie-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta,
.card-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-line {
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 8px;
}

.category-pills a,
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.6);
}

.category-pills a:hover {
  border-color: rgba(96, 165, 250, 0.65);
  background: rgba(37, 99, 235, 0.28);
}

.page-title {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.2), transparent 24rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.page-title h1 {
  font-size: clamp(32px, 5vw, 58px);
}

.page-title p {
  max-width: 820px;
  margin-top: 14px;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.8;
}

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

.category-box {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  transition: 0.22s ease;
}

.category-box:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.56);
}

.category-box h2 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 850;
  margin: 0 0 10px;
}

.category-box p {
  color: #cbd5e1;
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a {
  color: #bfdbfe;
  font-size: 13px;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 22px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.6);
}

.rank-num {
  color: var(--gold);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  background: #1e293b;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.rank-info p,
.rank-info div {
  margin-top: 6px;
  color: #cbd5e1;
  line-height: 1.55;
}

.rank-badge,
.rank-score {
  color: #111827;
  background: var(--gold);
  border-radius: 999px;
  font-weight: 900;
  padding: 6px 10px;
}

.side-panel {
  position: sticky;
  top: 98px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.wide-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.55);
}

.wide-poster {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  background: #1e293b;
}

.wide-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wide-body h3 {
  margin: 6px 0 6px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.wide-body p {
  margin: 0 0 6px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) saturate(1.2);
  transform: scale(1.08);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.62), #020617 90%);
}

.detail-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #1e293b;
}

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

.detail-title h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
}

.detail-title p {
  max-width: 840px;
  margin-top: 16px;
  color: #d1d5db;
  line-height: 1.8;
  font-size: 17px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.player-card {
  margin-top: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.78)),
    rgba(2, 6, 23, 0.2);
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 20px 52px rgba(37, 99, 235, 0.42);
}

.play-circle svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-top: 28px;
}

.detail-block {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
}

.detail-block + .detail-block {
  margin-top: 18px;
}

.detail-block h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 850;
}

.detail-block p {
  color: #d1d5db;
  line-height: 1.9;
}

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

.search-panel {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.66);
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: #cbd5e1;
  text-align: center;
  background: rgba(15, 23, 42, 0.6);
}

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

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.4fr) minmax(260px, 0.8fr);
  gap: 24px;
}

.footer-inner p {
  max-width: 520px;
  color: #94a3b8;
  margin-top: 10px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 10px 16px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #60a5fa;
}

.footer-copy {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 26px;
  color: #64748b;
  font-size: 14px;
}

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

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

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

  .hero-content,
  .detail-inner,
  .detail-content,
  .rank-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: none;
  }

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 64px;
    padding: 0 16px;
  }

  .page-main,
  .page-shell {
    padding: 24px 16px 54px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 74vh;
  }

  .hero-content {
    padding: 92px 16px 76px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

  .quick-search {
    padding: 0 16px;
  }

  .quick-search-box,
  .search-controls {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-item {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .rank-badge {
    display: none;
  }

  .detail-inner {
    padding: 28px 16px;
  }

  .detail-poster {
    max-width: 190px;
  }

  .footer-inner {
    padding: 28px 16px;
  }
}
