:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(14, 116, 144, 0.32);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #64748b;
  --sky: #38bdf8;
  --cyan: #22d3ee;
  --amber: #fbbf24;
  --shadow: 0 24px 70px rgba(8, 47, 73, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

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

body.menu-open {
  overflow: hidden;
}

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

img {
  display: block;
}

button,
input,
select {
  font: inherit;
}

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

.container {
  width: min(100% - 2rem, 80rem);
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.9));
  box-shadow: 0 14px 36px rgba(8, 47, 73, 0.24);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: max-content;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.45);
}

.brand-text {
  background: linear-gradient(90deg, var(--sky), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  color: #cbd5e1;
}

.nav-link {
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--sky);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 12rem;
  padding: 0.45rem;
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: 0.2s ease;
}

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

.nav-dropdown-panel a {
  display: block;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  color: #cbd5e1;
}

.nav-dropdown-panel a:hover {
  color: var(--sky);
  background: rgba(14, 116, 144, 0.18);
}

.header-search {
  position: relative;
  width: min(20rem, 26vw);
}

.header-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  padding: 0.65rem 1rem 0.65rem 2.5rem;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.search-mark {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

.menu-button {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.8);
}

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

.mobile-panel-inner {
  width: min(100% - 2rem, 80rem);
  margin: 0 auto;
  padding: 1rem 0 1.25rem;
  display: grid;
  gap: 0.8rem;
}

.page-main {
  padding-top: 4rem;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.88) 40%, rgba(2, 6, 23, 0.1) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(100%, 43rem);
}

.eyebrow-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.75rem;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
}

.pill-sky {
  color: #ffffff;
  border-color: transparent;
  background: rgba(14, 165, 233, 0.82);
}

.pill-amber {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(120, 53, 15, 0.45);
}

.hero h1,
.hero h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.hero p {
  margin: 0 0 1.5rem;
  max-width: 42rem;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.85;
}

.hero-tags,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.8rem;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, #0ea5e9, #22d3ee);
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.36);
}

.btn-secondary {
  color: #e2e8f0;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.52);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(15, 23, 42, 0.85);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.8rem;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

.hero-dot {
  width: 1rem;
  height: 0.25rem;
  border: 0;
  border-radius: 999px;
  background: #475569;
  transition: 0.25s ease;
}

.hero-dot.is-active {
  width: 2.25rem;
  background: var(--sky);
}

.section {
  padding: 4rem 0;
}

.section-tight {
  padding: 2.4rem 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  color: var(--amber);
  font-weight: 700;
}

.section-title {
  margin: 0;
  color: #e2e8f0;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.2;
}

.section-desc {
  margin: 0.55rem 0 0;
  max-width: 47rem;
  color: var(--muted);
  line-height: 1.8;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.76), rgba(30, 41, 59, 0.46));
  box-shadow: var(--shadow);
}

.panel-pad {
  padding: clamp(1rem, 3vw, 2rem);
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(14, 116, 144, 0.22);
  border-radius: 0.95rem;
  background: rgba(15, 23, 42, 0.58);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(56, 189, 248, 0.62);
  transform: translateY(-0.25rem);
  box-shadow: 0 18px 46px rgba(8, 47, 73, 0.34);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.75);
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.35), transparent);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 3.75rem;
  height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.8);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: 0.25s ease;
}

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

.card-year {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 3;
  font-size: 0.78rem;
}

.card-body {
  padding: 0.9rem;
}

.card-title {
  margin: 0 0 0.45rem;
  color: #e2e8f0;
  font-size: 0.98rem;
  line-height: 1.35;
  min-height: 2.6em;
  transition: color 0.2s ease;
}

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

.card-desc {
  margin: 0 0 0.65rem;
  color: #94a3b8;
  font-size: 0.84rem;
  line-height: 1.55;
  min-height: 3.1em;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 12rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(8, 47, 73, 0.32));
  transition: 0.25s ease;
}

.category-card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-0.2rem);
}

.category-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

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

.category-strip {
  display: flex;
  gap: 0.45rem;
  margin-top: 1rem;
}

.category-strip img {
  width: 3.2rem;
  height: 4.6rem;
  border-radius: 0.45rem;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.8rem;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 4.8rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid rgba(14, 116, 144, 0.2);
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.55);
  transition: 0.22s ease;
}

.rank-item:hover {
  border-color: rgba(56, 189, 248, 0.52);
  background: rgba(15, 23, 42, 0.85);
}

.rank-num {
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
}

.rank-thumb {
  width: 4.8rem;
  height: 6.8rem;
  border-radius: 0.55rem;
  object-fit: cover;
}

.rank-title {
  margin: 0 0 0.35rem;
  font-weight: 800;
  color: #e2e8f0;
}

.rank-meta,
.detail-meta {
  display: flex;
  gap: 0.65rem;
  color: #94a3b8;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.rank-heat {
  color: var(--amber);
  font-weight: 800;
  white-space: nowrap;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.filter-input,
.filter-select {
  padding: 0.82rem 1rem;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.quick-filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.65);
  padding: 0.45rem 0.8rem;
}

.quick-filter:hover {
  color: var(--sky);
  border-color: rgba(56, 189, 248, 0.55);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(14, 116, 144, 0.32);
  border-radius: 1rem;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(14, 165, 233, 0.22), transparent 18rem),
    rgba(2, 6, 23, 0.48);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-circle {
  width: 5.2rem;
  height: 5.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  box-shadow: 0 0 42px rgba(14, 165, 233, 0.55);
}

.detail-title {
  margin: 1.35rem 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

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

.text-panel {
  padding: 1.4rem;
  border: 1px solid rgba(14, 116, 144, 0.22);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.58);
}

.text-panel h2,
.text-panel h3 {
  margin: 0 0 0.75rem;
  color: #e2e8f0;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.side-list {
  display: grid;
  gap: 0.9rem;
}

.side-card {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
}

.side-card img {
  width: 5rem;
  height: 7rem;
  object-fit: cover;
  border-radius: 0.55rem;
}

.side-card h4 {
  margin: 0 0 0.4rem;
  color: #e2e8f0;
}

.side-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.85rem;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 2.4rem 0;
}

.footer-title {
  margin: 0 0 0.8rem;
  font-weight: 800;
  color: #e2e8f0;
}

.footer-list {
  display: grid;
  gap: 0.55rem;
  color: #94a3b8;
}

.footer-list a:hover {
  color: var(--sky);
}

.muted {
  color: var(--muted);
}

.soft {
  color: var(--soft);
}

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

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

  .filter-panel {
    grid-template-columns: minmax(0, 1fr) 12rem 12rem;
  }
}

@media (min-width: 1024px) {
  .movie-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
  }

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

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

  .detail-layout {
    grid-template-columns: minmax(0, 2fr) minmax(20rem, 0.9fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .mobile-panel .header-search {
    display: block;
    width: 100%;
  }

  .hero {
    height: 74vh;
  }

  .hero-prev,
  .hero-next {
    display: none;
  }

  .rank-item {
    grid-template-columns: auto 4.2rem minmax(0, 1fr);
  }

  .rank-heat {
    grid-column: 3;
  }
}
