:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --gold: #facc15;
  --gold-deep: #eab308;
  --blue: #1d4ed8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 5%, rgba(250, 204, 21, 0.16), transparent 28rem),
    radial-gradient(circle at 84% 12%, rgba(37, 99, 235, 0.22), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #082f49 42%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.locked {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(12, 74, 110, 0.9), rgba(15, 23, 42, 0.94));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), #f97316);
  color: #111827;
  box-shadow: 0 10px 30px rgba(250, 204, 21, 0.28);
}

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

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

.nav-link,
.nav-category-title {
  padding: 10px 14px;
  color: #dbeafe;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-category-wrap:hover .nav-category-title {
  color: #111827;
  background: var(--gold);
  transform: translateY(-1px);
}

.nav-category-wrap {
  position: relative;
}

.nav-category-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 180px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

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

.nav-category-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.nav-category-link:hover {
  color: var(--gold);
  background: rgba(250, 204, 21, 0.08);
}

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

.header-search input,
.mobile-search input,
.page-filter input {
  min-width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 11px 15px;
  outline: none;
}

.header-search input:focus,
.mobile-search input:focus,
.page-filter input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
}

.header-search button,
.mobile-search button,
.page-filter button {
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #111827;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.page-filter button:hover {
  background: #fde047;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

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

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

.mobile-links {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.mobile-link.active,
.mobile-link:hover {
  background: rgba(250, 204, 21, 0.14);
  color: var(--gold);
}

.mobile-link.small {
  font-size: 0.94rem;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  background: #020617;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.32) saturate(1.1);
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.92)),
    linear-gradient(0deg, #020617 0%, transparent 38%, #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(250, 204, 21, 0.38);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero h2 {
  margin: 18px 0 0;
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  line-height: 1.05;
  color: #fff7cc;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  padding: 6px 10px;
  font-size: 0.82rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

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

.btn.primary {
  background: var(--gold);
  color: #111827;
  box-shadow: 0 12px 32px rgba(250, 204, 21, 0.24);
}

.btn.ghost,
.btn.subtle {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn.ghost:hover,
.btn.subtle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.54);
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: var(--gold);
  color: #111827;
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 38px;
  background: var(--gold);
}

.category-strip {
  padding: 28px 0;
  background: rgba(2, 6, 23, 0.46);
  border-block: 1px solid var(--line);
}

.strip-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.strip-inner a,
.category-overview-card,
.feature-panel,
.detail-article {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(12, 74, 110, 0.36));
  box-shadow: var(--shadow);
}

.strip-inner a {
  padding: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.strip-inner a:hover {
  border-color: rgba(250, 204, 21, 0.54);
  transform: translateY(-4px);
}

.strip-inner strong,
.category-overview-main span {
  display: block;
  color: #fff;
  font-size: 1.1rem;
}

.strip-inner span,
.category-overview-card p {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

.section-heading h2,
.feature-panel h2,
.detail-article h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.1;
}

.section-subtitle {
  max-width: 640px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card {
  min-width: 0;
}

.movie-card.hidden {
  display: none;
}

.movie-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card-link:hover {
  border-color: rgba(250, 204, 21, 0.48);
  box-shadow: 0 28px 76px rgba(250, 204, 21, 0.12);
  transform: translateY(-8px);
}

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card-link:hover .movie-cover img {
  transform: scale(1.08);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%);
}

.card-category,
.card-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.card-category {
  left: 12px;
  top: 12px;
  background: var(--gold);
  color: #111827;
}

.card-year {
  right: 12px;
  top: 12px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.movie-card-body h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  color: #b6c3d1;
  font-size: 0.95rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: var(--gold);
  font-size: 0.86rem;
}

.tag-row {
  margin-top: 2px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 28px;
  align-items: start;
}

.feature-panel {
  position: sticky;
  top: 96px;
  padding: 34px;
}

.feature-panel p {
  color: var(--muted);
  font-size: 1.05rem;
}

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

.mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  padding: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.mini-card:hover {
  border-color: rgba(250, 204, 21, 0.46);
  transform: translateX(4px);
}

.mini-card img {
  width: 96px;
  height: 76px;
  object-fit: cover;
  border-radius: 14px;
}

.mini-card h3,
.mini-card p {
  margin: 0;
}

.mini-card h3 {
  color: #fff;
  font-size: 1rem;
}

.mini-card p,
.mini-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.mini-card span:not(.mini-rank) {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.mini-rank {
  position: absolute;
  right: 14px;
  top: 14px;
  color: var(--gold);
  font-weight: 900;
}

.inner-page {
  min-height: 70vh;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(12, 74, 110, 0.64));
}

.page-hero {
  padding: 86px 0 64px;
}

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

.page-hero h1 {
  max-width: 980px;
}

.page-filter {
  margin-top: 28px;
}

.page-filter input {
  width: min(100%, 560px);
}

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

.category-overview-card {
  padding: 22px;
}

.category-overview-main {
  display: block;
}

.category-preview-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.category-preview-links a {
  color: #cbd5e1;
  font-size: 0.94rem;
}

.category-preview-links a:hover {
  color: var(--gold);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
  color: #cbd5e1;
  font-size: 0.94rem;
}

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

.detail-hero {
  padding: 54px 0 42px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  filter: blur(20px) saturate(1.3);
  transform: scale(1.1);
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-wrap,
.player-section,
.detail-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
}

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

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

.detail-info h1 {
  font-size: clamp(2.4rem, 6vw, 5.2rem);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #e2e8f0;
  padding: 8px 12px;
}

.player-section {
  padding: 54px 0 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.56);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #111827;
  font-size: 2.2rem;
  box-shadow: 0 22px 54px rgba(250, 204, 21, 0.38);
  transform: translateX(4px);
}

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

.detail-content {
  padding: 28px 0 0;
}

.detail-article {
  padding: 34px;
}

.detail-article h2 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #fff;
}

.detail-article h2:not(:first-child) {
  margin-top: 34px;
}

.detail-article p {
  margin: 0;
  color: #d6e0ee;
  font-size: 1.05rem;
}

.related-section {
  padding-top: 54px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.88);
  padding: 42px 0;
}

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

.footer-logo {
  font-size: 1.35rem;
  color: var(--gold);
}

.site-footer p {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--muted);
}

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

.footer-links a {
  color: #cbd5e1;
}

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

.empty-state {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  padding: 34px;
  text-align: center;
  color: var(--muted);
}

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

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

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

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

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

  .hero-arrow {
    display: none;
  }

  .hero-content {
    padding: 46px 0 84px;
  }

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

  .split-section,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .feature-panel {
    position: static;
  }

  .detail-poster {
    max-width: 260px;
  }

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

@media (max-width: 620px) {
  .header-inner {
    height: 64px;
    width: min(100% - 24px, 1280px);
  }

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

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

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.04em;
  }

  .hero-actions,
  .feature-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .content-section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

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

  .movie-cover {
    aspect-ratio: 16 / 9;
  }

  .mini-card {
    grid-template-columns: 82px 1fr;
  }

  .mini-card img {
    width: 82px;
    height: 66px;
  }

  .page-hero {
    padding: 58px 0 42px;
  }

  .page-filter,
  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

  .page-filter input,
  .mobile-search input {
    width: 100%;
    min-width: 0;
  }

  .detail-hero {
    padding-top: 36px;
  }

  .detail-poster {
    max-width: 210px;
  }

  .detail-article {
    padding: 24px;
  }

  .player-play-button {
    width: 68px;
    height: 68px;
    font-size: 1.8rem;
  }
}
