:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --panel-soft: rgba(30, 41, 59, 0.56);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(34, 211, 238, 0.35);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.16);
  --radius: 18px;
}

* {
  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(34, 211, 238, 0.12), transparent 30rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 32rem),
    var(--bg);
  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;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 38px rgba(2, 6, 23, 0.42);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.22);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  font-size: 21px;
  font-weight: 850;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 650;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

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

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

.mobile-link {
  padding: 12px 14px;
  font-weight: 650;
}

.hero-slider {
  position: relative;
  height: min(720px, 70vh);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.1) contrast(1.02);
}

.hero-slide.active img.hero-bg {
  animation: heroZoom 5.6s ease both;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1.02); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.38) 34%, transparent 76%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 78px;
}

.hero-copy {
  width: min(680px, 100%);
}

.hero-pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.hero-pill {
  padding: 7px 13px;
  margin-bottom: 18px;
}

.eyebrow {
  padding: 5px 11px;
  margin-bottom: 10px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0 0 24px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  max-width: 62ch;
}

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

.hero-tags {
  margin-bottom: 28px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.66);
  font-size: 12px;
}

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

.tag-row span,
.detail-tags span {
  padding: 4px 9px;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary,
.btn-secondary,
.rank-action,
.play-overlay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary,
.btn-secondary {
  min-height: 48px;
  padding: 0 22px;
}

.btn-primary,
.rank-action {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  box-shadow: 0 18px 40px rgba(8, 145, 178, 0.26);
}

.btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-secondary:hover,
.rank-action:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.2);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(34, 211, 238, 0.22);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.active {
  background: var(--cyan);
}

.search-hero {
  margin-top: -38px;
  position: relative;
  z-index: 5;
}

.search-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.search-card h2 {
  margin: 0;
  font-size: 22px;
}

.search-card p {
  margin: 0;
  color: var(--muted);
}

.global-search-form {
  display: flex;
  gap: 12px;
}

.global-search-form input,
.search-box input,
.filter-selects select {
  border: 1px solid var(--border);
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
}

.global-search-form input {
  flex: 1;
  min-height: 48px;
  border-radius: 13px;
  padding: 0 14px;
}

.global-search-form input:focus,
.search-box input:focus,
.filter-selects select:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.page-main {
  padding: 54px 0 72px;
}

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

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-heading p,
.page-lead {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--cyan);
  font-weight: 750;
  white-space: nowrap;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 36px rgba(2, 6, 23, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 56px rgba(8, 145, 178, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 145, 178, 0.18));
}

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

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

.poster-region,
.poster-year,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-region,
.poster-year {
  border-radius: 999px;
  padding: 4px 8px;
  color: white;
  font-size: 12px;
  font-weight: 750;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.poster-region {
  left: 10px;
  top: 10px;
  background: rgba(8, 145, 178, 0.86);
}

.poster-year {
  right: 10px;
  bottom: 10px;
}

.poster-play {
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 42px;
  opacity: 0;
  background: rgba(2, 6, 23, 0.18);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.rank-info h3 a:hover,
.breadcrumb a:hover {
  color: var(--cyan);
}

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

.mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 12px;
}

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

.category-card {
  min-height: 160px;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(37, 99, 235, 0.08)),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(37, 99, 235, 0.12)),
    rgba(15, 23, 42, 0.92);
}

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

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 116px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.8);
}

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

.rank-info h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.rank-info p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-action {
  min-width: 78px;
  min-height: 40px;
  padding: 0 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  margin: 28px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
}

.search-box input {
  width: 100%;
  min-height: 46px;
  border-radius: 13px;
  padding: 0 13px;
}

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-selects select {
  min-height: 46px;
  min-width: 132px;
  border-radius: 13px;
  padding: 0 12px;
}

.empty-state {
  display: none;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.68);
}

.empty-state.show {
  display: block;
}

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

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

.detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) brightness(0.45) saturate(1.15);
  transform: scale(1.06);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.5) 52%, rgba(2, 6, 23, 0.82));
}

.detail-title-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  min-height: 360px;
  padding-bottom: 44px;
}

.detail-title-wrap h1 {
  max-width: 880px;
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-title-wrap p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin-top: 34px;
}

.detail-panel,
.side-panel {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 52px rgba(2, 6, 23, 0.24);
}

.detail-panel {
  overflow: hidden;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  flex-direction: column;
  gap: 12px;
  border: 0;
  border-radius: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.14));
}

.play-overlay span:first-child {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  box-shadow: 0 20px 60px rgba(8, 145, 178, 0.35);
  font-size: 28px;
}

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

.detail-content {
  padding: 26px;
}

.detail-content h2,
.side-panel h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-content h2:first-child,
.side-panel h2:first-child {
  margin-top: 0;
}

.detail-content p {
  margin: 0 0 14px;
  color: var(--soft);
}

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

.detail-meta span {
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--soft);
  background: rgba(34, 211, 238, 0.08);
  font-size: 13px;
}

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

.side-panel {
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 92px;
}

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

.side-movie {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-movie img {
  width: 78px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.72);
}

.side-movie h3 {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.35;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 46px 0 26px;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

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

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

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0 28px;
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

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

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-slider {
    min-height: 560px;
    height: 72vh;
  }

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

  .hero-control {
    display: none;
  }

  .global-search-form,
  .filter-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .global-search-form {
    display: grid;
  }

  .filter-panel {
    display: grid;
  }

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

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

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

  .rank-action {
    grid-column: 2 / -1;
    width: fit-content;
  }

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

  .detail-content {
    padding: 20px;
  }
}

@media (max-width: 500px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

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

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 34px;
  }

  .side-movie {
    grid-template-columns: 96px 1fr;
  }

  .side-movie img {
    width: 96px;
  }
}
