:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(31, 41, 55, 0.36);
  --panel-strong: rgba(17, 24, 39, 0.86);
  --line: rgba(249, 115, 22, 0.22);
  --muted-line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --orange: #f97316;
  --orange-strong: #ea580c;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  font-family: 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;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 28rem), linear-gradient(135deg, #0f172a 0%, #111827 44%, #000 100%);
  color: var(--text);
  min-height: 100vh;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.28), rgba(15, 23, 42, 0.92));
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(249, 115, 22, 0.25);
  box-shadow: 0 10px 40px rgba(249, 115, 22, 0.08);
}

.header-inner,
.max-wrap,
.footer-grid,
.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #fb923c);
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.35);
  font-size: 14px;
}

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

.brand-text strong {
  color: var(--orange);
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  color: #d1d5db;
  font-weight: 600;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.library-search input {
  border: 1px solid #374151;
  outline: 0;
  color: #e5e7eb;
  background: rgba(31, 41, 55, 0.55);
  border-radius: 999px;
  padding: 10px 14px;
  min-width: 190px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.library-search input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

.top-search button,
.primary-btn,
.ghost-btn,
.plain-link {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.top-search button,
.primary-btn {
  color: #fff;
  background: var(--orange);
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.28);
}

.top-search button:hover,
.primary-btn:hover {
  background: var(--orange-strong);
  transform: translateY(-1px);
}

.ghost-btn,
.plain-link {
  color: #fff;
  background: rgba(31, 41, 55, 0.72);
  border: 1px solid var(--muted-line);
}

.ghost-btn:hover,
.plain-link:hover {
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(55, 65, 81, 0.82);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--muted-line);
  border-radius: 12px;
  background: rgba(31, 41, 55, 0.65);
  color: #fff;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 4s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.78) 42%, rgba(0, 0, 0, 0.2) 100%);
}

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

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

.hero-tags a,
.card-meta em,
.detail-meta a,
.detail-meta span,
.tag-row a {
  font-style: normal;
  color: #fff;
  background: rgba(249, 115, 22, 0.88);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1;
}

.hero-tags a + a,
.card-meta em + em,
.detail-meta span,
.tag-row a {
  background: rgba(55, 65, 81, 0.9);
  color: #d1d5db;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 50px rgba(0, 0, 0, 0.7);
}

.hero-content p {
  margin: 0 auto 28px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  max-width: 820px;
  line-height: 1.8;
}

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

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

.hero-nav:hover {
  background: rgba(0, 0, 0, 0.76);
}

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

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

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 32px;
  background: var(--orange);
}

.quick-category {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  transform: translateY(-38px);
  position: relative;
  z-index: 3;
}

.quick-category a {
  min-height: 92px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.86);
  border: 1px solid var(--muted-line);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.quick-category strong {
  color: #fff;
  font-size: 17px;
}

.quick-category span {
  color: var(--orange);
  font-size: 13px;
}

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

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

.section-heading {
  justify-content: flex-start;
}

.section-heading > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--orange);
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.18);
}

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

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

.movie-grid,
.compact-grid,
.feature-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card,
.category-card {
  min-width: 0;
}

.movie-card > a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--muted-line);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card > a:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(31, 41, 55, 0.54);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.poster-wrap img,
.movie-card.large img,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card > a:hover img,
.category-card:hover img {
  transform: scale(1.06);
}

.poster-shade,
.large-overlay,
.category-card span {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent 62%);
}

.year-badge,
.rank-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
}

.card-body,
.list-card-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.movie-card strong {
  display: block;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card:hover strong {
  color: var(--orange);
}

.movie-card span {
  color: var(--muted);
  line-height: 1.65;
}

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

.movie-card.compact .poster-wrap {
  border-radius: 14px;
  margin-bottom: 10px;
}

.movie-card.compact strong {
  font-size: 14px;
}

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

.movie-card.list > a {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: stretch;
}

.movie-card.list .poster-wrap {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card.list .list-card-body {
  justify-content: center;
}

.movie-card.large > a {
  position: relative;
  min-height: 390px;
}

.movie-card.large img {
  position: absolute;
  inset: 0;
}

.large-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.movie-card.large strong {
  font-size: 28px;
}

.rank-badge {
  top: 18px;
  left: 18px;
  right: auto;
  bottom: auto;
  background: var(--orange);
  font-weight: 800;
}

.highlight-band {
  background: linear-gradient(90deg, rgba(124, 45, 18, 0.26), rgba(17, 24, 39, 0.24));
  border-top: 1px solid var(--muted-line);
  border-bottom: 1px solid var(--muted-line);
}

.dark-band {
  background: linear-gradient(135deg, #111827, #000);
}

.center-actions {
  margin-top: 34px;
}

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

.page-hero {
  background: linear-gradient(90deg, rgba(124, 45, 18, 0.36), rgba(17, 24, 39, 0.36));
  border-bottom: 1px solid rgba(249, 115, 22, 0.22);
}

.page-hero.slim .max-wrap {
  padding: 62px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.library-search {
  margin-top: 26px;
}

.library-search input {
  width: min(560px, 100%);
  padding: 14px 18px;
}

.category-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--muted-line);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-card strong,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card strong {
  color: #fff;
  font-size: 26px;
  margin-bottom: 10px;
}

.category-card p {
  color: #d1d5db;
  margin: 0;
  line-height: 1.7;
}

.breadcrumb,
.detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a,
.detail-breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover,
.detail-breadcrumb a:hover {
  color: var(--orange);
}

.detail-breadcrumb {
  padding-top: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 34px;
  padding: 24px 0 68px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid var(--muted-line);
  aspect-ratio: 16 / 9;
}

.video-element {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  background: rgba(249, 115, 22, 0.88);
  box-shadow: 0 0 0 12px rgba(249, 115, 22, 0.14), 0 24px 60px rgba(0, 0, 0, 0.48);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.play-overlay span {
  margin-left: 5px;
  font-size: 34px;
}

.player-frame.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-article {
  padding: 26px 0 0;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-article h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

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

.tag-row a:hover {
  background: rgba(249, 115, 22, 0.55);
}

.info-panel {
  padding: 24px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--muted-line);
}

.info-panel h2,
.detail-aside h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.info-panel p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.9;
}

.review-panel {
  background: linear-gradient(135deg, rgba(124, 45, 18, 0.22), rgba(17, 24, 39, 0.4));
  border-color: rgba(249, 115, 22, 0.22);
}

.detail-aside {
  position: sticky;
  top: 94px;
  height: fit-content;
}

.detail-aside h2 {
  color: #fff;
}

.related-stack .movie-card.list > a {
  grid-template-columns: 120px minmax(0, 1fr);
}

.related-stack .movie-card strong {
  font-size: 15px;
}

.site-footer {
  background: #000;
  border-top: 1px solid rgba(249, 115, 22, 0.2);
  margin-top: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 30px;
  padding: 48px 0 34px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
  margin: 16px 0 0;
}

.footer-grid h3 {
  color: var(--orange);
  margin: 0 0 16px;
  font-size: 17px;
}

.footer-grid a:not(.brand) {
  display: block;
  color: var(--muted);
  margin: 10px 0;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: var(--orange);
}

.footer-bottom {
  border-top: 1px solid var(--muted-line);
  padding: 22px 0;
  color: #64748b;
  font-size: 14px;
}

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

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

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

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--muted-line);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.94);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    padding: 14px;
  }

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

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

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

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

  .detail-aside {
    position: static;
  }

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

@media (max-width: 760px) {
  .header-inner,
  .max-wrap,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-nav {
    display: none;
  }

  .hero-content {
    width: min(100% - 28px, 900px);
  }

  .hero-content p {
    font-size: 16px;
  }

  .quick-category,
  .movie-grid,
  .compact-grid,
  .feature-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.list > a,
  .related-stack .movie-card.list > a {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .movie-card.large > a {
    min-height: 330px;
  }

  .split-head,
  .section-heading {
    align-items: flex-start;
  }

  .split-head {
    flex-direction: column;
  }

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

  .play-overlay {
    width: 68px;
    height: 68px;
  }
}
