:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #2563eb;
  --blue-soft: #38bdf8;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.26), transparent 32rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.top-nav {
  max-width: 1280px;
  height: 66px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--blue-soft));
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.36);
  font-size: 14px;
}

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

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

.nav-link:hover,
.dropdown-button:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 180px;
  padding: 9px;
  display: grid;
  gap: 4px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.dropdown-panel a {
  padding: 9px 12px;
  color: #cbd5e1;
  border-radius: 11px;
}

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

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

.mobile-toggle span {
  width: 20px;
  height: 2px;
  background: #e2e8f0;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 10px 20px 18px;
  border-top: 1px solid var(--line);
  background: #0f172a;
}

.mobile-panel.is-open {
  display: grid;
  gap: 6px;
}

.mobile-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
}

.mobile-link.is-active,
.mobile-link:hover {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 44%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 90px 24px 76px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: #facc15;
  background: rgba(250, 204, 21, 0.11);
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 690px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-tags span,
.tag-row span {
  padding: 4px 10px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 999px;
  font-size: 13px;
}

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

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

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

.ghost-button {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(147, 197, 253, 0.22);
}

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

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.58);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #2563eb;
}

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

.home-shell {
  padding-top: 56px;
  padding-bottom: 72px;
}

.page-top {
  padding-top: 44px;
  padding-bottom: 76px;
}

.content-section {
  margin-bottom: 76px;
}

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

.section-heading h2,
.page-hero-small h1,
.detail-intro h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero-small p,
.detail-intro .lead {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--muted-strong);
}

.section-heading a,
.inline-link {
  color: #60a5fa;
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.74);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  padding: 4px 9px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.94);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: #93c5fd;
}

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

.card-meta {
  gap: 6px;
  font-size: 12px;
}

.card-meta span {
  min-height: 24px;
  padding: 2px 8px;
}

.tag-row {
  margin-top: 11px;
}

.tag-row span {
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 1;
}

.category-tile span {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  margin-top: 8px;
  color: #cbd5e1;
}

.category-tile:hover img {
  opacity: 0.46;
  transform: scale(1.06);
}

.ranking-panel,
.text-panel,
.page-hero-small,
.detail-hero,
.player-wrap,
.category-overview-card {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ranking-panel {
  padding: 20px;
  position: sticky;
  top: 88px;
}

.panel-title {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-item:hover {
  background: rgba(37, 99, 235, 0.16);
}

.rank-num {
  color: #facc15;
  font-weight: 900;
}

.rank-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 11px;
}

.rank-title {
  color: #ffffff;
  font-weight: 800;
}

.rank-item small {
  grid-column: 3;
  color: var(--muted);
}

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

.mini-card {
  padding: 12px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.mini-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 15px;
}

.mini-card span {
  color: #ffffff;
  font-weight: 800;
}

.mini-card small {
  color: var(--muted);
}

.page-hero-small {
  margin-bottom: 32px;
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 22rem),
    rgba(15, 23, 42, 0.78);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #60a5fa;
}

.breadcrumb strong {
  color: #e2e8f0;
}

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

.category-overview-card {
  padding: 18px;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
}

.category-cover-stack {
  height: 150px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.category-cover-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 22px;
}

.category-overview-card p {
  margin: 0 0 12px;
  color: var(--muted-strong);
}

.search-panel {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(4, minmax(120px, 170px));
  gap: 12px;
}

.compact-search {
  grid-template-columns: minmax(240px, 460px);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  outline: 0;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.search-status {
  min-height: 24px;
  margin-top: 14px;
  color: var(--muted);
}

.search-grid .movie-card.is-hidden,
.movie-grid .movie-card.is-hidden {
  display: none;
}

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

.ranking-card {
  position: relative;
}

.ranking-number {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 4;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  background: #facc15;
  border-radius: 50%;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.detail-page {
  max-width: 1180px;
}

.detail-hero {
  padding: 26px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
}

.detail-intro h1 {
  margin-bottom: 16px;
}

.detail-intro .lead {
  font-size: 18px;
}

.detail-meta {
  margin-top: 20px;
}

.large-tags {
  margin: 20px 0 28px;
}

.player-section {
  margin: 34px 0;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-radius: 50%;
  box-shadow: 0 22px 46px rgba(37, 99, 235, 0.45);
  font-size: 34px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 58px;
}

.text-panel {
  padding: 28px;
}

.text-panel h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), #020617);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px 34px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 30px;
}

.footer-grid p {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #94a3b8;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 30px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
  text-align: center;
}

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

  .split-section,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

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

@media (max-width: 760px) {
  .top-nav {
    padding: 0 16px;
  }

  .nav-center {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

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

  .hero-content {
    padding: 80px 18px 76px;
  }

  .hero-shade {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.82) 62%, rgba(2, 6, 23, 0.4) 100%);
  }

  .hero-dots {
    left: 18px;
    right: auto;
    bottom: 32px;
  }

  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-flex;
    margin-top: 12px;
  }

  .movie-grid,
  .compact-grid,
  .mini-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-grid,
  .detail-content,
  .split-section,
  .footer-grid,
  .search-panel {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .search-panel input {
    grid-column: 1 / -1;
  }

  .page-hero-small {
    padding: 24px;
  }

  .category-overview-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .category-cover-stack {
    height: 130px;
  }

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

@media (max-width: 480px) {
  .brand,
  .footer-brand {
    font-size: 18px;
  }

  .movie-grid,
  .compact-grid,
  .mini-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-grid,
  .detail-content,
  .split-section,
  .footer-grid,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .page-top {
    padding-top: 28px;
  }
}
