:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #111827;
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(34, 211, 238, 0.45);
  --text: #ffffff;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #3b82f6;
  --yellow: #facc15;
  --shadow: 0 24px 70px rgba(8, 47, 73, 0.36);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.28), transparent 32rem),
    radial-gradient(circle at top right, rgba(30, 64, 175, 0.36), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 44%, #111827 100%);
}

body.is-menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.22);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #04111d;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links > a,
.nav-dropdown > a {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.nav-links > a:hover,
.nav-dropdown > a:hover {
  color: #ffffff;
}

.nav-dropdown {
  position: relative;
  padding: 22px 0;
}

.dropdown-panel {
  position: absolute;
  top: 64px;
  left: 0;
  min-width: 190px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

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

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  color: #cbd5e1;
  border-radius: 10px;
}

.dropdown-panel a:hover {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.86);
}

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

.nav-search input,
.search-box input,
.local-filter input,
.filter-select {
  width: 260px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  padding: 11px 14px;
  color: #ffffff;
  outline: none;
  background: rgba(15, 23, 42, 0.92);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.search-box input:focus,
.local-filter input:focus,
.filter-select:focus {
  border-color: var(--cyan-strong);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.nav-search button,
.primary-button,
.secondary-button,
.search-box button,
.filter-chip,
.player-overlay,
.player-control {
  border: 0;
  cursor: pointer;
}

.nav-search button,
.primary-button,
.search-box button {
  border-radius: 14px;
  padding: 11px 18px;
  font-weight: 700;
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 14px 34px rgba(6, 182, 212, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nav-search button:hover,
.primary-button:hover,
.search-box button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #e2e8f0;
}

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

.mobile-panel a {
  display: block;
  padding: 13px 24px;
  color: #cbd5e1;
}

.mobile-panel a:hover {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.72);
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-mask {
  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.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 46%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-inner,
.page-shell,
.section-block,
.detail-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 52px;
}

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

.eyebrow,
.card-badge,
.detail-chip,
.rank-label,
.category-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 12px;
  color: #e0faff;
  font-size: 13px;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.22);
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p {
  width: min(620px, 100%);
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta span,
.detail-meta span,
.rank-meta span,
.card-tags span {
  color: #dbeafe;
  font-size: 13px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

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

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--cyan);
}

.quick-search {
  width: min(1200px, calc(100% - 32px));
  margin: -38px auto 0;
  position: relative;
  z-index: 8;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-box input {
  width: 100%;
  padding: 14px 16px;
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.search-tags a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.68);
}

.search-tags a:hover {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.25);
}

.section-block,
.page-shell,
.detail-shell {
  padding: 56px 0;
}

.section-head,
.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: var(--cyan);
  font-weight: 700;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.48);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(6, 182, 212, 0.18);
}

.card-cover {
  position: relative;
  display: block;
  height: 255px;
  overflow: hidden;
  background: #020617;
}

.movie-card-compact .card-cover {
  height: 180px;
}

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

.movie-card:hover img,
.mini-card:hover img,
.rank-item:hover img {
  transform: scale(1.08);
}

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade {
  opacity: 1;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.9);
}

.card-year {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 10px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  background: rgba(2, 6, 23, 0.78);
}

.card-body {
  display: block;
  padding: 16px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 44px;
  margin-bottom: 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.38;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

.card-body span {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body small {
  display: block;
  margin-top: 12px;
  color: var(--muted-2);
  line-height: 1.5;
}

.feature-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 24px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.26);
}

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

.mini-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  overflow: hidden;
  border-radius: 16px;
  padding: 10px;
  background: rgba(30, 41, 59, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: border 0.2s ease, background 0.2s ease;
}

.mini-card:hover {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(30, 41, 59, 0.9);
}

.mini-card img {
  width: 92px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.mini-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: #ffffff;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(30, 41, 59, 0.72)),
    rgba(15, 23, 42, 0.7);
  transition: transform 0.25s ease, border 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 18px 0 10px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.category-card > span:last-child {
  display: inline-flex;
  margin-top: 20px;
  color: var(--cyan);
  font-weight: 700;
}

.local-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.56);
}

.local-filter input {
  flex: 1 1 260px;
  width: auto;
}

.filter-select {
  width: auto;
  min-width: 180px;
}

.filter-chip {
  padding: 9px 13px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: all 0.2s ease;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #04111d;
  background: var(--cyan);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 104px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.2s ease, border 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-number {
  font-size: 26px;
  font-weight: 900;
  color: var(--cyan);
  text-align: center;
}

.rank-item img {
  width: 104px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.rank-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.rank-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-label {
  white-space: nowrap;
}

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

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.player-card,
.detail-content,
.sidebar-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 20px 70px rgba(2, 6, 23, 0.26);
}

.player-card {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #04111d;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.34));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 30px;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 0 45px rgba(34, 211, 238, 0.42);
}

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

.detail-title,
.detail-content {
  margin-top: 24px;
}

.detail-title h1 {
  margin-bottom: 14px;
}

.detail-content {
  padding: 26px;
}

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

.detail-content p {
  margin: 0 0 24px;
  color: #cbd5e1;
  line-height: 2;
}

.detail-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.sidebar-card {
  position: sticky;
  top: 92px;
  padding: 18px;
}

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

.site-footer {
  border-top: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  justify-content: space-between;
}

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

.footer-links {
  display: flex;
  gap: 16px;
  color: #cbd5e1;
}

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

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

.has-no-results .empty-state {
  display: block;
}

.card-hidden {
  display: none !important;
}

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

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

  .sidebar-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-carousel {
    min-height: 560px;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .section-head,
  .page-hero {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 14px;
  }

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

  .rank-item {
    grid-template-columns: 48px 88px 1fr;
  }

  .rank-label {
    grid-column: 2 / -1;
    width: max-content;
  }
}

@media (max-width: 560px) {
  .hero-carousel {
    min-height: 610px;
  }

  .hero-inner,
  .page-shell,
  .section-block,
  .detail-shell,
  .quick-search,
  .footer-inner,
  .nav-shell {
    width: min(100% - 22px, 1200px);
  }

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

  .hero-copy p {
    font-size: 16px;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

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

  .card-cover {
    height: 220px;
  }

  .rank-item {
    grid-template-columns: 42px 76px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .rank-item img {
    width: 76px;
    height: 58px;
  }

  .rank-copy p {
    display: none;
  }

  .detail-content {
    padding: 20px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
