:root {
  color-scheme: dark;
  --bg: #070b16;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --brand: #f97316;
  --brand-2: #facc15;
  --brand-soft: rgba(249, 115, 22, 0.18);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(249, 115, 22, 0.2), transparent 34%),
    radial-gradient(circle at 82% 6%, rgba(250, 204, 21, 0.12), transparent 30%),
    linear-gradient(135deg, #050816 0%, #0f172a 48%, #111827 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 22, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 74px;
}

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

.site-logo::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 28px rgba(249, 115, 22, 0.55);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: var(--brand-soft);
}

.header-search {
  margin-left: auto;
  display: flex;
  width: min(360px, 32vw);
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
}

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

.header-search input {
  flex: 1;
  padding: 10px 12px;
}

.header-search button,
.primary-button,
.secondary-button,
.player-start,
.filter-panel button {
  border: 0;
  cursor: pointer;
  color: #111827;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 35px rgba(249, 115, 22, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 9px 15px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
}

.secondary-button {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: none;
}

.header-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.player-start:hover,
.filter-panel button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(249, 115, 22, 0.35);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
}

.mobile-nav {
  display: none;
}

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

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 78vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 11, 22, 0.92), rgba(7, 11, 22, 0.68), rgba(7, 11, 22, 0.96));
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.75s ease;
}

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.03);
}

.hero-shell {
  position: relative;
  z-index: 2;
  padding: 84px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: 34px;
  align-items: end;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.13);
  font-size: 14px;
  font-weight: 800;
}

.hero-title,
.page-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-title strong,
.page-title strong {
  color: var(--brand-2);
}

.hero-movie-title {
  margin: 18px 0 12px;
  font-size: clamp(28px, 3.3vw, 48px);
  line-height: 1.08;
}

.hero-desc,
.page-intro,
.section-head p,
.category-tile span,
.card-body p,
.detail-summary,
.footer-inner p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-desc {
  max-width: 720px;
  font-size: 17px;
}

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

.hero-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-panel img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-panel-content {
  padding: 18px;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.section-block {
  padding: 56px 0;
}

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

.section-head h2,
.page-headline h1,
.detail-main h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-intro {
  margin: 8px 0 0;
  max-width: 720px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  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.5);
  box-shadow: 0 26px 62px rgba(0, 0, 0, 0.34);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.card-cover img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-year {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: var(--brand-2);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.36;
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
}

.tag-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.meta-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.13);
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  min-height: 142px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.76));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 950;
}

.rank-item img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 13px;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.rank-item p {
  margin: 0;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.55;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 12px;
  margin: 28px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(7, 11, 22, 0.62);
}

.filter-panel button {
  padding: 0 18px;
}

.detail-hero {
  padding: 44px 0 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--subtle);
  font-size: 14px;
}

.breadcrumb a {
  color: #fed7aa;
}

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

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.detail-summary {
  margin: 18px 0 20px;
  font-size: 17px;
}

.detail-section {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-section p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.player-card {
  position: relative;
  overflow: hidden;
  margin-top: 30px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.2), rgba(2, 6, 23, 0.16));
  transition: opacity 0.22s ease;
}

.player-start {
  pointer-events: auto;
  min-height: 58px;
  padding: 0 30px;
  font-size: 17px;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

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

.compact-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
}

.compact-card img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.compact-card span {
  display: block;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.no-result {
  display: none;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

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

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 22, 0.88);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 28px;
  padding: 36px 0;
}

.footer-inner strong {
  font-size: 22px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

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

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

@media (max-width: 980px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 8px;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding-bottom: 14px;
  }

  .mobile-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mobile-category-links a {
    color: var(--muted);
    font-size: 13px;
  }

  .hero-shell,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

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

  .ranking-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .header-inner,
  .page-shell,
  .hero-shell,
  .footer-inner {
    width: min(100% - 24px, 1240px);
  }

  .site-logo {
    font-size: 18px;
  }

  .hero-shell {
    padding: 58px 0;
  }

  .hero-title,
  .page-title {
    font-size: 38px;
  }

  .section-block {
    padding: 38px 0;
  }

  .section-head,
  .page-headline {
    display: block;
  }

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

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

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

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

  .detail-section {
    padding: 18px;
  }
}
