:root {
  color-scheme: dark;
  --bg: #0f0713;
  --bg-soft: #1d1026;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --text: #fff7ed;
  --muted: #d9c8c0;
  --brand: #f43f5e;
  --brand-2: #f97316;
  --brand-3: #facc15;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 2%, rgba(244, 63, 94, 0.32), transparent 32rem),
    radial-gradient(circle at 92% 8%, rgba(250, 204, 21, 0.16), transparent 28rem),
    linear-gradient(180deg, #180b1f 0%, #0f0713 42%, #08050c 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(127, 29, 29, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-3), var(--brand), #be123c);
  color: #31040d;
  box-shadow: 0 12px 25px rgba(250, 204, 21, 0.22);
}

.primary-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 700;
}

.primary-nav a,
.mobile-nav a,
.footer-links a {
  color: rgba(255, 247, 237, 0.86);
  transition: color 180ms ease, transform 180ms ease;
}

.primary-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #fde68a;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 230px;
}

.search-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
  padding: 11px 44px 11px 16px;
  font: inherit;
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.search-form button {
  position: absolute;
  right: 7px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #451a03;
  background: #fde68a;
  cursor: pointer;
  font-weight: 900;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 13px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 20px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 20px 18px;
  background: rgba(127, 29, 29, 0.95);
}

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

.page-main,
.home-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 20px 70px;
}

.hero {
  position: relative;
  min-height: 620px;
  border-radius: 36px;
  overflow: hidden;
  background: #120711;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  align-items: end;
  gap: 30px;
  padding: 62px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 560ms ease, transform 760ms ease;
  background-image:
    linear-gradient(90deg, rgba(10, 6, 13, 0.93) 0%, rgba(10, 6, 13, 0.68) 42%, rgba(10, 6, 13, 0.24) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-content {
  max-width: 720px;
  padding-bottom: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(253, 230, 138, 0.32);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.12);
  font-weight: 800;
}

.hero h1,
.page-title h1,
.detail-title {
  margin: 0;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h1 {
  font-size: clamp(44px, 7vw, 92px);
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}

.hero-desc {
  margin: 22px 0 0;
  max-width: 680px;
  color: rgba(255, 247, 237, 0.84);
  font-size: 19px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.hero-meta {
  margin-top: 22px;
}

.tag,
.meta-pill,
.card-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.tag {
  padding: 7px 12px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-actions,
.section-head,
.page-title,
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-actions {
  justify-content: flex-start;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.btn-primary {
  color: #451a03;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  box-shadow: 0 18px 36px rgba(251, 146, 60, 0.28);
}

.btn-soft {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.48);
}

.hero-dots {
  position: absolute;
  left: 62px;
  bottom: 34px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-dot {
  width: 42px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fde68a;
}

.section {
  margin-top: 52px;
}

.section-head {
  margin-bottom: 22px;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-kicker {
  margin: 7px 0 0;
  color: var(--muted);
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(253, 230, 138, 0.36);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 280ms ease;
}

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

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  color: #451a03;
  background: #fde68a;
  z-index: 2;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.card-body p {
  margin: 0;
  min-height: 50px;
  color: rgba(255, 247, 237, 0.75);
  font-size: 13px;
  line-height: 1.65;
}

.card-meta {
  margin-top: 12px;
  color: #fdba74;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  min-height: 156px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(244, 63, 94, 0.38), rgba(250, 204, 21, 0.12)),
    rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  transition: transform 190ms ease, border-color 190ms ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(253, 230, 138, 0.34);
}

.category-card strong {
  display: block;
  font-size: 22px;
  font-weight: 950;
}

.category-card span {
  display: block;
  margin-top: 12px;
  color: rgba(255, 247, 237, 0.75);
  line-height: 1.7;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #451a03;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  font-weight: 950;
}

.rank-cover {
  width: 62px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info strong {
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
  font-weight: 950;
}

.rank-info p {
  margin: 0;
  color: rgba(255, 247, 237, 0.72);
  line-height: 1.55;
}

.page-title {
  align-items: flex-end;
  margin-bottom: 28px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.28), rgba(255, 255, 255, 0.06));
  box-shadow: var(--shadow);
}

.page-title h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.page-title p {
  margin: 14px 0 0;
  max-width: 780px;
  color: rgba(255, 247, 237, 0.78);
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  color: rgba(255, 247, 237, 0.84);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.filter-button.is-active,
.filter-button:hover {
  color: #451a03;
  background: #fde68a;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  margin-bottom: 34px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(90deg, rgba(15, 7, 19, 0.94), rgba(15, 7, 19, 0.68)),
    var(--detail-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
  margin-bottom: 16px;
  color: #fdba74;
  font-weight: 800;
}

.detail-title {
  font-size: clamp(38px, 6vw, 78px);
}

.detail-lead {
  margin: 22px 0 0;
  color: rgba(255, 247, 237, 0.82);
  font-size: 18px;
  line-height: 1.85;
}

.detail-meta {
  margin-top: 24px;
}

.meta-pill {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff7ed;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.58));
  transition: opacity 180ms ease, visibility 180ms ease;
}

.play-button {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border: 0;
  border-radius: 50%;
  color: #451a03;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  box-shadow: 0 22px 48px rgba(251, 146, 60, 0.38);
  cursor: pointer;
  font-size: 34px;
  transform: scale(1);
  transition: transform 180ms ease;
}

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

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

.player-error {
  display: none;
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(190, 18, 60, 0.88);
  font-weight: 800;
}

.player-wrap.has-error .player-error {
  display: block;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  margin-top: 34px;
}

.prose-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.07);
  padding: 26px;
}

.prose-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 25px;
  font-weight: 950;
}

.prose-panel p {
  margin: 0 0 18px;
  color: rgba(255, 247, 237, 0.8);
  line-height: 1.9;
}

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

.related-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 62px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.related-item strong {
  display: block;
  font-weight: 900;
  line-height: 1.35;
}

.related-item span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 247, 237, 0.65);
  font-size: 13px;
}

.no-results {
  display: none;
  margin: 26px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 247, 237, 0.78);
  text-align: center;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255, 247, 237, 0.7);
}

.footer-brand strong {
  display: block;
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
}

.footer-brand span {
  display: block;
  margin-top: 6px;
}

.footer-links {
  display: flex;
  gap: 18px;
  font-weight: 800;
}

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

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

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

  .hero-poster {
    display: none;
  }
}

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

  .nav-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .mobile-nav .search-form {
    display: flex;
    min-width: 0;
  }

  .hero {
    min-height: 560px;
    border-radius: 28px;
  }

  .hero-slide {
    padding: 42px 24px 74px;
  }

  .hero-dots {
    left: 24px;
    bottom: 25px;
  }

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

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

  .page-title,
  .section-head,
  .footer-inner {
    display: block;
  }

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

  .rank-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding: 12px 14px;
  }

  .logo {
    font-size: 19px;
  }

  .page-main,
  .home-main {
    padding: 22px 14px 52px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-desc,
  .detail-lead {
    font-size: 16px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .detail-hero {
    padding: 22px;
    border-radius: 26px;
  }

  .play-button {
    width: 76px;
    height: 76px;
    font-size: 28px;
  }

  .footer-links {
    margin-top: 18px;
    flex-wrap: wrap;
  }
}
