:root {
  color-scheme: dark;
  --page-bg: #0c0a09;
  --panel-bg: #1c1917;
  --panel-soft: #292524;
  --line: #44403c;
  --text: #fafaf9;
  --muted: #a8a29e;
  --accent: #d97706;
  --accent-bright: #f59e0b;
  --accent-soft: rgba(217, 119, 6, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(180, 83, 9, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(120, 53, 15, 0.28), transparent 28rem),
    var(--page-bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(68, 64, 60, 0.78);
  background: rgba(12, 10, 9, 0.88);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-bright), #92400e);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #d6d3d1;
  font-size: 15px;
}

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

.nav-links a:hover,
.mobile-panel a:hover {
  color: var(--accent-bright);
}

.header-search {
  flex: 1;
  max-width: 280px;
  position: relative;
}

.header-search input,
.filter-bar input {
  width: 100%;
  color: var(--text);
  background: rgba(41, 37, 36, 0.92);
  border: 1px solid rgba(87, 83, 78, 0.85);
  border-radius: 999px;
  padding: 10px 42px 10px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-bar input:focus {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-submit {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #111827;
  background: var(--accent-bright);
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(68, 64, 60, 0.72);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 42px 0 28px;
}

.hero-frame {
  position: relative;
  min-height: 560px;
  border: 1px solid rgba(120, 113, 108, 0.35);
  border-radius: 30px;
  overflow: hidden;
  background: #111;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: end;
  gap: 32px;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.94) 0%, rgba(12, 10, 9, 0.72) 40%, rgba(12, 10, 9, 0.22) 72%),
    linear-gradient(0deg, rgba(12, 10, 9, 0.96) 0%, rgba(12, 10, 9, 0.2) 55%, rgba(12, 10, 9, 0.42) 100%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.06);
}

.hero-content,
.hero-card {
  position: relative;
  z-index: 2;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(120, 53, 15, 0.2);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  max-width: 820px;
}

.hero p {
  max-width: 700px;
  margin: 0 0 24px;
  color: #d6d3d1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #d6d3d1;
  background: rgba(41, 37, 36, 0.78);
  border: 1px solid rgba(87, 83, 78, 0.72);
  padding: 6px 10px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 800;
  border: 1px solid rgba(245, 158, 11, 0.38);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: transparent;
}

.btn-ghost {
  color: var(--text);
  background: rgba(41, 37, 36, 0.6);
}

.hero-card {
  align-self: center;
  justify-self: end;
  width: min(360px, 100%);
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 24px;
  background: rgba(28, 25, 23, 0.78);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.hero-card-title {
  margin: 14px 4px 2px;
  font-weight: 800;
  font-size: 20px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 64px;
  bottom: 32px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(214, 211, 209, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--accent-bright);
}

.section {
  padding: 58px 0 10px;
}

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

.section-title {
  margin: 12px 0 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 680px;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(68, 64, 60, 0.65);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(28, 25, 23, 0.86);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.68);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.movie-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1c1917;
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 54%);
  opacity: 0.88;
}

.movie-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #111827;
  background: #fbbf24;
  font-weight: 800;
  font-size: 12px;
}

.movie-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.82);
  border-radius: 50%;
  color: white;
  background: rgba(217, 119, 6, 0.92);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.movie-info {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.movie-info h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.movie-info h3 a:hover {
  color: var(--accent-bright);
}

.movie-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 54px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(68, 64, 60, 0.72);
  border-radius: 18px;
  padding: 10px 14px;
  background: rgba(28, 25, 23, 0.8);
}

.rank-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent-bright);
}

.rank-card img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.rank-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.category-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(68, 64, 60, 0.68);
  border-radius: 22px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 54%),
    rgba(28, 25, 23, 0.9);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.66);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  padding: 64px 0 28px;
}

.page-hero-card {
  border: 1px solid rgba(68, 64, 60, 0.72);
  border-radius: 28px;
  padding: clamp(26px, 4vw, 54px);
  background:
    linear-gradient(135deg, rgba(41, 37, 36, 0.92), rgba(12, 10, 9, 0.88)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 48%);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: #d6d3d1;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 0 0 24px;
}

.filter-bar select {
  min-width: 160px;
  color: var(--text);
  background: rgba(41, 37, 36, 0.92);
  border: 1px solid rgba(87, 83, 78, 0.85);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 28px;
  align-items: start;
}

.player-box {
  position: relative;
  border: 1px solid rgba(68, 64, 60, 0.72);
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.22));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.big-play {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 20px 48px rgba(245, 158, 11, 0.28);
  cursor: pointer;
  font-size: 30px;
}

.detail-side {
  border: 1px solid rgba(68, 64, 60, 0.72);
  border-radius: 24px;
  padding: 20px;
  background: rgba(28, 25, 23, 0.86);
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 18px;
}

.detail-title {
  margin: 20px 0 12px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.content-card {
  margin-top: 24px;
  border: 1px solid rgba(68, 64, 60, 0.72);
  border-radius: 24px;
  padding: clamp(20px, 3vw, 32px);
  background: rgba(28, 25, 23, 0.72);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #d6d3d1;
  line-height: 1.95;
}

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

.empty-result {
  display: none;
  border: 1px solid rgba(68, 64, 60, 0.72);
  border-radius: 18px;
  padding: 24px;
  color: var(--muted);
  background: rgba(28, 25, 23, 0.72);
}

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

.footer {
  margin-top: 72px;
  border-top: 1px solid rgba(68, 64, 60, 0.72);
  background: rgba(12, 10, 9, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
  color: var(--muted);
}

.footer h3 {
  margin: 0 0 12px;
  color: var(--text);
}

.footer p {
  margin: 0;
  line-height: 1.8;
}

.footer a {
  display: block;
  margin: 8px 0;
}

.footer a:hover {
  color: var(--accent-bright);
}

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 46px;
  }

  .hero-card {
    display: none;
  }
}

@media (max-width: 820px) {
  .nav-links,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero-frame {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 32px 24px 84px;
    align-items: end;
  }

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

  .hero-dots {
    left: 24px;
  }

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

  .section-head,
  .filter-bar,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

  .rank-card {
    grid-template-columns: 42px 62px minmax(0, 1fr);
  }

  .rank-card .btn {
    grid-column: 2 / -1;
  }

  .detail-layout {
    display: grid;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 15px;
  }
}
