:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: #0f172a;
  --panel-strong: #111827;
  --line: #1f2937;
  --muted: #9ca3af;
  --text: #f9fafb;
  --orange: #f97316;
  --red: #dc2626;
  --yellow: #eab308;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 36rem),
    radial-gradient(circle at top right, rgba(220, 38, 38, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(31, 41, 55, 0.86);
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.24);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #fb923c, #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #d1d5db;
  font-size: 15px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #1f2937;
  color: #ffffff;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 20px 20px;
  background: #111827;
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #d1d5db;
}

.mobile-nav a:hover {
  background: #1f2937;
  color: #ffffff;
}

.mobile-nav.open {
  display: block;
}

.hero-slider {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: #000000;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.86) 34%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.06) 46%, rgba(3, 7, 18, 0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 720px;
  margin: 0 auto;
  padding: 90px 22px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: #fb923c;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 13px;
}

.hero-copy h1,
.page-hero h1,
.ranking-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 680px;
  margin: 24px 0 0;
  color: #d1d5db;
  font-size: 19px;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.tag-list a {
  padding: 7px 12px;
  border: 1px solid rgba(249, 115, 22, 0.32);
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  color: #fed7aa;
  font-size: 13px;
}

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

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

.primary-btn,
.home-search button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.26);
}

.primary-btn:hover,
.home-search button:hover {
  transform: translateY(-2px) scale(1.02);
}

.ghost-btn {
  background: rgba(31, 41, 55, 0.72);
  color: #f3f4f6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  background: rgba(55, 65, 81, 0.86);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  transition: 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-6px);
}

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

.hero-poster span {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fde68a;
  font-weight: 900;
}

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

.hero-dot {
  width: 32px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 22px;
}

.intro-panel {
  padding-top: 46px;
  padding-bottom: 34px;
}

.intro-card,
.page-hero,
.ranking-hero,
.detail-hero {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(3, 7, 18, 0.86));
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.intro-card {
  padding: 34px;
}

.intro-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.12;
}

.intro-card p,
.page-hero p,
.ranking-hero p,
.detail-one-line {
  color: #d1d5db;
  max-width: 820px;
}

.home-search {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  max-width: 760px;
}

.home-search input,
.search-box input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.86);
  color: #ffffff;
  outline: 0;
}

.home-search input {
  min-height: 52px;
  padding: 0 18px;
}

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

.section-heading h2,
.side-column h2,
.player-section h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

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

.section-link {
  color: #fb923c;
  font-weight: 800;
}

.rail-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 24px;
  scrollbar-width: thin;
}

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.34);
}

.poster-box {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-box img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.score-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.score-pill {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.72);
  color: #fde68a;
  font-size: 13px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #ffffff;
}

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

.movie-title,
.movie-meta,
.movie-desc,
.movie-tags {
  display: block;
}

.movie-title {
  font-weight: 900;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta,
.movie-tags {
  margin-top: 6px;
  color: #9ca3af;
  font-size: 13px;
}

.movie-desc {
  margin-top: 8px;
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border-radius: 22px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover img {
  opacity: 0.58;
  transform: scale(1.08);
}

.category-tile span {
  position: absolute;
  inset: auto 16px 16px 16px;
}

.category-tile strong,
.category-overview-copy strong {
  display: block;
  font-size: 20px;
  font-weight: 900;
}

.category-tile em,
.category-overview-copy em,
.mini-card em {
  display: block;
  margin-top: 6px;
  color: #d1d5db;
  font-style: normal;
  font-size: 13px;
}

.page-hero,
.category-hero {
  max-width: 1280px;
  margin: 34px auto 0;
  padding: 54px 34px;
}

.compact-hero h1,
.category-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
}

.filter-panel {
  margin-bottom: 28px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.search-box {
  flex: 1;
  position: relative;
}

.search-box span {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #fb923c;
  font-weight: 900;
}

.search-box input {
  min-height: 50px;
  padding: 0 16px 0 42px;
}

.filter-controls {
  display: flex;
  gap: 12px;
}

.filter-select {
  min-height: 50px;
  padding: 0 14px;
}

.category-overview-card {
  padding: 16px;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: center;
}

.category-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.category-stack img {
  width: 100%;
  aspect-ratio: 1 / 1.28;
  object-fit: cover;
  border-radius: 10px;
}

.category-overview-copy span {
  display: inline-flex;
  margin-top: 14px;
  color: #fb923c;
  font-weight: 900;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.side-column {
  position: sticky;
  top: 92px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.mini-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
}

.mini-card img {
  width: 62px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card strong {
  display: block;
  line-height: 1.35;
}

.ranking-hero,
.detail-hero {
  max-width: 1280px;
  margin: 34px auto 0;
  padding: 28px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: center;
}

.ranking-hero img,
.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.detail-poster {
  position: relative;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: #fb923c;
  font-weight: 800;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.9);
  color: #e5e7eb;
}

.player-section {
  padding-bottom: 32px;
}

.player-section h2 {
  margin-bottom: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-mask {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.18), rgba(0, 0, 0, 0.58));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-core {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 22px 44px rgba(220, 38, 38, 0.36);
  font-size: 34px;
  line-height: 1;
}

.detail-text {
  padding-top: 28px;
  color: #e5e7eb;
}

.detail-text h2 + p {
  margin-top: 12px;
}

.detail-text p + h2 {
  margin-top: 30px;
}

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

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: #111827;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer p,
.site-footer a,
.copyright {
  color: #9ca3af;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer a:hover {
  color: #fb923c;
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 22px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

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

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-content {
    min-height: 720px;
    padding-top: 74px;
  }

  .hero-poster {
    display: none;
  }

  .filter-panel,
  .home-search {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls {
    width: 100%;
    flex-direction: column;
  }

  .side-column {
    position: static;
  }
}

@media (max-width: 680px) {
  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-slider,
  .hero-content {
    min-height: 640px;
  }

  .hero-content,
  .content-section,
  .page-hero,
  .ranking-hero,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .content-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

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

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

  .category-overview-card {
    grid-template-columns: 96px 1fr;
  }

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

  .play-core {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
