* {
  box-sizing: border-box;
}

:root {
  --bg: #0b1020;
  --bg-soft: #111827;
  --panel: #151e32;
  --panel-light: #1f2937;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #facc15;
  --accent-strong: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.1), transparent 30rem),
    linear-gradient(135deg, #111827 0%, #0f172a 48%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 24, 39, 0.94);
  border-bottom: 1px solid rgba(31, 41, 55, 0.95);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 24px rgba(250, 204, 21, 0.24);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.nav-link {
  color: #cbd5e1;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
  background: rgba(31, 41, 55, 0.85);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(75, 85, 99, 0.8);
  border-radius: 14px;
  background: rgba(31, 41, 55, 0.9);
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search input,
.mobile-search input {
  width: 210px;
  padding: 10px 12px;
}

.header-search button,
.mobile-search button {
  border: 0;
  padding: 10px 14px;
  color: #111827;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--text);
  background: rgba(31, 41, 55, 0.85);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

.hero-section {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.08) contrast(1.05);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.9) 38%, rgba(15, 23, 42, 0.2) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.18) 45%, rgba(15, 23, 42, 0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 42px;
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.05;
}

.hero-summary {
  max-width: 640px;
  margin: 0 0 22px;
  color: #dbe4f0;
  font-size: 1.12rem;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 999px;
  padding: 4px 10px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.1);
  font-size: 0.82rem;
  line-height: 1.4;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 15px 36px rgba(245, 158, 11, 0.24);
}

.btn.secondary {
  color: var(--text);
  background: rgba(31, 41, 55, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.btn.full {
  width: 100%;
}

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.56);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel-title {
  color: var(--accent);
  font-weight: 800;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 18px;
  color: #e5e7eb;
  background: rgba(31, 41, 55, 0.74);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-mini-card:hover {
  transform: translateX(4px);
  background: rgba(55, 65, 81, 0.9);
}

.hero-mini-card img {
  width: 68px;
  height: 84px;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
}

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

.section-wrap {
  padding: 66px 0 0;
}

.section-wrap.tight {
  padding-top: 34px;
}

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

.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.section-heading a {
  color: var(--accent);
  font-weight: 800;
}

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

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.tile-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.9)),
    linear-gradient(135deg, rgba(239, 68, 68, 0.28), rgba(250, 204, 21, 0.22));
}

.tile-content {
  position: absolute;
  inset: auto 18px 18px;
  display: grid;
  gap: 2px;
}

.tile-content strong {
  font-size: 1.45rem;
}

.tile-content em {
  color: #cbd5e1;
  font-style: normal;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(21, 30, 50, 0.82);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(250, 204, 21, 0.45);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.34);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #020617);
}

.movie-card.compact .card-poster {
  aspect-ratio: 16 / 11;
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.movie-card:hover .card-poster img {
  transform: scale(1.06);
  opacity: 0.82;
}

.card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.26);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), #fb923c);
  font-weight: 900;
}

.card-body {
  padding: 15px;
}

.card-body h2 {
  margin: 10px 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--accent);
}

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

.card-tags .tag {
  font-size: 0.74rem;
  padding: 2px 8px;
}

.page-shell {
  padding: 28px 0 72px;
}

.breadcrumbs {
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  padding: 38px;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.16), transparent 22rem),
    linear-gradient(135deg, rgba(31, 41, 55, 0.92), rgba(15, 23, 42, 0.94));
  box-shadow: var(--shadow);
}

.page-hero.small h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.page-hero p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: #cbd5e1;
}

.page-hero.with-cover {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  align-items: center;
}

.page-hero.with-cover img {
  width: 190px;
  height: 240px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.filter-bar {
  margin: 24px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  background: rgba(21, 30, 50, 0.8);
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
}

.filter-bar input {
  flex: 1 1 320px;
}

.filter-bar select {
  flex: 0 1 180px;
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 28px;
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(21, 30, 50, 0.7);
}

.empty-state.is-visible {
  display: block;
}

.detail-page {
  position: relative;
}

.detail-hero {
  position: absolute;
  inset: 0 0 auto;
  height: 460px;
  overflow: hidden;
  z-index: -1;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.1);
  transform: scale(1.04);
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.48), #0b1020 86%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.45));
}

.detail-wrap {
  padding: 28px 0 76px;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle, rgba(250, 204, 21, 0.22), transparent 16rem),
    rgba(2, 6, 23, 0.35);
  transition: opacity 0.2s ease;
  cursor: pointer;
}

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

.play-button {
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-size: 2.15rem;
  box-shadow: 0 20px 50px rgba(250, 204, 21, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
}

.detail-content {
  margin-top: 24px;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background: rgba(21, 30, 50, 0.86);
}

.detail-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
}

.detail-content .lead {
  color: #e2e8f0;
  font-size: 1.12rem;
}

.detail-content h2 {
  margin: 30px 0 10px;
  color: #f8fafc;
  font-size: 1.35rem;
}

.detail-content p {
  color: #cbd5e1;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.side-card {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(21, 30, 50, 0.88);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.side-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 14px;
}

.side-card h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.side-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.58);
}

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

.footer-grid p {
  max-width: 520px;
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  color: var(--muted);
  margin: 6px 0;
}

.footer-grid a:hover {
  color: var(--accent);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-panel {
    margin-bottom: 32px;
  }

  .detail-side {
    position: static;
  }
}

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

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

  .page-hero.with-cover {
    grid-template-columns: 1fr;
  }

  .page-hero.with-cover img {
    width: 100%;
    height: 260px;
  }
}

@media (max-width: 620px) {
  .nav-wrap {
    height: 62px;
  }

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

  .hero-section,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 76px 0 42px;
  }

  .hero-panel {
    display: none;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .hero-copy h2 {
    font-size: 2rem;
  }

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

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

  .page-hero,
  .detail-content {
    padding: 22px;
  }

  .filter-bar select {
    flex: 1 1 100%;
  }

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