:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-2: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --yellow: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 34rem), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  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;
}

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

.nav-shell,
.footer-shell,
.page-shell,
.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.25);
}

.brand-text,
.footer-brand {
  font-size: 1.45rem;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan);
}

.nav-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
  color: var(--text);
  background: rgba(51, 65, 85, 0.78);
  border: 1px solid transparent;
  outline: none;
  border-radius: 999px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
  width: 230px;
  padding: 10px 16px;
}

.nav-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  color: #ffffff;
  font-weight: 700;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
  background: rgba(30, 41, 59, 0.92);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--text);
  background: rgba(51, 65, 85, 0.75);
  border-radius: 12px;
  width: 42px;
  height: 42px;
}

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

.mobile-panel.is-open {
  display: block;
}

.mobile-search {
  margin: 14px 0;
}

.mobile-search input {
  flex: 1;
  padding: 11px 16px;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.85), transparent 42%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 72px 0 84px;
}

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

.hero-kicker,
.detail-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  background: rgba(34, 211, 238, 0.22);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.92rem;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-copy p {
  max-width: 650px;
  color: #dbeafe;
  font-size: clamp(1rem, 1.55vw, 1.28rem);
}

.hero-movie-title {
  display: block;
  margin: 14px 0 8px;
  color: #67e8f9;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 850;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.22);
}

.btn-secondary {
  color: #dffaff;
  border: 1px solid rgba(34, 211, 238, 0.34);
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(12px);
}

.btn-ghost {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.22);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-cats a,
.movie-tags span,
.detail-tags span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.18);
}

.hero-cats a {
  padding: 8px 13px;
  color: #e0faff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

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

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

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot:focus-visible,
.hero-dot.is-active {
  background: var(--cyan);
}

.page-hero,
.detail-hero {
  padding: 64px 0 28px;
}

.page-hero-card,
.detail-hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  box-shadow: var(--shadow);
}

.page-hero-card {
  padding: clamp(28px, 4vw, 54px);
}

.page-hero-card h1,
.detail-title {
  margin: 16px 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.page-hero-card p,
.detail-lead {
  max-width: 820px;
  color: var(--muted-2);
  font-size: 1.08rem;
}

.page-shell {
  padding: 42px 0 76px;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.15;
  font-weight: 850;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
}

.poster-box {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.85);
}

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

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

.poster-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 48%);
  opacity: 0.9;
}

.poster-type,
.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.poster-type {
  top: 10px;
  left: 10px;
  background: rgba(34, 211, 238, 0.86);
  color: #ffffff;
}

.poster-year {
  top: 10px;
  right: 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  color: #111827;
  background: var(--yellow);
}

.poster-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: auto;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(34, 211, 238, 0.88);
  transform: scale(0);
  transition: transform 0.25s ease;
}

.movie-card:hover .poster-play {
  transform: scale(1);
}

.movie-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.movie-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 800;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--cyan);
}

.movie-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.92rem;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: rgba(148, 163, 184, 0.55);
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.movie-tags span,
.detail-tags span {
  padding: 4px 8px;
  font-size: 0.78rem;
}

.is-compact .movie-card-body {
  padding: 12px;
}

.is-compact p {
  display: none;
}

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

.category-card {
  min-height: 190px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.2), rgba(37, 99, 235, 0.12)), rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(34, 211, 238, 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted-2);
}

.category-count {
  display: inline-flex;
  color: var(--cyan);
  font-weight: 850;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.rank-panel {
  border-radius: 22px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.78);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(51, 65, 85, 0.86);
  transform: translateX(3px);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.rank-item h3 {
  margin: 0;
  font-size: 0.98rem;
}

.rank-item p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.86);
}

.filter-panel-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.filter-panel h2 {
  margin: 0;
  font-size: 1.3rem;
}

.filter-panel p {
  margin: 0;
  color: var(--muted);
}

.filter-count {
  color: var(--cyan);
  font-weight: 850;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(160px, 0.65fr) minmax(160px, 0.65fr);
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  padding: 12px 16px;
}

.empty-state {
  padding: 28px;
  text-align: center;
}

.detail-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.55fr);
  gap: 34px;
  padding: clamp(24px, 4vw, 46px);
}

.detail-title {
  margin-top: 18px;
}

.detail-poster {
  align-self: stretch;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.88);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(51, 65, 85, 0.72);
}

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

.detail-main,
.detail-side,
.player-section,
.content-card {
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.detail-main,
.detail-side,
.content-card {
  padding: 24px;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.content-card + .content-card {
  margin-top: 20px;
}

.content-card h2,
.player-section h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

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

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

.player-section {
  overflow: hidden;
  margin-bottom: 26px;
}

.player-section h2 {
  padding: 22px 24px 0;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 18px 24px 24px;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  z-index: 4;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.58);
}

.player-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), rgba(0, 0, 0, 0.55));
}

.player-button {
  position: relative;
  z-index: 5;
  border: 0;
  border-radius: 999px;
  padding: 16px 28px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  font-weight: 900;
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.32);
}

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

.side-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.72);
}

.side-card img {
  width: 96px;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
}

.side-card h3 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.35;
}

.side-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.94));
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.footer-shell p {
  max-width: 520px;
  color: var(--muted);
}

.footer-shell h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

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

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

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

[hidden] {
  display: none !important;
}

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

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

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-arrow {
    display: none;
  }

  .hero-inner {
    align-items: end;
    padding-bottom: 92px;
  }

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

  .filter-controls,
  .detail-hero-card,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .filter-panel-title,
  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .detail-poster img {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .footer-shell,
  .page-shell,
  .hero-inner {
    width: min(100% - 22px, 1180px);
  }

  .brand-text {
    font-size: 1.18rem;
  }

  .hero-slider,
  .hero-inner {
    min-height: 76vh;
  }

  .hero-actions,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .player-frame {
    margin: 16px 12px 14px;
    border-radius: 14px;
  }

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