:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.22);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --accent: #f97316;
  --accent-2: #f59e0b;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 4%, rgba(249, 115, 22, 0.18), transparent 26rem),
    radial-gradient(circle at 92% 8%, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.24);
}

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

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.26);
}

.logo-text,
.footer-logo {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  color: var(--muted-2);
  font-weight: 650;
}

.desktop-nav a,
.nav-dropdown button {
  color: inherit;
  background: transparent;
  border: 0;
  padding: 10px 0;
  font: inherit;
  cursor: pointer;
}

.desktop-nav a:hover,
.nav-dropdown button:hover {
  color: #fdba74;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 170px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

.dropdown-panel a:hover {
  background: rgba(249, 115, 22, 0.14);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(290px, 24vw);
}

.header-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.55);
  border-radius: 999px;
  padding: 11px 14px;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(249, 115, 22, 0.72);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.header-search button,
.primary-button,
.secondary-button,
.hero-arrow,
.play-button,
.filter-panel button,
.mobile-menu-button {
  border: 0;
  cursor: pointer;
  font-weight: 750;
}

.header-search button,
.primary-button,
.play-button,
.filter-panel button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  padding: 11px 18px;
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.22);
}

.secondary-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 11px 18px;
}

.mobile-menu-button {
  display: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  margin-left: auto;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: var(--shadow);
}

.mobile-menu.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-menu a {
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-2);
}

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

.hero {
  position: relative;
  margin-top: 24px;
  min-height: 580px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  display: none;
  min-height: 580px;
  position: relative;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: 42px;
  padding: 60px clamp(26px, 5vw, 76px);
}

.hero-slide.is-active {
  display: grid;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) brightness(0.38) saturate(1.18);
  transform: scale(1.06);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.76) 48%, rgba(2, 6, 23, 0.32)),
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.28), transparent 26rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(249, 115, 22, 0.34);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 800;
  font-size: 0.86rem;
  margin-bottom: 16px;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
  color: #fff;
}

.hero h1 span,
.page-hero h1 span {
  background: linear-gradient(90deg, #fff, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.hero-meta {
  margin: 18px 0;
}

.hero p,
.page-hero p {
  color: #cbd5e1;
  font-size: 1.04rem;
  line-height: 1.8;
  max-width: 680px;
}

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

.hero-poster {
  justify-self: center;
  width: min(360px, 100%);
  transform: rotate(2deg);
}

.hero-poster a {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 28px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.section {
  margin-top: 54px;
}

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

.section-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: #fdba74;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(15, 23, 42, 0.88);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge,
.poster-year,
.rank-number,
.heat-badge {
  position: absolute;
  color: #fff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 5px 9px;
  background: rgba(249, 115, 22, 0.92);
}

.poster-badge {
  left: 10px;
  top: 10px;
}

.poster-year {
  right: 10px;
  top: 10px;
  background: rgba(15, 23, 42, 0.78);
}

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

.movie-card h3 {
  margin: 7px 0 7px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
}

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

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

.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  color: #fdba74;
  background: rgba(249, 115, 22, 0.12);
  font-size: 0.75rem;
  font-weight: 750;
}

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

.category-tile,
.page-hero,
.filter-panel,
.detail-shell,
.content-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.category-tile {
  padding: 20px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 80% 0%, rgba(249, 115, 22, 0.18), transparent 12rem),
    rgba(15, 23, 42, 0.64);
}

.category-tile h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.22rem;
}

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

.category-tile span {
  margin-top: 16px;
  color: #fdba74;
  font-weight: 850;
}

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

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
}

.rank-item img {
  width: 86px;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.08rem;
}

.rank-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.rank-number {
  left: 4px;
  top: 4px;
  background: linear-gradient(135deg, var(--accent), var(--danger));
}

.heat-badge {
  position: static;
  background: rgba(249, 115, 22, 0.14);
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.24);
}

.page-hero {
  margin-top: 24px;
  padding: clamp(28px, 5vw, 56px);
  background:
    radial-gradient(circle at 82% 10%, rgba(249, 115, 22, 0.2), transparent 20rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.86));
}

.filter-panel {
  margin: 26px 0;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 180px auto;
  gap: 12px;
  align-items: center;
}

.filter-panel select {
  appearance: none;
}

.no-results {
  display: none;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 18px;
}

.no-results.is-visible {
  display: block;
}

.detail-shell {
  margin-top: 24px;
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: #000;
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.18);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

.play-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 1rem;
}

.detail-content {
  padding: clamp(22px, 4vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}

.detail-content h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-summary {
  color: var(--muted-2);
  line-height: 1.95;
  font-size: 1rem;
}

.detail-summary h2,
.related-section h2 {
  margin: 28px 0 12px;
  color: #fff;
  font-size: 1.45rem;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
}

.detail-side .tag-row {
  margin-top: 18px;
}

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

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

.related-card {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.related-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-card span {
  display: block;
  padding: 10px;
  color: #fff;
  font-weight: 750;
  line-height: 1.45;
  font-size: 0.9rem;
}

.breadcrumbs {
  margin: 22px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.breadcrumbs a {
  color: #fdba74;
}

.site-footer {
  margin-top: 68px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.72);
}

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

.footer-brand p {
  color: var(--muted);
  line-height: 1.75;
  max-width: 620px;
}

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

.footer-links a {
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 8px 12px;
}

.footer-links a:hover {
  color: #fdba74;
}

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

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

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

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 34px 22px 78px;
  }

  .hero-poster {
    width: min(240px, 76%);
    transform: none;
  }

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

  .detail-side {
    max-width: 320px;
  }

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

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

@media (max-width: 640px) {
  .header-inner,
  main,
  .footer-inner,
  .related-section,
  .mobile-menu {
    width: min(100% - 22px, 1180px);
  }

  .logo-text {
    font-size: 1.18rem;
  }

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

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

  .rank-item {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .rank-item img {
    width: 70px;
    height: 94px;
  }

  .heat-badge {
    grid-column: 2;
    justify-self: start;
  }

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

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
