:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --panel-soft: rgba(30, 41, 59, 0.58);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --orange: #ea580c;
  --blue: #3b82f6;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --container: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 28rem),
    radial-gradient(circle at 82% 10%, rgba(59, 130, 246, 0.15), transparent 30rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0));
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(2, 6, 23, 0.94);
  border-color: var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.nav-container {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.logo-mark,
.logo-spark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.35);
  color: #fff;
  font-size: 13px;
}

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

.logo-spark {
  width: 24px;
  height: 24px;
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  box-shadow: none;
  transition: transform 0.5s ease;
}

.site-logo:hover .logo-spark {
  transform: rotate(-180deg);
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
}

.nav-search {
  position: relative;
  width: min(280px, 24vw);
}

.global-search-input,
.filter-input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.global-search-input:focus,
.filter-input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  background: rgba(15, 23, 42, 0.96);
}

.search-results {
  position: absolute;
  z-index: 120;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-height: 420px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.98);
  box-shadow: var(--shadow);
}

.search-result-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 9px;
  border-radius: 14px;
  color: var(--soft);
}

.search-result-item:hover {
  background: rgba(148, 163, 184, 0.1);
}

.search-result-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.86);
}

.search-result-item strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.search-result-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.74);
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #e2e8f0;
  border-radius: 999px;
}

.mobile-nav {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.98);
  backdrop-filter: blur(18px);
}

.mobile-nav .nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
  background: rgba(245, 158, 11, 0.12);
}

.mobile-search-wrap {
  position: relative;
  margin-top: 12px;
}

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

.hero-carousel {
  position: relative;
  height: 74vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 45%, rgba(2, 6, 23, 0) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, transparent 34%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding-top: 72px;
}

.hero-copy {
  width: min(680px, 100%);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.13);
  color: #fbbf24;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(17px, 2.5vw, 21px);
  line-height: 1.75;
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #94a3b8;
  font-size: 14px;
}

.hero-meta span,
.movie-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

.btn-primary,
.btn-ghost,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: white;
  box-shadow: 0 16px 48px rgba(245, 158, 11, 0.26);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-more:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary.full {
  width: 100%;
}

.btn-ghost,
.section-more {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.68);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

.hero-search-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  align-items: center;
  gap: 14px;
  width: min(640px, 100%);
  margin-top: 30px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
}

.hero-search-card > span {
  padding-left: 12px;
  color: #fbbf24;
  font-weight: 900;
  white-space: nowrap;
}

.hero-search-card .global-search-input {
  border-color: transparent;
  background: rgba(2, 6, 23, 0.48);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.46);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 42px;
  background: #f59e0b;
}

.content-section {
  margin-top: 68px;
}

.inner-main {
  padding-top: 104px;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.32);
  box-shadow: 0 22px 70px rgba(245, 158, 11, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(2, 6, 23, 0.95));
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.09);
  filter: saturate(1.18);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 58%);
}

.rating-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: inline-flex;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #fbbf24;
  padding: 5px 10px;
  font-weight: 900;
  font-size: 12px;
  backdrop-filter: blur(12px);
}

.play-chip {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

.movie-card-body {
  padding: 18px;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-item h3 a:hover,
.related-mini:hover span {
  color: #fbbf24;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 14px;
}

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

.movie-card.compact h3 {
  font-size: 16px;
}

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

.category-tile,
.category-overview-card {
  min-height: 152px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 54%),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.35);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.26), transparent 54%),
    rgba(15, 23, 42, 0.9);
}

.category-tile span,
.category-overview-card h2 {
  display: block;
  margin: 0 0 10px;
  color: #f8fafc;
  font-size: 20px;
  font-weight: 900;
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.category-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 15px;
  background: rgba(245, 158, 11, 0.13);
  color: #fbbf24;
  font-weight: 900;
}

.category-overview-card.highlight {
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(59, 130, 246, 0.16)),
    rgba(15, 23, 42, 0.86);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 70px 130px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  font-weight: 950;
  font-size: 20px;
}

.rank-poster {
  display: block;
  height: 82px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.9);
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-item h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-item p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  border: 1px solid var(--border);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.small-hero {
  padding: 40px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.detail-main {
  padding-top: 102px;
}

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

.watch-stage {
  margin-bottom: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 28px;
  background: #000;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background-image:
    linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.36)),
    var(--cover-image);
  background-size: cover;
  background-position: center;
  color: white;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 60px rgba(245, 158, 11, 0.32);
  font-size: 34px;
  transform: translateX(3px);
}

.detail-card,
.side-card,
.poster-panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.detail-card {
  padding: 30px;
}

.detail-card h1 {
  margin-bottom: 18px;
}

.detail-card h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-card p {
  color: #d1d5db;
  line-height: 1.92;
  font-size: 16px;
}

.detail-card .one-line {
  color: #fbbf24;
  font-size: 18px;
  font-weight: 800;
}

.detail-tags {
  margin: 18px 0;
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
  position: sticky;
  top: 92px;
}

.poster-panel {
  padding: 16px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 14px;
  background: rgba(15, 23, 42, 0.9);
}

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

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

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

.related-mini img {
  width: 86px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
}

.related-mini span {
  color: #e2e8f0;
  line-height: 1.5;
  font-weight: 800;
}

.detail-related {
  margin-top: 30px;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.86);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-logo {
  margin-bottom: 14px;
  color: #fbbf24;
  font-size: 22px;
}

.site-footer p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: #fbbf24;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

.is-filtered-out {
  display: none !important;
}

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

  .mobile-menu-button {
    display: block;
  }

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

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

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

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .nav-container {
    min-height: 64px;
  }

  .logo-text {
    font-size: 19px;
  }

  .hero-carousel {
    min-height: 640px;
    height: 88vh;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 84px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-search-card {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .hero-search-card > span {
    padding-left: 4px;
  }

  .hero-arrow {
    display: none;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 16px;
  }

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

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

  .movie-card p {
    min-height: auto;
  }

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

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

  .ranking-item {
    grid-template-columns: 46px 88px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 15px;
  }

  .rank-poster {
    height: 68px;
  }

  .ranking-item h3 {
    font-size: 16px;
  }

  .ranking-item p {
    display: none;
  }

  .small-hero,
  .detail-card {
    padding: 24px;
  }

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

@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .poster-link {
    aspect-ratio: 16 / 9;
  }

  .hero-actions {
    display: grid;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }
}
