:root {
  color-scheme: dark;
  --bg: #060708;
  --bg-soft: #111827;
  --panel: rgba(31, 41, 55, 0.54);
  --panel-strong: rgba(17, 24, 39, 0.9);
  --line: rgba(249, 115, 22, 0.18);
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --primary: #f97316;
  --primary-soft: rgba(249, 115, 22, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 15%, rgba(120, 53, 15, 0.25), transparent 32rem),
    linear-gradient(135deg, #111827 0%, #0b0f17 42%, #000 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.88);
  box-shadow: 0 12px 42px rgba(249, 115, 22, 0.08);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 12px 35px rgba(249, 115, 22, 0.32);
}

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

.brand-copy strong {
  font-size: 21px;
  letter-spacing: 0.03em;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--dim);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #d1d5db;
  font-size: 15px;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
  transition: color 180ms ease, transform 180ms ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--primary);
}

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  min-height: 42px;
  border: 1px solid rgba(75, 85, 99, 0.8);
  border-radius: 999px;
  padding: 0 16px;
  color: #e5e7eb;
  outline: none;
  background: rgba(31, 41, 55, 0.66);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-search input {
  width: 190px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.section-more {
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 34px rgba(249, 115, 22, 0.24);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.section-more:hover {
  background: #ea580c;
  transform: translateY(-1px);
}

.ghost-btn {
  color: #fff;
  background: rgba(31, 41, 55, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.ghost-btn:hover {
  border-color: rgba(249, 115, 22, 0.6);
  transform: translateY(-1px);
}

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

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid rgba(249, 115, 22, 0.14);
  background: rgba(0, 0, 0, 0.95);
}

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

.mobile-panel nav {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  color: #e5e7eb;
}

.mobile-search input {
  width: 100%;
  flex: 1;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.68) 48%, rgba(0, 0, 0, 0.24) 100%),
    radial-gradient(circle at 50% 45%, rgba(249, 115, 22, 0.18), transparent 26rem);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-tags,
.badge-line,
.meta-row,
.tag-cloud,
.tag-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags span,
.badge-line span,
.meta-row span,
.tag-cloud span,
.tag-line span {
  border-radius: 999px;
  padding: 6px 11px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(249, 115, 22, 0.22);
  font-size: 13px;
}

.hero-tags {
  justify-content: center;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}

.hero p {
  width: min(760px, 100%);
  margin: 0 0 30px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  font-size: 34px;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.hero-nav:hover {
  background: rgba(0, 0, 0, 0.78);
  transform: translateY(-50%) scale(1.05);
}

.hero-nav.prev {
  left: 22px;
}

.hero-nav.next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  width: 34px;
  background: var(--primary);
}

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

.band-section {
  border-top: 1px solid rgba(249, 115, 22, 0.12);
  border-bottom: 1px solid rgba(249, 115, 22, 0.12);
  background: linear-gradient(90deg, rgba(124, 45, 18, 0.22), rgba(17, 24, 39, 0.32));
}

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

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2,
.side-panel h2,
.detail-side h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.heading-icon {
  font-size: 30px;
}

.section-more {
  padding: 9px 16px;
  font-size: 14px;
}

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

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

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

.movie-card,
.movie-row,
.category-tile,
.category-overview-card,
.text-card,
.player-card,
.side-panel,
.detail-side {
  border: 1px solid var(--line-soft);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.movie-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.movie-card:hover,
.movie-row:hover,
.category-tile:hover,
.category-overview-card:hover,
.related-item:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(31, 41, 55, 0.78);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(15, 23, 42, 0.9));
}

.movie-card.compact .poster-wrap {
  aspect-ratio: 16 / 11;
  border-radius: 16px;
  margin-bottom: 10px;
}

.poster-wrap img,
.row-poster img,
.related-item img,
.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.movie-card:hover img,
.movie-row:hover img,
.related-item:hover img,
.category-overview-card:hover img {
  transform: scale(1.06);
}

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

.year-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.78);
  font-size: 12px;
}

.year-pill {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--primary);
  font-size: 14px;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-card strong,
.movie-row strong,
.related-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 180ms ease;
}

.movie-card:hover strong,
.movie-row:hover strong,
.related-item:hover strong {
  color: var(--primary);
}

.movie-card em,
.movie-row em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--dim);
  font-style: normal;
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.compact {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.movie-card.compact small,
.related-item small {
  color: var(--dim);
}

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

.movie-row {
  border-radius: 18px;
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.row-link {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 150px;
}

.row-poster {
  position: relative;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.row-content {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
}

.tag-line span {
  padding: 4px 8px;
  color: #d1d5db;
  background: rgba(55, 65, 81, 0.7);
  border-color: rgba(75, 85, 99, 0.6);
}

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

.category-tile,
.category-overview-card {
  display: grid;
  gap: 10px;
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.category-tile strong,
.category-overview-card strong {
  color: #fff;
  font-size: 22px;
}

.category-tile span,
.category-overview-card em {
  color: var(--dim);
  font-style: normal;
  line-height: 1.65;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.category-covers img {
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
}

.sub-hero {
  padding: 70px 0 28px;
}

.sub-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 7px 13px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(249, 115, 22, 0.18);
}

.sub-hero h1 {
  margin: 0 0 16px;
  max-width: 880px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.sub-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 22px 0 0;
  color: var(--dim);
  font-size: 14px;
}

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

.breadcrumb strong {
  color: #fff;
  font-weight: 600;
}

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

.filter-panel input {
  flex: 1;
  min-width: 220px;
}

.filter-panel select {
  min-width: 150px;
}

.empty-state {
  display: none;
  margin: 24px 0;
  border-radius: 18px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(31, 41, 55, 0.6);
}

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

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

.side-panel {
  position: sticky;
  top: 92px;
  border-radius: var(--radius);
  padding: 22px;
}

.side-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

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

.detail-main {
  min-width: 0;
}

.player-card,
.detail-side,
.text-card {
  border-radius: var(--radius);
}

.player-card {
  overflow: hidden;
  background: #000;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

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

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(249, 115, 22, 0.24), rgba(0, 0, 0, 0.72));
}

.play-ring {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
}

.play-ring b {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 20px 60px rgba(249, 115, 22, 0.38);
  font-size: 34px;
  text-indent: 5px;
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: none;
  border-radius: 14px;
  padding: 12px 14px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.88);
}

.player-error.is-visible {
  display: block;
}

.detail-copy {
  padding-top: 24px;
}

.detail-copy h1 {
  margin: 16px 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.tag-cloud {
  margin-bottom: 24px;
}

.text-card {
  margin-bottom: 18px;
  padding: 22px;
}

.text-card h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 20px;
}

.text-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.accent-card {
  border-color: rgba(249, 115, 22, 0.28);
  background: linear-gradient(135deg, rgba(124, 45, 18, 0.25), rgba(31, 41, 55, 0.56));
}

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

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

.related-item {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(31, 41, 55, 0.46);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.related-item span {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.related-item em {
  position: absolute;
  right: 6px;
  bottom: 6px;
  border-radius: 999px;
  padding: 3px 6px;
  color: #fff;
  background: rgba(0, 0, 0, 0.78);
  font-size: 11px;
  font-style: normal;
}

.related-item strong,
.related-item small {
  margin-right: 10px;
}

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

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  font-size: 22px;
  font-weight: 800;
}

.site-footer p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--dim);
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #d1d5db;
}

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

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

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

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

  .movie-detail,
  .two-column {
    grid-template-columns: 1fr;
  }

  .detail-side,
  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-shell {
    min-height: 64px;
  }

  .header-search {
    display: none;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    align-items: flex-start;
    text-align: left;
  }

  .hero-tags {
    justify-content: flex-start;
  }

  .hero-actions,
  .section-heading,
  .footer-shell,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-nav {
    display: none;
  }

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

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

  .row-link {
    grid-template-columns: 122px 1fr;
    min-height: 124px;
  }

  .row-content {
    padding: 13px;
  }

  .movie-card strong,
  .movie-row strong {
    font-size: 15px;
  }

  .movie-card em,
  .movie-row em,
  .badge-line,
  .tag-line {
    display: none;
  }

  .card-body {
    padding: 12px;
  }

  .sub-hero {
    padding-top: 42px;
  }

  .filter-panel input,
  .filter-panel select {
    width: 100%;
    min-width: 0;
  }

  .movie-detail {
    padding-bottom: 48px;
  }

  .detail-copy h1 {
    font-size: 34px;
  }

  .text-card {
    padding: 18px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .row-link,
  .related-item {
    grid-template-columns: 108px 1fr;
  }
}
