:root {
  --night-950: #071a2f;
  --night-900: #102a43;
  --night-850: #183653;
  --night-800: #243b53;
  --night-700: #334e68;
  --night-600: #486581;
  --night-300: #bcccdc;
  --night-200: #d9e2ec;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-600: #d97706;
  --white: #ffffff;
  --text: #f3f4f6;
  --muted: #cbd5e1;
  --soft: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --shadow-night: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 10px 30px -5px rgba(16, 42, 67, 0.65);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(89, 77, 126, 0.24), transparent 36rem),
    var(--night-900);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 42, 67, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--night-950);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
}

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

.nav-link {
  color: var(--night-200);
  font-size: 0.96rem;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-400);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.top-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 26, 47, 0.72);
  color: var(--text);
  outline: none;
  padding: 10px 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.top-search input {
  width: 170px;
}

.top-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.top-search button,
.btn-primary,
.btn-secondary,
.hero-dot,
.mobile-toggle {
  border: 0;
  cursor: pointer;
}

.top-search button,
.btn-primary {
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: var(--white);
  padding: 10px 18px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.top-search button:hover,
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.35);
}

.btn-secondary {
  border-radius: 12px;
  background: rgba(72, 101, 129, 0.78);
  color: var(--text);
  padding: 10px 18px;
  font-weight: 700;
  transition: background 0.25s ease, transform 0.25s ease;
}

.btn-secondary:hover {
  background: rgba(95, 128, 160, 0.8);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-toggle span {
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav a {
  display: block;
  padding: 11px 0;
  color: var(--night-200);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav.open {
  display: block;
}

.hero {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  background: linear-gradient(to bottom, rgba(16, 42, 67, 0.96), rgba(36, 59, 83, 0.8));
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 26, 47, 0.96) 0%, rgba(7, 26, 47, 0.72) 42%, rgba(7, 26, 47, 0.18) 100%),
    linear-gradient(0deg, rgba(16, 42, 67, 0.95) 0%, rgba(16, 42, 67, 0.22) 48%, rgba(16, 42, 67, 0.78) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 80px 0 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.7fr);
  gap: 42px;
  align-items: center;
}

.hero-copy {
  animation: fadeIn 0.7s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-400);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 860px;
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.hero-desc {
  max-width: 700px;
  margin: 0 0 24px;
  color: var(--night-200);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-meta,
.detail-meta,
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.meta-pill {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  font-size: 0.86rem;
}

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

.hero-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(16, 42, 67, 0.7);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-night);
  animation: float 4s ease-in-out infinite;
}

.hero-poster {
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-mini-title {
  margin: 14px 0 4px;
  font-size: 1.08rem;
  font-weight: 800;
}

.hero-mini-text {
  margin: 0;
  color: var(--night-200);
  font-size: 0.92rem;
}

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

.hero-dot {
  width: 30px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 56px;
  background: var(--amber-400);
}

main {
  overflow: hidden;
}

.section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.section.slim {
  padding-top: 44px;
}

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

.section-head h1,
.section-head h2,
.page-title h1,
.detail-title {
  margin: 8px 0 8px;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  line-height: 1.12;
}

.section-head p,
.page-title p {
  margin: 0;
  color: var(--night-200);
  max-width: 760px;
}

.section-link {
  flex: 0 0 auto;
  color: var(--amber-400);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(36, 59, 83, 0.92), rgba(16, 42, 67, 0.98));
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--night-800);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 48%);
  opacity: 0.9;
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--night-950);
  background: var(--amber-400);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.4);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), #ef4444);
  font-size: 0.9rem;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 7px;
  font-size: 1.02rem;
  line-height: 1.28;
}

.card-body h3 a:hover {
  color: var(--amber-400);
}

.meta-line {
  margin: 0 0 8px;
  font-size: 0.84rem;
}

.card-desc {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--night-200);
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  padding: 3px 8px;
  font-size: 0.78rem;
}

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

.category-card {
  min-height: 174px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(41, 32, 61, 0.86), rgba(64, 54, 92, 0.72), rgba(16, 42, 67, 0.95));
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.36);
}

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

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

.category-card span {
  color: var(--amber-400);
  font-weight: 800;
}

.page-hero {
  position: relative;
  padding: 70px 0 34px;
  background: linear-gradient(135deg, rgba(16, 42, 67, 0.95), rgba(41, 32, 61, 0.74));
  border-bottom: 1px solid var(--line);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--night-200);
  font-size: 0.93rem;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 150px;
  gap: 12px;
  margin: 0 0 26px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(16, 42, 67, 0.68);
  backdrop-filter: blur(14px);
}

.empty-message {
  display: none;
  padding: 26px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: var(--night-200);
  text-align: center;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(36, 59, 83, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.32);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber-400);
  font-weight: 900;
}

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

.rank-row h3 {
  margin: 0 0 6px;
}

.rank-row h3 a:hover {
  color: var(--amber-400);
}

.rank-row p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--night-200);
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detail-hero {
  padding: 54px 0 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(16, 42, 67, 0.96), rgba(41, 32, 61, 0.76));
}

.detail-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-night);
}

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

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

.detail-summary {
  margin: 22px 0;
  color: var(--night-200);
  font-size: 1.05rem;
}

.player-section {
  padding-top: 34px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow-night);
  aspect-ratio: 16 / 9;
}

.player-box video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-box video {
  z-index: 1;
  background: #000;
}

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  padding: 15px 28px;
  font-weight: 900;
  box-shadow: 0 0 36px rgba(245, 158, 11, 0.42);
}

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

.content-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(36, 59, 83, 0.72);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.content-card p {
  margin: 0 0 16px;
  color: var(--night-200);
}

.content-card p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(7, 26, 47, 0.72);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 30px;
}

.footer-inner p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--night-200);
}

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

.footer-links a {
  color: var(--night-200);
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

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

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

  .mobile-toggle {
    display: flex;
  }

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

  .hero-panel {
    max-width: 360px;
  }

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

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 700px) {
  .nav-wrap,
  .section,
  .page-title,
  .detail-wrap,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    min-height: 82vh;
  }

  .hero-content {
    padding: 54px 0 98px;
  }

  .hero-panel {
    display: none;
  }

  .section {
    padding: 48px 0;
  }

  .section-head {
    display: block;
  }

  .section-link {
    display: inline-block;
    margin-top: 12px;
  }

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

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

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

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

  .rank-row img {
    width: 64px;
    height: 92px;
  }

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

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