:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(34, 211, 238, 0.34);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --gold: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --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.2), transparent 28rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.22), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f265f 48%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

main {
  min-height: calc(100vh - 64px);
}

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

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.35);
  font-size: 14px;
}

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

.desktop-nav a,
.nav-dropdown button {
  color: var(--muted-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.nav-dropdown:hover button {
  color: var(--cyan);
}

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

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

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

.nav-dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
}

.nav-dropdown-menu a:hover {
  background: rgba(34, 211, 238, 0.1);
}

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

.top-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  min-width: 230px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  outline: 0;
  color: var(--text);
  background: rgba(15, 23, 42, 0.84);
  padding: 10px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.top-search button,
.mobile-search button,
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(34, 211, 238, 0.32);
}

.secondary-btn {
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line-strong);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 999px;
}

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

.mobile-panel.is-open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.55);
}

.hero-carousel {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-slide.is-active img {
  animation: heroZoom 7s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.11);
  }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, transparent 36%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--cyan);
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 20px var(--cyan);
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 14px;
  color: var(--muted-2);
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.12;
}

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

.hero-meta,
.movie-meta,
.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.movie-meta span,
.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.16);
  font-size: 13px;
}

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

.hero-controls {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-controls button,
.hero-dots button {
  border: 0;
  color: white;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(10px);
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

.section-block {
  padding: 72px 0 0;
}

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

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

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

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 20px 46px rgba(34, 211, 238, 0.16);
}

.poster-wrap {
  position: relative;
  height: 252px;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.compact .poster-wrap {
  height: 210px;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.corner-label,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(8, 145, 178, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(250, 204, 21, 0.92);
  color: #111827;
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.movie-meta {
  gap: 6px;
}

.movie-meta span {
  min-height: 24px;
  padding: 3px 8px;
  color: var(--muted-2);
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
}

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

.category-card {
  display: block;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent 48%),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

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

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

.page-hero {
  padding: 64px 0 34px;
  background:
    radial-gradient(circle at 18% 22%, rgba(34, 211, 238, 0.2), transparent 22rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.45), rgba(2, 6, 23, 0));
}

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

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

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.64);
}

.filter-bar input {
  flex: 1;
  min-width: 260px;
}

.filter-bar select {
  min-width: 160px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: center;
  padding: 52px 0 34px;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-copy p {
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

.detail-meta,
.tag-list {
  margin-bottom: 16px;
}

.player-section,
.content-panel,
.related-panel {
  margin-top: 42px;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.18);
}

.player-section h2,
.content-panel h2,
.related-panel h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 48px rgba(34, 211, 238, 0.48);
  font-size: 34px;
  transform: translateX(3px);
}

.content-panel p {
  margin: 0 0 18px;
  color: var(--muted-2);
  line-height: 2;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 74px minmax(0, 1fr) 260px 70px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-row img {
  width: 74px;
  height: 98px;
  object-fit: cover;
  border-radius: 12px;
}

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

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

.rank-main small {
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.rank-tags {
  color: var(--muted);
  font-size: 14px;
}

.rank-score {
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
  text-align: right;
}

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

.empty-state {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.64);
}

.site-footer {
  margin-top: 88px;
  border-top: 1px solid rgba(34, 211, 238, 0.18);
  background: rgba(2, 6, 23, 0.64);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 32px;
}

.footer-brand p,
.footer-group a {
  color: var(--muted);
  line-height: 1.8;
}

.footer-group {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-group h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

[data-card].is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .top-search {
    display: none;
  }

  .movie-grid,
  .movie-grid.wide,
  .search-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rank-row {
    grid-template-columns: 44px 64px minmax(0, 1fr) 64px;
  }

  .rank-tags {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-carousel {
    height: 680px;
  }

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

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

  .hero-controls {
    right: 16px;
  }

  .section-head {
    display: block;
  }

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

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

  .detail-cover {
    max-width: 360px;
  }

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

@media (max-width: 560px) {
  .nav-shell {
    width: min(100% - 20px, 1180px);
  }

  .brand {
    font-size: 19px;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-meta span {
    font-size: 12px;
  }

  .movie-grid,
  .movie-grid.wide,
  .search-results,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap,
  .movie-card.compact .poster-wrap {
    height: 330px;
  }

  .filter-bar input,
  .filter-bar select {
    min-width: 100%;
  }

  .rank-row {
    grid-template-columns: 38px 58px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .player-section,
  .content-panel,
  .related-panel {
    padding: 18px;
  }
}
