:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-soft: #0f172a;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: #111827;
  --line: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --muted: #d1d5db;
  --muted-dark: #9ca3af;
  --accent: #f97316;
  --accent-strong: #ea580c;
  --accent-soft: rgba(249, 115, 22, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(249, 115, 22, 0.18), transparent 30rem),
    linear-gradient(180deg, #030712 0%, #111827 45%, #030712 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #fb923c);
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

.brand-name {
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 15px;
  flex: 1;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #fb923c;
}

.header-search {
  width: min(330px, 30vw);
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

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

.header-search input {
  width: 100%;
  padding: 11px 14px;
}

.header-search button,
.mobile-nav button {
  border: 0;
  padding: 11px 16px;
  color: #fff;
  background: var(--accent);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px 12px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
}

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

.mobile-nav form {
  flex: 1 1 100%;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.mobile-nav input {
  flex: 1;
  padding: 12px;
}

.hero-carousel {
  position: relative;
  height: min(820px, calc(100vh - 0px));
  min-height: 660px;
  overflow: hidden;
  background: #030712;
}

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

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3) blur(8px);
  transform: scale(1.06);
}

.hero-overlay,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.98) 0%, rgba(3, 7, 18, 0.72) 46%, rgba(3, 7, 18, 0.32) 100%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.2) 0%, #030712 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: 54px;
  padding-top: 72px;
}

.hero-text h1,
.detail-info h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-summary {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  color: #fb923c;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  padding: 0 24px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.32);
}

.primary-btn:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

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

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.text-btn,
.section-link {
  color: #fb923c;
}

.text-btn:hover,
.section-link:hover {
  color: #fed7aa;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, #111827, #431407);
}

.hero-poster img,
.detail-poster img,
.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-missing {
  opacity: 0;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 5;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 56px;
  background: var(--accent);
}

.site-section {
  padding: 76px 0;
}

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

.section-container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.section-heading,
.category-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.section-heading h2,
.category-block h2,
.detail-article h2,
.side-panel h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-heading p,
.category-block p,
.page-hero p,
.detail-line,
.detail-article p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

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

.featured-grid,
.ranking-grid {
  gap: 24px;
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: #fff;
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 15%, rgba(249, 115, 22, 0.34), transparent 40%),
    linear-gradient(135deg, #111827, #1f2937 48%, #431407);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.poster-frame img {
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72) 100%);
}

.poster-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.94);
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  left: auto;
  right: 10px;
  min-width: 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
}

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

.card-title {
  margin-top: 12px;
  font-weight: 800;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

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

.card-line {
  margin-top: 6px;
  color: var(--muted-dark);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 7px;
  color: #fb923c;
  font-size: 12px;
}

.compact-card .card-line {
  display: none;
}

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

.category-tile,
.category-block,
.side-panel,
.detail-article,
.filter-panel,
.player-box {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.category-tile {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.2), transparent 42%),
    rgba(17, 24, 39, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile span {
  font-size: 22px;
  font-weight: 800;
}

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

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 64px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 30%, rgba(249, 115, 22, 0.22), transparent 26rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.94), #030712);
}

.small-hero h1 {
  max-width: 820px;
}

.small-hero p {
  max-width: 820px;
  font-size: 18px;
}

.category-list {
  display: grid;
  gap: 28px;
}

.category-block {
  padding: 28px;
}

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

.filter-panel input,
.filter-panel select,
.big-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.06);
}

.filter-panel select {
  color: #fff;
}

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

.empty-state {
  display: none;
  margin: 30px 0 0;
  color: var(--muted);
  text-align: center;
}

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

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

.search-status {
  margin-bottom: 22px;
  color: #fb923c;
  font-weight: 800;
}

.big-search {
  max-width: 760px;
  margin-top: 24px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, #111827, #431407);
  box-shadow: var(--shadow);
}

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

.breadcrumb a:hover {
  color: #fb923c;
}

.detail-line {
  max-width: 800px;
  margin: 18px 0 0;
  font-size: 20px;
}

.player-section {
  padding-top: 40px;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(249, 115, 22, 0.22), rgba(0, 0, 0, 0.78) 58%),
    rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
  display: inline-flex;
  width: 82px;
  height: 82px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.36);
  font-size: 34px;
}

.player-title {
  max-width: 86%;
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 900;
  text-align: center;
}

.player-status {
  color: var(--muted);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.detail-article,
.side-panel {
  padding: 28px;
}

.detail-article h2,
.side-panel h2 {
  margin-top: 0;
  margin-bottom: 18px;
}

.detail-article p + h2 {
  margin-top: 34px;
}

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

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

.info-list dt {
  color: #fb923c;
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: var(--muted);
}

.side-related {
  display: grid;
  gap: 18px;
}

.side-related .movie-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.side-related .poster-frame {
  border-radius: 14px;
}

.side-related .card-title {
  margin-top: 0;
}

.side-related .card-meta,
.side-related .card-line {
  grid-column: 2;
}

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

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

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 20px;
  color: var(--muted);
}

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

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

  .header-search {
    margin-left: auto;
  }

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

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

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

@media (max-width: 900px) {
  .header-search {
    display: none;
  }

  .hero-carousel {
    min-height: 760px;
    height: auto;
  }

  .hero-content {
    position: relative;
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 760px;
    padding: 110px 0 86px;
  }

  .hero-poster {
    width: min(300px, 80vw);
  }

  .hero-control {
    display: none;
  }

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

  .detail-poster {
    width: min(320px, 75vw);
  }

  .footer-links {
    justify-content: flex-start;
  }

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

@media (max-width: 680px) {
  .header-inner,
  .section-container,
  .footer-inner,
  .mobile-nav,
  .hero-content {
    width: min(100% - 24px, 1280px);
  }

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

  .hero-text h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .site-section {
    padding: 54px 0;
  }

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

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

  .section-heading,
  .category-block-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hero {
    padding: 62px 0 52px;
  }

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

  .player-icon {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
}
