:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-soft: #111113;
  --bg-card: #171717;
  --bg-card-2: #202020;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f7f7f7;
  --muted: #a3a3a3;
  --muted-2: #737373;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --red: #ef4444;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 34rem),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.12), transparent 32rem),
    var(--bg);
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #2a2115, #111113 55%, #261414);
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #0a0a0a;
  background: linear-gradient(135deg, #fbbf24, #f59e0b 52%, #ef4444);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.3);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

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

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

.nav-link {
  padding: 9px 14px;
  border-radius: 12px;
  color: #d4d4d4;
  font-size: 14px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #111;
  background: var(--amber);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-search {
  width: 224px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.top-search span {
  color: var(--amber);
  font-size: 12px;
}

.top-search input,
.wide-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(23, 23, 23, 0.96);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.global-search-results {
  position: fixed;
  top: 76px;
  right: max(16px, calc((100vw - 1180px) / 2));
  width: min(420px, calc(100% - 32px));
  display: none;
  max-height: 70vh;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 17, 19, 0.98);
  box-shadow: var(--shadow);
}

.global-search-results.active {
  display: grid;
  gap: 8px;
}

.search-result-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.search-result-item strong {
  color: #fff;
}

.search-result-item span {
  color: var(--muted);
  font-size: 13px;
}

main {
  padding-top: 68px;
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: #0f0f0f;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  background-image:
    linear-gradient(90deg, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.72) 42%, rgba(10, 10, 10, 0.2) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop {
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  align-items: center;
  gap: 52px;
  padding: 64px 0 70px;
}

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

.eyebrow,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #d4d4d4;
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  color: #fcd34d;
  background: var(--amber-soft);
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 700;
  transition: 0.2s ease;
}

.btn.primary {
  color: #111;
  border-color: transparent;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.24);
}

.btn.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn.ghost {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.08);
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
}

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

.hero-poster span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(16px);
}

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

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

.hero-dot.active {
  width: 64px;
  background: var(--amber);
}

.search-band,
.content-section,
.inner-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  transform: translateY(-32px);
  display: grid;
  grid-template-columns: 1fr minmax(260px, 520px);
  align-items: center;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(23, 23, 23, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band h2 {
  margin: 8px 0 0;
  font-size: clamp(22px, 4vw, 34px);
}

.wide-search {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

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

.no-top-gap {
  padding-top: 0;
}

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

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

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

.category-chip {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.12), transparent),
    var(--bg-card);
  transition: 0.22s ease;
}

.category-chip:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.32);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.category-chip strong {
  font-size: 18px;
}

.category-chip span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.featured-grid .movie-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

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

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.28);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
}

.card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

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

.type-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.type-pill {
  left: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
  right: 12px;
  color: #111;
  background: var(--amber);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.card-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.card-body p {
  min-height: 45px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.card-tags .tag {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
}

.inner-page {
  padding-top: 108px;
}

.page-hero,
.detail-hero {
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 32rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: 42px;
}

.compact-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: -0.05em;
}

.compact-hero p {
  max-width: 820px;
  margin: 0;
  color: #d4d4d4;
  line-height: 1.8;
}

.overview-stack {
  display: grid;
  gap: 22px;
  padding: 28px 0 40px;
}

.category-overview-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
}

.category-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 8px 0;
}

.category-overview-head p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px);
  gap: 12px;
  margin: 24px 0;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.filter-panel span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.filter-panel select option {
  color: #111;
}

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

.breadcrumb a:hover {
  color: var(--amber);
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  padding: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: var(--bg-card);
}

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

.detail-copy h1 {
  margin: 12px 0 14px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.lead-text {
  margin: 0 0 22px;
  color: #e5e5e5;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}

.detail-meta div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.detail-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta dd {
  margin: 7px 0 0;
  font-weight: 700;
}

.player-section {
  margin: 26px 0;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.42));
  cursor: pointer;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.35);
  font-size: 32px;
}

.player-box.is-playing .play-overlay {
  display: none;
}

.detail-text {
  padding: 22px 0 30px;
}

.detail-text h2 {
  margin: 24px 0 10px;
  font-size: 28px;
}

.detail-text p {
  margin: 0;
  color: #d4d4d4;
  font-size: 17px;
  line-height: 2;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr;
  gap: 36px;
  padding: 42px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

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

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

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

.footer-links a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted-2);
  font-size: 13px;
}

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

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

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

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-poster {
    max-width: 320px;
  }

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

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

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

@media (max-width: 820px) {
  .search-band,
  .filter-panel,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .featured-grid .movie-card:first-child {
    grid-column: auto;
    grid-row: auto;
  }

  .hero-carousel,
  .hero-content {
    min-height: 680px;
  }

  .compact-hero,
  .detail-hero {
    padding: 22px;
  }

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

@media (max-width: 540px) {
  .nav-shell,
  .search-band,
  .content-section,
  .inner-page,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

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

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

  .hero-copy p,
  .lead-text,
  .detail-text p {
    font-size: 15px;
  }

  .movie-grid,
  .category-grid,
  .ranking-grid,
  .small-grid,
  .category-chip-grid {
    gap: 12px;
  }

  .card-body {
    padding: 11px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p {
    display: none;
  }

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

  .play-overlay span {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
}
