:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-solid: #111827;
  --panel-soft: rgba(31, 41, 55, 0.7);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f9fafb;
  --muted: #9ca3af;
  --subtle: #d1d5db;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --gold: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 34rem),
    linear-gradient(180deg, #030712 0%, #111827 48%, #030712 100%);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.76);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

.brand-name {
  font-size: 19px;
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--subtle);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fff;
  background: rgba(249, 115, 22, 0.16);
}

.top-search {
  margin-left: auto;
  width: min(340px, 32vw);
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.86);
  overflow: hidden;
}

.top-search input,
.mobile-search input,
.filter-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.top-search input {
  padding: 12px 14px;
}

.top-search button,
.mobile-search button {
  border: 0;
  padding: 12px 14px;
  color: #fff;
  background: var(--orange);
  transition: background 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover {
  background: var(--orange-dark);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.82);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.9s ease;
}

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

.hero-backdrop,
.page-hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.34) blur(8px);
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.54) 52%, rgba(3, 7, 18, 0.92)),
    linear-gradient(180deg, rgba(3, 7, 18, 0.08), #030712 96%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: center;
  padding: 72px 0 96px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--orange);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  max-width: 850px;
  font-size: clamp(42px, 8vw, 96px);
}

.hero-desc {
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--subtle);
  font-size: clamp(17px, 2.4vw, 25px);
  line-height: 1.75;
}

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

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

.hero-tags span,
.tag-row span,
.quick-tags button {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
}

.hero-tags span {
  padding: 8px 13px;
  font-weight: 700;
}

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

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

.primary-button {
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #fff;
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.27);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  backdrop-filter: blur(10px);
}

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

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fff;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.3);
}

.hero-dots button.active {
  width: 28px;
  border-radius: 999px;
  background: var(--orange);
}

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

.content-section.tight {
  padding: 56px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(27px, 4vw, 42px);
  letter-spacing: -0.03em;
}

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

.section-heading a {
  color: #fed7aa;
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.82), rgba(17, 24, 39, 0.78));
  box-shadow: 0 18px 60px 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(249, 115, 22, 0.44);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
}

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

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: brightness(0.78);
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.92);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.type-badge {
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  background: rgba(249, 115, 22, 0.88);
}

.rank-badge {
  right: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #f59e0b);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 2.85em;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
  color: #fdba74;
}

.movie-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 4.6em;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.movie-card.compact .movie-desc {
  display: none;
}

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

.tag-row span {
  padding: 5px 8px;
  font-size: 12px;
}

.category-section {
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.08), rgba(17, 24, 39, 0.64), rgba(249, 115, 22, 0.06));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.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 {
  min-height: 142px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.24), transparent 11rem),
    rgba(17, 24, 39, 0.72);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.42);
}

.category-tile strong {
  display: block;
  font-size: 23px;
  margin-bottom: 10px;
}

.category-tile span {
  color: var(--muted);
  line-height: 1.65;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.small-hero {
  min-height: 360px;
  display: grid;
  place-items: center;
}

.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.48), #030712 100%);
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 48px));
  padding: 76px 0;
}

.page-hero h1 {
  font-size: clamp(40px, 7vw, 72px);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--subtle);
  font-size: 19px;
  line-height: 1.75;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.72);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
}

.filter-panel.prominent {
  padding: 24px;
}

.filter-panel input {
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(3, 7, 18, 0.58);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-tags button {
  padding: 8px 12px;
}

.quick-tags button.active {
  color: #fff;
  background: var(--orange);
}

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

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

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 76px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #fed7aa;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  max-width: 870px;
  font-size: clamp(36px, 6vw, 74px);
}

.detail-one-line {
  max-width: 850px;
  margin: 24px 0 0;
  color: var(--subtle);
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.detail-info .primary-button {
  margin-top: 30px;
}

.detail-content {
  padding-top: 48px;
}

.player-card {
  margin-bottom: 42px;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: #05070d;
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.32), rgba(0, 0, 0, 0.66));
}

.player-overlay.is-hidden {
  display: none;
}

.player-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  box-shadow: 0 24px 50px rgba(249, 115, 22, 0.32);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 20px;
}

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

.detail-block,
.detail-side {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: var(--panel);
}

.detail-block h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-block p {
  margin: 0;
  color: var(--subtle);
  line-height: 1.9;
  font-size: 16px;
}

.info-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

.info-list div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  color: #fff;
}

.info-list a {
  color: #fdba74;
}

.side-grid {
  display: grid;
  gap: 16px;
}

.side-grid .movie-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
}

.side-grid .poster-link {
  aspect-ratio: 3 / 4;
}

.side-grid .movie-card-body {
  padding: 12px;
}

.side-grid .movie-title {
  min-height: auto;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.82);
}

.footer-inner {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand p {
  max-width: 460px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

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

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

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

  .movie-grid.six-cols,
  .ranking-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .detail-side {
    display: block;
  }
}

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

  .header-inner {
    justify-content: space-between;
  }

  .menu-button {
    display: block;
  }

  .mobile-nav {
    position: fixed;
    inset: 72px 16px auto 16px;
    z-index: 70;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(3, 7, 18, 0.96);
    box-shadow: var(--shadow);
  }

  body.menu-open .mobile-nav {
    display: grid;
    gap: 8px;
  }

  .mobile-search {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.86);
  }

  .mobile-search input {
    padding: 12px 14px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 48px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    justify-self: center;
    transform: rotate(0deg);
  }

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

  .detail-poster {
    width: min(260px, 70vw);
  }
}

@media (max-width: 720px) {
  .header-inner,
  .content-section,
  .page-hero-inner,
  .detail-shell,
  .footer-inner,
  .hero-content {
    width: min(100% - 32px, 1280px);
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

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

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

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

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

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

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

  .movie-desc,
  .tag-row {
    display: none;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-shell {
    padding-bottom: 46px;
  }

  .detail-info h1 {
    font-size: 36px;
  }

  .detail-block,
  .detail-side {
    padding: 18px;
  }

  .side-grid .movie-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .movie-grid.six-cols,
  .ranking-list {
    grid-template-columns: 1fr;
  }
}
