:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.92);
  --panel-soft: rgba(30, 41, 59, 0.82);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --pink: #e879f9;
  --green: #34d399;
  --shadow: 0 24px 70px rgba(2, 8, 23, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.18), transparent 34%),
    linear-gradient(180deg, #0f172a 0%, #020617 48%, #020617 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 22px;
}

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

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

.brand-text,
.footer-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: white;
  transform: translateY(-1px);
}

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

.nav-search input,
.mobile-nav input,
.filter-panel input,
.filter-panel select,
.search-box input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  outline: none;
  color: white;
  background: rgba(15, 23, 42, 0.92);
  border-radius: 999px;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-nav input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-box input:focus {
  border-color: rgba(34, 211, 238, 0.85);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.nav-search button,
.mobile-nav button,
.search-box button {
  border: 0;
  color: #00111a;
  font-weight: 800;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  color: white;
  background: var(--panel-soft);
  border-radius: 12px;
  padding: 9px 12px;
}

.mobile-nav {
  display: none;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 18px;
  gap: 12px;
  flex-direction: column;
}

.mobile-nav.is-open {
  display: flex;
}

.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 70px;
}

.hero {
  position: relative;
  min-height: 620px;
  border-radius: 34px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

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

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08) blur(2px);
  transform: scale(1.04);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.42) 100%),
    radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.24), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 50px;
  padding: 72px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.86;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.section-more,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 15px 35px rgba(34, 211, 238, 0.24);
}

.ghost-btn,
.section-more,
.back-link {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.62);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.back-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 72px;
  bottom: 36px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 38px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.content-section,
.detail-panel,
.player-card,
.category-hero,
.search-hero {
  margin-top: 34px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.76);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.content-section {
  padding: 26px;
}

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

.section-title h2,
.category-hero h1,
.search-hero h1,
.detail-panel h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.035em;
}

.section-title p,
.category-hero p,
.search-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.56);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 18px 45px rgba(2, 8, 23, 0.46);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.8);
  transition: transform 0.28s ease;
}

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

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.poster-type {
  right: 10px;
  color: #a5f3fc;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.28);
}

.rank-badge {
  left: 10px;
  min-width: 30px;
  text-align: center;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
}

.card-body {
  padding: 15px;
}

.card-title {
  display: block;
  min-height: 46px;
  color: white;
  font-weight: 800;
  line-height: 1.45;
}

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

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 12px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border-radius: 24px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(8, 47, 73, 0.78));
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile span {
  position: relative;
  z-index: 2;
  display: block;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-tile strong {
  position: relative;
  z-index: 2;
  display: block;
  color: #bfdbfe;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 500;
}

.tile-images {
  position: absolute;
  right: -12px;
  bottom: -26px;
  display: grid;
  grid-template-columns: repeat(2, 72px);
  gap: 8px;
  opacity: 0.86;
  transform: rotate(-8deg);
}

.tile-images img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.filter-panel,
.search-box {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 160px 160px;
  gap: 12px;
  margin-bottom: 22px;
}

.filter-panel select {
  appearance: none;
}

.category-hero,
.search-hero {
  padding: 34px;
  background:
    radial-gradient(circle at 15% 10%, rgba(34, 211, 238, 0.16), transparent 34%),
    rgba(15, 23, 42, 0.78);
}

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

.player-card {
  overflow: hidden;
  margin-top: 0;
}

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
  overflow: hidden;
}

.player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: black;
  cursor: pointer;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.36));
  transition: opacity 0.2s ease;
}

.player.is-playing .player-layer {
  opacity: 0;
}

.player-play {
  pointer-events: auto;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #00111a;
  font-size: 28px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.25);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: white;
  font-size: 13px;
  background: rgba(2, 6, 23, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 8px 12px;
}

.detail-panel {
  padding: 28px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.breadcrumbs a:hover {
  color: white;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  color: #cbd5e1;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 8px 12px;
}

.detail-text h2 {
  margin: 24px 0 10px;
  font-size: 22px;
}

.detail-text p {
  color: #cbd5e1;
  line-height: 1.95;
  margin: 0 0 14px;
}

.side-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 18px;
}

.side-box {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.76);
}

.side-box h3 {
  margin: 0 0 14px;
}

.mini-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.mini-card:first-of-type {
  border-top: 0;
}

.mini-card img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.mini-card strong {
  display: block;
  line-height: 1.4;
}

.mini-card em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.mini-rank {
  position: absolute;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #00111a;
  font-weight: 900;
  background: var(--cyan);
  border-radius: 999px;
}

.search-box {
  grid-template-columns: 1fr auto;
  margin-top: 24px;
  margin-bottom: 0;
}

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

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 34px 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 36px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
}

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

.footer-inner p {
  grid-column: 1 / -1;
  color: var(--muted);
  margin: 0;
}

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

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

  .nav-shell {
    grid-template-columns: auto 1fr auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .movie-grid {
    grid-template-columns: repeat(4, 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: 820px) {
  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .nav-search {
    display: none;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    padding: 34px;
    gap: 26px;
  }

  .hero-poster {
    max-width: 240px;
    transform: none;
  }

  .hero-dots {
    left: 34px;
    bottom: 22px;
  }

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

  .category-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .section-title,
  .footer-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .main,
  .nav-shell,
  .mobile-nav {
    padding-left: 14px;
    padding-right: 14px;
  }

  .content-section,
  .detail-panel,
  .category-hero,
  .search-hero {
    padding: 18px;
    border-radius: 22px;
  }

  .hero {
    border-radius: 22px;
  }

  .hero h1 {
    font-size: 38px;
  }

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