:root {
  color-scheme: dark;
  --page-bg: #0f1419;
  --panel-bg: rgba(15, 23, 42, 0.78);
  --panel-soft: rgba(30, 41, 59, 0.58);
  --line: rgba(100, 116, 139, 0.32);
  --line-strong: rgba(148, 163, 184, 0.45);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --white: #ffffff;
  --accent: #e5e7eb;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.12), transparent 32rem),
    linear-gradient(180deg, #111827 0%, var(--page-bg) 38%, #090d12 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.section-container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(100, 116, 139, 0.24);
  background: rgba(15, 20, 25, 0.82);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(226, 232, 240, 0.48);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.28), rgba(71, 85, 105, 0.18));
  box-shadow: 0 0 28px rgba(226, 232, 240, 0.16);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.desktop-nav a,
.mobile-nav a {
  color: var(--soft);
  padding: 9px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.09);
}

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

.global-search input,
.filter-row input,
.filter-row select {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.global-search input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

.global-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.global-search button,
.primary-btn {
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  color: #0f172a;
  box-shadow: 0 16px 36px rgba(148, 163, 184, 0.18);
}

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

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.ghost-btn.small {
  padding: 9px 14px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.hero-slider {
  position: relative;
  min-height: 700px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  transform: scale(1.05);
  filter: blur(10px) brightness(0.46) saturate(1.08);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, #0f1419 0%, rgba(15, 20, 25, 0.15) 40%, transparent 100%);
}

.hero-content {
  position: relative;
  min-height: 700px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 430px);
  align-items: center;
  gap: 54px;
  padding-top: 42px;
}

.eyebrow {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.sub-hero h1,
.detail-copy h1 {
  margin: 16px 0 18px;
  color: var(--white);
  font-size: clamp(42px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-copy p,
.sub-hero p,
.detail-one-line {
  max-width: 760px;
  color: var(--soft);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.detail-meta-list,
.detail-tags,
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-meta-list span,
.detail-tags a,
.movie-meta span {
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--soft);
  padding: 7px 11px;
  font-size: 13px;
}

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

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.26);
  border-radius: 32px;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.hero-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster-card:hover .hero-poster {
  transform: scale(1.06);
}

.hero-poster-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(14px);
}

.hero-poster-caption strong,
.hero-poster-caption span {
  display: block;
}

.hero-poster-caption span {
  color: var(--muted);
  margin-top: 4px;
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 34px;
  background: #e2e8f0;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

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

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

.quick-search-panel {
  margin-top: -58px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 0.95fr 1.4fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-panel.compact {
  margin-top: 30px;
}

.quick-search-panel h2,
.section-title-row h2,
.story-card h2,
.category-overview-body h2 {
  margin: 6px 0 0;
  color: var(--white);
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.035em;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 12px;
}

.section-block {
  padding: 72px 0 8px;
}

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

.section-title-row a,
.total-count {
  color: var(--muted);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.34);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  border-color: rgba(226, 232, 240, 0.42);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.36), 0 0 32px rgba(203, 213, 225, 0.10);
  transform: translateY(-5px);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111827;
}

.compact-card .movie-cover {
  aspect-ratio: 16 / 10;
}

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

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

.play-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.play-pill {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: #0f172a;
  background: rgba(248, 250, 252, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 40px;
  padding: 8px 10px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  font-weight: 800;
}

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

.movie-card-body h3 {
  margin: 0 0 9px;
  color: var(--white);
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-meta {
  gap: 6px;
}

.movie-meta span {
  padding: 5px 8px;
  font-size: 12px;
}

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

.category-card,
.category-cover {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #111827;
  isolation: isolate;
}

.category-card::before,
.category-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--category-image);
  background-position: center;
  background-size: cover;
  transform: scale(1.05);
  transition: transform 0.5s ease;
}

.category-card::after,
.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.22));
}

.category-card:hover::before,
.category-cover:hover::before {
  transform: scale(1.14);
}

.category-card div {
  padding: 22px;
}

.category-card span,
.category-cover span {
  color: var(--soft);
  font-size: 13px;
}

.category-card h3 {
  margin: 6px 0 8px;
  color: var(--white);
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  display: none;
  margin: 24px 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(30, 41, 59, 0.34);
}

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

.sub-hero {
  position: relative;
  padding: 120px 0 74px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(226, 232, 240, 0.12), transparent 26rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.72), rgba(2, 6, 23, 0.35));
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(30, 41, 59, 0.34);
}

.category-cover {
  min-height: 100%;
  border: 0;
  border-radius: 0;
}

.category-cover span {
  margin: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

.category-overview-body {
  padding: 24px;
}

.category-overview-body p,
.category-overview-body li,
.story-card p {
  color: var(--muted);
  line-height: 1.75;
}

.category-overview-body ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
}

.category-overview-body li a:hover {
  color: var(--white);
}

.year-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.year-chips button {
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  cursor: pointer;
}

.year-chips button.is-active,
.year-chips button:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.podium-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
  margin-top: -46px;
  position: relative;
  z-index: 5;
}

.podium-card {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.podium-info {
  position: absolute;
  inset: auto 16px 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
}

.podium-info span {
  color: var(--soft);
  font-weight: 800;
}

.podium-info h2 {
  margin: 8px 0;
  color: var(--white);
}

.podium-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 118px 0 70px;
  isolation: isolate;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.34);
  transform: scale(1.06);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.35));
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.25);
  border-radius: 28px;
  background: rgba(30, 41, 59, 0.4);
  box-shadow: var(--shadow);
}

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

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

.breadcrumb a:hover {
  color: var(--white);
}

.detail-copy h1 {
  font-size: clamp(38px, 6vw, 70px);
}

.detail-tags {
  margin: 18px 0 4px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--white);
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.2));
  cursor: pointer;
  z-index: 4;
}

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

.player-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(248, 250, 252, 0.94);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.36);
  font-size: 30px;
}

.player-overlay strong {
  font-size: clamp(20px, 3vw, 34px);
}

.detail-text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 42px 0 4px;
}

.story-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(30, 41, 59, 0.32);
  padding: 28px;
}

.story-card p {
  margin-bottom: 0;
  font-size: 16px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
}

.site-footer p,
.footer-links a,
.copyright {
  color: var(--muted);
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-links a:hover {
  color: var(--white);
}

.copyright {
  padding: 18px 0 24px;
  text-align: center;
  border-top: 1px solid rgba(100, 116, 139, 0.18);
}

.is-hidden-by-filter {
  display: none;
}

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .global-search {
    margin-left: auto;
  }

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

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

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

@media (max-width: 820px) {
  .nav-shell {
    min-height: 66px;
    gap: 12px;
  }

  .global-search {
    display: none;
  }

  .hero-slider,
  .hero-content {
    min-height: 760px;
  }

  .hero-content,
  .quick-search-panel,
  .detail-layout,
  .detail-text-grid,
  .footer-grid,
  .podium-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    align-content: center;
    gap: 30px;
    padding: 96px 0 92px;
  }

  .hero-poster-card {
    max-width: 280px;
    justify-self: start;
  }

  .hero-control {
    display: none;
  }

  .quick-search-panel {
    margin-top: -36px;
    padding: 22px;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

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

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

  .category-cover {
    min-height: 220px;
  }

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

@media (max-width: 520px) {
  .section-container,
  .nav-shell,
  .mobile-nav {
    width: min(100% - 22px, 1280px);
  }

  .site-logo {
    font-size: 17px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }

  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-copy h1,
  .sub-hero h1 {
    font-size: 40px;
  }

  .featured-grid,
  .all-movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-body p {
    min-height: auto;
  }

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

  .player-icon {
    width: 64px;
    height: 64px;
  }
}
