* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #16130f;
  --bg-soft: #241a13;
  --panel: rgba(41, 31, 23, 0.86);
  --panel-solid: #2b2118;
  --text: #fff7ed;
  --muted: #d6c7b7;
  --subtle: #a99178;
  --line: rgba(245, 158, 11, 0.22);
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-deep: #b45309;
  --stone: #292524;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.2), transparent 36rem),
    linear-gradient(135deg, #1c1917 0%, #292524 36%, #451a03 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(41, 37, 36, 0.95), rgba(120, 53, 15, 0.92), rgba(41, 37, 36, 0.95));
  border-bottom: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: 0 10px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

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

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

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

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

.brand-text strong {
  font-size: 1.18rem;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: #fcd34d;
  font-size: 0.76rem;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: flex-end;
}

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

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: rgba(255, 247, 237, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
}

.top-search input,
.filter-bar input {
  border: 0;
  outline: none;
  color: #fff7ed;
  background: transparent;
}

.top-search input {
  width: 210px;
  padding: 8px 8px 8px 14px;
}

.top-search button,
.primary-btn,
.ghost-btn,
.section-more,
.text-link {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.top-search button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.top-search button {
  padding: 8px 16px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 14px;
  background: rgba(255, 247, 237, 0.08);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fde68a;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #1c1917 0%, #78350f 48%, #292524 100%);
}

.hero-glow {
  position: absolute;
  inset: auto 12% 8% auto;
  width: 420px;
  height: 420px;
  background: rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  filter: blur(70px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  align-items: center;
  gap: 48px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.18;
  filter: blur(3px) saturate(1.25);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.98), rgba(28, 25, 23, 0.72), rgba(28, 25, 23, 0.92));
}

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

.hero-copy {
  padding-top: 70px;
}

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

.hero-tags span,
.detail-tags span,
.tag-list span {
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 22px 0 18px;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-copy p {
  max-width: 760px;
  color: #f5e9d8;
  font-size: 1.08rem;
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.ghost-btn {
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.34);
  background: rgba(255, 247, 237, 0.08);
}

.ghost-btn.full {
  width: 100%;
  margin-top: 18px;
}

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.34);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 20px;
  bottom: 20px;
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
  font-weight: 900;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.32);
  cursor: pointer;
}

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

.stats-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -46px auto 30px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stats-strip a {
  padding: 20px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 20px;
  background: rgba(41, 31, 23, 0.9);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

.stats-strip strong {
  display: block;
  color: #fbbf24;
  font-size: 2rem;
}

.stats-strip span {
  color: var(--muted);
}

.content-section,
.filter-bar,
.ranking-list,
.detail-main,
.player-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.eyebrow {
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.section-heading h2,
.page-hero h1,
.ranking-head h2,
.detail-info h1 {
  margin: 6px 0;
  line-height: 1.08;
}

.section-heading h2,
.ranking-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.section-heading p,
.page-hero p,
.category-card-body p,
.detail-info p,
.detail-block p,
.rank-info p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.section-more,
.text-link {
  color: #fbbf24;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 22px;
  background: rgba(41, 31, 23, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.48);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.poster-link {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(255, 247, 237, 0.04);
}

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

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

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

.movie-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fcd34d;
  font-size: 0.78rem;
  font-weight: 800;
}

.score-badge {
  color: #111827;
  background: #fbbf24;
  padding: 3px 8px;
  border-radius: 999px;
}

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

.movie-card-summary {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-summary.compact {
  -webkit-line-clamp: 2;
  font-size: 0.92rem;
}

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

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  background: #2b2118;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  opacity: 0.76;
}

.category-tile span,
.category-tile strong {
  position: absolute;
  left: 16px;
  z-index: 1;
}

.category-tile span {
  bottom: 42px;
  font-size: 1.1rem;
  font-weight: 900;
}

.category-tile strong {
  bottom: 16px;
  color: #fcd34d;
}

.ranking-panel {
  align-self: start;
  padding: 22px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 24px;
  background: rgba(41, 31, 23, 0.84);
  box-shadow: var(--shadow);
}

.ranking-head span {
  color: #fbbf24;
  font-weight: 900;
}

.ranking-panel ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ranking-panel li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 247, 237, 0.08);
}

.ranking-panel li span,
.ranking-panel li em {
  color: #fbbf24;
  font-style: normal;
  font-weight: 900;
}

.page-hero {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 76px 16px 52px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.24), transparent 34rem),
    linear-gradient(135deg, rgba(28, 25, 23, 0.96), rgba(120, 53, 15, 0.75));
}

.page-hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0 auto;
}

.compact-hero {
  min-height: 280px;
}

.filter-bar {
  position: sticky;
  top: 88px;
  z-index: 20;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 22px;
  background: rgba(41, 31, 23, 0.88);
  backdrop-filter: blur(12px);
}

.filter-bar input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
}

.large-filter input {
  font-size: 1.1rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-row button {
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 247, 237, 0.06);
  padding: 8px 12px;
  cursor: pointer;
}

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

.category-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 24px;
  background: rgba(41, 31, 23, 0.78);
}

.category-card-media {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
}

.category-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body span {
  color: #fbbf24;
  font-size: 0.9rem;
  font-weight: 900;
}

.category-card-body h2 {
  margin: 12px 0 8px;
}

.ranking-list {
  padding: 24px 0 60px;
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 78px 90px minmax(0, 1fr) 64px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 20px;
  background: rgba(41, 31, 23, 0.78);
}

.rank-no,
.rank-row > strong {
  color: #fbbf24;
  font-size: 1.25rem;
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
}

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

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.rank-info p {
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: grid;
  align-items: center;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  filter: blur(4px) saturate(1.2);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.98), rgba(28, 25, 23, 0.78));
}

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

.detail-content {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 24px;
}

.breadcrumbs a {
  color: #fbbf24;
}

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

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  max-width: 900px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  letter-spacing: -0.05em;
}

.detail-info p {
  max-width: 780px;
  font-size: 1.08rem;
}

.player-section {
  margin-top: -70px;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(251, 191, 36, 0.32);
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
  cursor: pointer;
}

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

.play-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.42);
}

.detail-main {
  padding: 38px 0 10px;
}

.detail-article {
  display: grid;
  gap: 22px;
}

.detail-block {
  padding: 26px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 24px;
  background: rgba(41, 31, 23, 0.76);
}

.detail-block h2 {
  margin: 0 0 12px;
}

.detail-block p {
  margin: 0;
  white-space: pre-line;
}

.info-table dl {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 0;
}

.info-table div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 247, 237, 0.06);
}

.info-table dt {
  color: #fbbf24;
  font-weight: 900;
}

.info-table dd {
  margin: 6px 0 0;
  color: var(--muted);
}

.related-section {
  padding-bottom: 60px;
}

.site-footer {
  margin-top: 30px;
  padding: 34px 0;
  border-top: 1px solid rgba(251, 191, 36, 0.18);
  background: rgba(28, 25, 23, 0.78);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: center;
}

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

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

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

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

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .nav-panel {
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid rgba(251, 191, 36, 0.26);
    border-radius: 20px;
    background: rgba(41, 31, 23, 0.96);
  }

  .nav-panel.open {
    display: flex;
  }

  .top-search {
    width: 100%;
  }

  .top-search input {
    width: 100%;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
  }

  .hero-copy {
    padding-top: 40px;
  }

  .hero-poster {
    width: min(280px, 72vw);
    justify-self: center;
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .category-card-media,
  .detail-poster {
    width: min(240px, 100%);
  }

  .info-table dl {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .navbar,
  .content-section,
  .filter-bar,
  .ranking-list,
  .detail-main,
  .player-section,
  .detail-content {
    width: min(100% - 24px, 1280px);
  }

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

  .stats-strip,
  .category-grid,
  .info-table dl {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .rank-row {
    grid-template-columns: 54px 70px minmax(0, 1fr);
  }

  .rank-row > strong {
    grid-column: 2 / 4;
  }

  .hero-copy h1,
  .detail-info h1 {
    letter-spacing: -0.04em;
  }
}
