:root {
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --panel: #292524;
  --panel-light: #44403c;
  --text: #f5f5f4;
  --muted: #a8a29e;
  --muted-dark: #78716c;
  --amber: #f59e0b;
  --amber-light: #fcd34d;
  --amber-dark: #b45309;
  --red: #dc2626;
  --line: rgba(245, 158, 11, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(180, 83, 9, 0.2), transparent 26rem),
    radial-gradient(circle at 90% 10%, rgba(127, 29, 29, 0.24), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(12, 10, 9, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.9rem clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--amber-light);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--red));
  color: #fff;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.38);
  font-size: 0.72rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-link,
.mobile-nav a {
  color: var(--muted);
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(41, 37, 36, 0.85);
  padding: 0.55rem;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 0.32rem 0;
  background: var(--amber-light);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(245, 158, 11, 0.1);
}

.mobile-nav.open {
  display: grid;
  gap: 0.3rem;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.98) 0%, rgba(12, 10, 9, 0.76) 44%, rgba(12, 10, 9, 0.35) 72%, rgba(12, 10, 9, 0.82) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%, rgba(0, 0, 0, 0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  min-height: 760px;
  margin: 0 auto;
  padding: 6.5rem clamp(1rem, 4vw, 3rem) 7rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

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

.eyebrow,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 999px;
  padding: 0.32rem 0.78rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-title {
  margin: 1.1rem 0 1rem;
  max-width: 10ch;
  color: #fff7ed;
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.07em;
  text-shadow: 0 12px 50px rgba(0, 0, 0, 0.6);
}

.hero-line {
  max-width: 680px;
  margin: 0;
  color: #e7e5e4;
  font-size: clamp(1.05rem, 1.9vw, 1.45rem);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.4rem 0;
}

.hero-meta span,
.detail-meta span,
.card-tags span,
.detail-tags span {
  color: #fde68a;
  background: rgba(68, 64, 60, 0.82);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 999px;
  padding: 0.36rem 0.72rem;
  font-size: 0.86rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.78rem 1.25rem;
  border-radius: 0.95rem;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.24);
}

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

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(245, 158, 11, 0.22);
}

.hero-poster {
  align-self: center;
  justify-self: end;
  width: min(100%, 350px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 1.35rem;
  border: 1px solid rgba(245, 158, 11, 0.28);
  box-shadow: var(--shadow);
  transform: rotate(2.2deg);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 6.1rem;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 999px;
  background: rgba(12, 10, 9, 0.72);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(68, 64, 60, 0.9);
  font-size: 1.4rem;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.hero-dot {
  width: 0.62rem;
  height: 0.62rem;
  border: 0;
  border-radius: 999px;
  background: rgba(231, 229, 228, 0.46);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 1.8rem;
  background: var(--amber);
}

.hero-category-links {
  position: absolute;
  left: 50%;
  bottom: 1.8rem;
  z-index: 4;
  transform: translateX(-50%);
  width: min(100% - 2rem, 960px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.hero-category-links a {
  color: #fef3c7;
  text-align: center;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 1rem;
  background: rgba(28, 25, 23, 0.72);
  padding: 0.8rem 0.5rem;
  backdrop-filter: blur(12px);
}

.container-wrap {
  width: min(1440px, calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: clamp(2.3rem, 5vw, 4.8rem) 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  margin: 0.55rem 0 0;
  color: #fffbeb;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.12;
}

.section-heading a {
  color: var(--amber-light);
  border-bottom: 1px solid rgba(245, 158, 11, 0.5);
  font-weight: 700;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 1rem;
}

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.small-grid,
.library-grid {
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.11);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(41, 37, 36, 0.98), rgba(28, 25, 23, 0.98));
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1c1917;
}

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

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

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

.type-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--red));
  border-radius: 999px;
  padding: 0.25rem 0.58rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.card-body {
  padding: 0.95rem;
}

.card-body h3 {
  margin: 0;
  color: #f5f5f4;
  font-size: 1.02rem;
  line-height: 1.25;
}

.card-body h3 a:hover {
  color: var(--amber-light);
}

.card-meta {
  margin: 0.42rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-desc {
  display: -webkit-box;
  min-height: 3.9em;
  margin: 0.55rem 0 0.78rem;
  overflow: hidden;
  color: #d6d3d1;
  font-size: 0.86rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.compact .card-desc {
  -webkit-line-clamp: 2;
  min-height: 2.7em;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.card-tags span {
  padding: 0.2rem 0.48rem;
  font-size: 0.72rem;
}

.category-card-grid,
.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.category-card,
.category-overview-card,
.content-card,
.filter-panel,
.player-card,
.rank-card {
  border: 1px solid rgba(245, 158, 11, 0.13);
  border-radius: 1.15rem;
  background:
    linear-gradient(135deg, rgba(68, 64, 60, 0.74), rgba(28, 25, 23, 0.94)),
    var(--bg-soft);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.22);
}

.category-card,
.category-overview-card {
  display: block;
  padding: 1.25rem;
}

.category-card span,
.category-title {
  color: var(--amber-light);
  font-size: 1.25rem;
  font-weight: 850;
}

.category-card p,
.category-overview-card p {
  margin: 0.5rem 0 0;
  color: #d6d3d1;
}

.category-strip {
  width: min(1440px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
}

.compact-heading h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.category-samples a {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 999px;
  padding: 0.32rem 0.66rem;
  font-size: 0.85rem;
}

.filter-panel {
  margin-bottom: 1.2rem;
  padding: 1rem;
}

.filter-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
}

.search-box input,
.filter-selects select {
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 0.9rem;
  outline: none;
  color: #fff7ed;
  background: rgba(12, 10, 9, 0.74);
  padding: 0 0.95rem;
}

.filter-selects {
  display: flex;
  gap: 0.7rem;
}

.empty-state {
  display: none;
  margin: 2rem 0 0;
  color: var(--muted);
  text-align: center;
}

.empty-state.show {
  display: block;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(5.5rem, 10vw, 9rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 7vw, 6rem);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.24), transparent 24rem),
    radial-gradient(circle at 90% 0%, rgba(127, 29, 29, 0.3), transparent 26rem),
    linear-gradient(135deg, #1c1917, #0c0a09 64%, #050505);
  text-align: center;
}

.page-hero span {
  margin: 0 auto;
}

.page-hero h1 {
  margin: 1rem auto 0.8rem;
  max-width: 980px;
  color: #fff7ed;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  margin: 0 auto;
  color: #d6d3d1;
  font-size: 1.1rem;
}

.single-line {
  justify-content: center;
}

.detail-main {
  background: var(--bg);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  background: var(--bg);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--detail-bg);
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.4;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.75), rgba(12, 10, 9, 0.92));
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 1rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 1.2rem;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 1rem 0;
  color: #fff7ed;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.detail-one-line {
  max-width: 860px;
  color: #e7e5e4;
  font-size: 1.15rem;
}

.player-section {
  padding-top: 0;
}

.player-card {
  padding: clamp(0.65rem, 2vw, 1rem);
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  background: #000;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.82));
}

.play-overlay.hidden {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: clamp(4.4rem, 9vw, 6.6rem);
  height: clamp(4.4rem, 9vw, 6.6rem);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 20px 60px rgba(220, 38, 38, 0.3);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  padding-left: 0.18em;
}

.player-status {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 6;
  margin: 0;
  color: #fff;
  text-align: center;
  pointer-events: none;
}

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

.content-card {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.content-card h2 {
  margin: 0 0 0.8rem;
  color: var(--amber-light);
  font-size: 1.35rem;
}

.content-card h2:not(:first-child) {
  margin-top: 1.8rem;
}

.content-card p {
  margin: 0;
  color: #e7e5e4;
}

.side-info-card dl {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.2rem;
}

.side-info-card div {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.12);
  padding-bottom: 0.75rem;
}

.side-info-card dt {
  color: var(--muted);
}

.side-info-card dd {
  margin: 0;
  color: #fff7ed;
}

.full-button {
  width: 100%;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.1rem;
}

.ranking-list {
  display: grid;
  gap: 0.85rem;
}

.rank-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 1rem;
  padding: 0.8rem;
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 0.85rem;
  aspect-ratio: 3 / 4;
}

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

.rank-cover span {
  position: absolute;
  left: 0.45rem;
  top: 0.45rem;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--red));
  border-radius: 0.7rem;
  padding: 0.25rem 0.48rem;
  font-weight: 900;
}

.rank-card h3 {
  margin: 0;
  color: #fff7ed;
  font-size: 1.15rem;
}

.rank-card h3 a:hover {
  color: var(--amber-light);
}

.rank-card p {
  display: -webkit-box;
  margin: 0.45rem 0;
  overflow: hidden;
  color: #d6d3d1;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.ranking-side {
  position: sticky;
  top: 5rem;
  align-self: start;
}

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

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: rgba(12, 10, 9, 0.94);
}

.footer-grid {
  width: min(1440px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 0.8fr 1fr;
  gap: 2rem;
}

.site-footer h2 {
  margin: 0 0 0.8rem;
  color: var(--amber-light);
  font-size: 1rem;
}

.site-footer p,
.site-footer a {
  display: block;
  color: var(--muted);
  margin: 0.35rem 0;
}

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

.footer-bottom {
  border-top: 1px solid rgba(245, 158, 11, 0.12);
  padding: 1rem;
  color: var(--muted-dark);
  text-align: center;
}

@media (max-width: 1120px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

  .ranking-side {
    position: static;
  }
}

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

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

  .hero {
    min-height: 680px;
  }

  .hero-content {
    min-height: 680px;
    padding-top: 5.4rem;
    padding-bottom: 8rem;
  }

  .hero-title {
    max-width: 12ch;
  }

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

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

  .section-heading {
    align-items: start;
  }

  .filter-selects {
    flex-direction: column;
  }

  .detail-poster {
    width: min(260px, 80vw);
  }

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

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

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

@media (max-width: 460px) {
  .header-inner {
    padding-inline: 0.8rem;
  }

  .brand {
    font-size: 1rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-meta,
  .detail-meta {
    gap: 0.35rem;
  }

  .hero-controls {
    bottom: 7.2rem;
  }

  .card-body {
    padding: 0.72rem;
  }

  .card-desc {
    display: none;
  }

  .card-tags {
    display: none;
  }
}
