:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --bg-card: rgba(28, 25, 23, 0.92);
  --line: rgba(217, 119, 6, 0.24);
  --text: #fafaf9;
  --muted: #c7b9aa;
  --dim: #8b7d71;
  --amber: #f59e0b;
  --amber-deep: #b45309;
  --red: #991b1b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  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.22), transparent 32rem),
    radial-gradient(circle at 75% 0%, rgba(127, 29, 29, 0.26), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(69, 26, 3, 0.92);
  border-bottom: 1px solid rgba(245, 158, 11, 0.24);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--red));
  color: #fff7ed;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.3);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  color: #fffbeb;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-text em {
  color: rgba(254, 243, 199, 0.78);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: #fffbeb;
  font-weight: 700;
  font-size: 14px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(245, 158, 11, 0.18);
  color: #fef3c7;
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.wide-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.wide-search input,
.js-local-filter input {
  min-width: 0;
  border: 1px solid rgba(245, 158, 11, 0.28);
  outline: none;
  color: #fff7ed;
  background: rgba(28, 25, 23, 0.66);
  border-radius: 14px;
  padding: 12px 14px;
}

.header-search input {
  width: 220px;
}

.header-search button,
.mobile-search button,
.wide-search button,
.js-local-filter button {
  border: 0;
  padding: 12px 16px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #dc2626);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(180, 83, 9, 0.25);
}

.menu-toggle {
  display: none;
  border: 0;
  background: rgba(245, 158, 11, 0.16);
  color: #fff7ed;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-search input {
  flex: 1;
}

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

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.72s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.94) 0%, rgba(12, 10, 9, 0.72) 38%, rgba(12, 10, 9, 0.28) 68%, rgba(12, 10, 9, 0.72) 100%),
    linear-gradient(0deg, #0c0a09 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 90px 0 140px;
}

.hero-eyebrow,
.detail-eyebrow,
.page-hero p,
.section-heading span,
.category-overview-head p {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  color: #fff7ed;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.46);
}

.hero h2 + .hero-summary,
.hero h1 + h2 {
  margin-top: 14px;
}

.hero h1 + h2 {
  font-size: clamp(26px, 4.2vw, 48px);
  color: #fef3c7;
}

.hero-summary {
  max-width: 660px;
  margin: 22px 0 0;
  color: #e7d7c6;
  font-size: clamp(16px, 2vw, 20px);
}

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

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

.hero-tags span,
.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(120, 53, 15, 0.38);
  color: #fef3c7;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

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

.primary-button,
.ghost-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--amber), #dc2626);
  color: #fff;
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.26);
}

.ghost-button,
.small-button {
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fef3c7;
  background: rgba(28, 25, 23, 0.62);
}

.primary-button:hover,
.ghost-button:hover,
.small-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(245, 158, 11, 0.26);
  background: rgba(12, 10, 9, 0.54);
  color: #fff7ed;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(254, 243, 199, 0.5);
  cursor: pointer;
}

.hero-dots button[aria-selected="true"] {
  width: 34px;
  background: var(--amber);
}

.hero-card-row {
  position: absolute;
  right: max(24px, calc((100% - 1280px) / 2));
  bottom: 86px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(5, 86px);
  gap: 12px;
}

.hero-thumb {
  display: grid;
  gap: 8px;
  color: #fff7ed;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.hero-thumb img {
  width: 86px;
  height: 118px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
}

.home-search-band,
.content-section,
.page-main,
.site-footer {
  width: min(1280px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.home-search-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  margin-top: -46px;
  position: relative;
  z-index: 5;
  padding: 26px;
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-band h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.story-section h2,
.related-categories h2,
.ranking-primary h2,
.year-rank-block h2,
.category-overview-head h2,
.category-overview-card h2 {
  margin: 0;
  color: #fff7ed;
  letter-spacing: -0.03em;
}

.home-search-band p,
.page-hero span,
.category-panel p,
.category-overview-desc,
.story-section p,
.detail-one-line {
  color: var(--muted);
}

.wide-search input {
  flex: 1;
  width: 100%;
}

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

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

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading a {
  color: var(--amber);
  font-weight: 900;
}

.compact-heading {
  align-items: start;
  flex-direction: column;
  gap: 0;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.17);
  box-shadow: 0 18px 46px 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.5);
  box-shadow: 0 24px 60px rgba(120, 53, 15, 0.3);
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #292524;
}

.movie-card-featured .card-cover {
  aspect-ratio: 16 / 10;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
}

.card-play,
.card-score {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.card-play {
  left: 14px;
  bottom: 14px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.92);
  color: #fff;
}

.card-score {
  right: 12px;
  top: 12px;
  min-width: 46px;
  height: 30px;
  color: #fef3c7;
  background: rgba(12, 10, 9, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.42);
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.compact-card h3 a:hover,
.category-samples a:hover,
.footer-links a:hover {
  color: var(--amber);
}

.card-body p {
  min-height: 52px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-meta,
.detail-meta,
.compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #f5d29a;
  font-size: 13px;
  font-weight: 700;
}

.card-meta span,
.detail-meta span,
.compact-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 28px;
  align-items: start;
}

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

.category-panel,
.rank-panel,
.category-overview-card,
.story-section,
.detail-info-card,
.detail-player-card,
.filter-bar,
.related-categories {
  border: 1px solid rgba(245, 158, 11, 0.17);
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.category-panel {
  padding: 20px;
}

.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff7ed;
  font-weight: 900;
  font-size: 20px;
}

.category-head strong {
  color: var(--amber);
  font-size: 14px;
}

.category-samples,
.footer-links,
.footer-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-samples a,
.footer-links a {
  color: #fef3c7;
  font-size: 13px;
}

.rank-panel {
  padding: 22px;
  position: sticky;
  top: 100px;
}

.rank-list,
.compact-grid {
  display: grid;
  gap: 14px;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  background: rgba(41, 37, 36, 0.66);
  border: 1px solid rgba(245, 158, 11, 0.12);
}

.compact-grid .compact-card {
  grid-template-columns: 72px 1fr;
}

.compact-grid .rank-no {
  display: none;
}

.rank-no {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #dc2626);
  font-weight: 900;
}

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

.compact-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

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

.page-main {
  padding: 36px 0 80px;
}

.page-hero {
  min-height: 260px;
  display: grid;
  gap: 24px;
  align-items: center;
  grid-template-columns: 1fr 0.82fr;
  padding: 38px;
  border-radius: 30px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background:
    linear-gradient(135deg, rgba(120, 53, 15, 0.86), rgba(28, 25, 23, 0.9)),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.3), transparent 24rem);
  box-shadow: var(--shadow);
}

.small-hero,
.search-hero {
  grid-template-columns: 1fr;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.filter-bar {
  margin: 28px 0;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-bar button {
  border: 1px solid rgba(245, 158, 11, 0.24);
  background: rgba(41, 37, 36, 0.78);
  color: #fef3c7;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
}

.filter-bar button.active,
.filter-bar button:hover {
  background: var(--amber);
  color: #fff;
}

.related-categories {
  margin-top: 34px;
  padding: 24px;
}

.related-categories div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.related-categories a {
  color: #fef3c7;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
}

.category-overview-list {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.category-overview-card {
  padding: 24px;
}

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

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.ranking-layout {
  margin-top: 28px;
}

.ranking-primary {
  border-radius: var(--radius);
}

.large-rank-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.year-rank-block {
  margin-top: 68px;
}

.detail-main {
  width: min(1180px, calc(100% - 32px));
}

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

.breadcrumbs a {
  color: #fef3c7;
}

.detail-layout {
  display: grid;
  gap: 24px;
}

.detail-player-card {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover,
.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  background: #000;
}

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: #000;
}

.player-cover.hidden {
  display: none;
}

.player-cover img {
  object-fit: cover;
  filter: brightness(0.72);
}

.player-cover-shade {
  background: radial-gradient(circle, transparent 0%, rgba(0, 0, 0, 0.42) 64%);
}

.big-play {
  position: relative;
  z-index: 3;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: auto;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #dc2626);
  font-size: 34px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
}

.detail-info-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 26px;
  padding: 24px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
}

.detail-one-line {
  margin: 18px 0 0;
  font-size: 18px;
}

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

.story-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 28px;
  margin-top: 24px;
}

.story-section h2 {
  font-size: 26px;
  margin-bottom: 12px;
}

.story-section p {
  margin: 0;
  font-size: 16px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 42px;
}

.site-footer {
  margin-top: 86px;
  padding: 38px 0 26px;
  border-top: 1px solid rgba(245, 158, 11, 0.18);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.2fr;
  gap: 34px;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 18px;
}

.footer-grid p {
  margin: 0;
  color: var(--muted);
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(245, 158, 11, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--dim);
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #dc2626);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
}

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

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

  .hero-card-row {
    display: none;
  }

  .featured-grid,
  .four-cols,
  .compact-grid,
  .large-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section,
  .page-hero,
  .detail-info-card,
  .story-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

@media (max-width: 680px) {
  .header-inner {
    min-height: 68px;
  }

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

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

  .hero-content {
    padding: 88px 0 110px;
  }

  .hero-control {
    display: none;
  }

  .home-search-band,
  .page-hero,
  .detail-info-card,
  .story-section,
  .category-overview-card {
    padding: 20px;
  }

  .home-search-band,
  .wide-search,
  .js-local-filter {
    grid-template-columns: 1fr;
    display: grid;
  }

  .featured-grid,
  .four-cols,
  .category-grid,
  .compact-grid,
  .large-rank-list {
    grid-template-columns: 1fr;
  }

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

  .compact-card {
    grid-template-columns: auto 64px 1fr;
  }

  .compact-grid .compact-card {
    grid-template-columns: 64px 1fr;
  }

  .compact-cover img {
    width: 64px;
    height: 86px;
  }
}
