:root {
  color-scheme: dark;
  --bg: #07090f;
  --bg-soft: #101522;
  --panel: rgba(17, 24, 39, 0.88);
  --panel-strong: #111827;
  --line: rgba(255, 255, 255, 0.10);
  --text: #f8fafc;
  --muted: #a3aab8;
  --amber: #f59e0b;
  --orange: #ea580c;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.20), transparent 28rem),
    radial-gradient(circle at 88% 10%, rgba(234, 88, 12, 0.18), transparent 26rem),
    linear-gradient(180deg, #05070c 0%, #090d15 48%, #05070c 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 70%);
  z-index: -1;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 12, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.28);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark,
.footer-brand span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong,
.footer-brand {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fde68a, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

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

.nav-link,
.mobile-nav-link {
  color: #d1d5db;
  border-radius: 999px;
  padding: 10px 16px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.14);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 18px;
  gap: 8px;
  flex-wrap: wrap;
}

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

.sub-link {
  color: #fbbf24;
}

main,
.page-main,
.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 60px;
}

.hero-carousel {
  position: relative;
  margin: 28px auto 34px;
  min-height: 610px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: #0b0f18;
  box-shadow: var(--shadow);
}

.hero-track,
.hero-slide,
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 42px;
  padding: 72px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(3px) saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 12, 0.96), rgba(5, 7, 12, 0.66) 50%, rgba(5, 7, 12, 0.90)),
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.34), transparent 34rem);
}

.hero-copy,
.hero-poster,
.hero-controls {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 13px;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.10);
  font-size: 0.84rem;
  font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.lead-text {
  max-width: 760px;
  margin: 22px 0 0;
  color: #d7dce6;
  font-size: 1.06rem;
  line-height: 1.85;
}

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

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

.hero-tags span,
.movie-tags span,
.detail-tags span,
.chip-links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.home-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.home-search-form button {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  box-shadow: 0 16px 28px rgba(245, 158, 11, 0.24);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.primary-btn:hover,
.ghost-btn:hover,
.home-search-form button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  justify-self: end;
  width: min(360px, 100%);
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: rotate(2deg);
}

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

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 9px 14px;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  left: 72px;
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.active {
  width: 34px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.quick-search-band,
.page-hero,
.detail-hero,
.player-section,
.detail-text-section,
.content-section {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.22);
}

.quick-search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 28px;
  align-items: center;
  padding: 28px;
}

.quick-search-band h2,
.section-head h2,
.page-hero h1,
.player-section h2,
.detail-text-section h2,
.slim-section h2 {
  margin: 0;
  font-weight: 950;
}

.quick-search-band p,
.section-head p,
.site-footer p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.75;
}

.home-search-form {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.home-search-form input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.home-search-form input {
  border: 0;
  padding: 0 14px;
  background: transparent;
}

.content-section {
  margin-top: 28px;
  padding: 28px;
}

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

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

.section-more,
.text-link {
  color: #fbbf24;
  font-weight: 900;
}

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

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

.movie-card,
.wide-card,
.category-overview-card,
.category-tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover,
.wide-card:hover,
.category-overview-card:hover,
.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.movie-poster,
.wide-cover img,
.detail-poster img,
.player-shell video,
.category-cover-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card:hover .movie-poster {
  transform: scale(1.08);
}

.movie-poster {
  transition: transform 0.45s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 58%);
}

.play-pill,
.rank-badge,
.wide-rank {
  position: absolute;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 950;
}

.play-pill {
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 7px 11px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.movie-info {
  padding: 15px;
}

.movie-info h2,
.wide-content h2,
.category-overview-card h2 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 1.04rem;
  line-height: 1.35;
  font-weight: 900;
}

.compact .movie-info h2 {
  font-size: 0.96rem;
}

.movie-info p,
.wide-content p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.compact .movie-info p {
  display: none;
}

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  font-size: 0.8rem;
}

.movie-category {
  color: #fcd34d;
  font-weight: 900;
}

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

.category-tile {
  min-height: 168px;
  padding: 22px;
  background:
    radial-gradient(circle at right top, rgba(245, 158, 11, 0.18), transparent 14rem),
    rgba(255, 255, 255, 0.05);
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  font-size: 1.35rem;
  font-weight: 950;
}

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

.wide-list {
  display: grid;
  gap: 16px;
}

.wide-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-height: 220px;
}

.wide-cover {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.wide-rank {
  top: 12px;
  left: 12px;
  border-radius: 14px;
  padding: 8px 12px;
}

.wide-content {
  padding: 22px;
}

.page-main,
.detail-main {
  padding-top: 28px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 70px);
  background:
    radial-gradient(circle at 80% 15%, rgba(245, 158, 11, 0.22), transparent 25rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(5, 7, 12, 0.92));
}

.page-hero.small-hero,
.page-hero.category-hero,
.page-hero.ranking-hero,
.page-hero.search-hero {
  min-height: 280px;
  display: grid;
  align-items: center;
}

.inline-actions {
  margin-top: 24px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 22px;
}

.filter-input,
.filter-select {
  min-height: 48px;
  border-radius: 16px;
  padding: 0 14px;
}

.filter-select option {
  color: #111827;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.category-cover-stack {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  min-height: 180px;
}

.category-cover-stack img {
  border-radius: 16px;
  background: #111827;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.category-samples a {
  color: #d1d5db;
  font-size: 0.88rem;
}

.slim-section {
  margin-top: 22px;
}

.slim-section h2 {
  margin-bottom: 16px;
}

.secondary-rank-grid {
  margin-top: 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #c7ceda;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 30px;
  padding: 28px;
  background:
    radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.18), transparent 24rem),
    rgba(17, 24, 39, 0.86);
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  overflow: hidden;
  background: #111827;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.detail-copy h1 {
  font-size: clamp(2rem, 4vw, 4.4rem);
}

.detail-tags {
  margin: 24px 0;
}

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

.detail-info-grid div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.detail-info-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.detail-info-grid strong {
  color: #fff;
}

.player-section {
  margin-top: 28px;
  padding: 28px;
}

.player-section h2 {
  margin-bottom: 18px;
  font-size: 1.6rem;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  z-index: 3;
}

.player-overlay[hidden] {
  display: none;
}

.player-play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 48px rgba(245, 158, 11, 0.34);
  font-size: 2.1rem;
  padding-left: 5px;
}

.player-overlay strong {
  font-size: 1.2rem;
}

.detail-text-section {
  padding: 30px;
}

.detail-text-section h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.detail-text-section h2 + p {
  margin: 0 0 24px;
  color: #d1d5db;
  line-height: 2;
  font-size: 1.02rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding: 42px 22px 24px;
  background: rgba(5, 7, 12, 0.92);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.1fr;
  gap: 36px;
}

.footer-brand {
  margin-bottom: 12px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 1.05rem;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.footer-bottom {
  max-width: 1280px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #8f98a8;
  font-size: 0.9rem;
}

.is-hidden {
  display: none !important;
}

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 280px;
    padding: 52px;
  }

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

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

  .mobile-menu-button {
    display: block;
  }

  .hero-carousel {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: end;
    padding: 30px;
  }

  .hero-poster {
    width: 180px;
    justify-self: start;
    order: -1;
    transform: rotate(0deg);
  }

  .hero-controls {
    left: 30px;
    bottom: 24px;
  }

  .quick-search-band,
  .detail-hero,
  .footer-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 640px) {
  main,
  .page-main,
  .detail-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .header-inner {
    height: 66px;
    padding: 0 14px;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    margin-top: 16px;
    min-height: 650px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.25rem;
    line-height: 1.05;
  }

  .quick-search-band,
  .content-section,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-text-section {
    border-radius: 20px;
    padding: 18px;
  }

  .home-search-form {
    border-radius: 18px;
    flex-direction: column;
  }

  .home-search-form input {
    min-height: 44px;
  }

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

  .wide-card {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 170px;
  }

  .wide-content {
    padding: 14px;
  }

  .wide-content p,
  .movie-tags {
    display: none;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info h2 {
    font-size: 0.92rem;
  }

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

  .footer-links.two-col {
    grid-template-columns: 1fr;
  }
}
