:root {
  --bg: #1c1917;
  --panel: #292524;
  --panel-soft: #44403c;
  --line: #57534e;
  --text: #ffffff;
  --muted: #d6d3d1;
  --muted-2: #a8a29e;
  --amber: #d97706;
  --amber-soft: #f59e0b;
  --amber-pale: #fef3c7;
  --black: #000000;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  background: rgba(28, 25, 23, 0.96);
  border-bottom: 1px solid rgba(87, 83, 78, 0.45);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(41, 37, 36, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.header-inner,
.footer-grid,
.section,
.category-strip-inner,
.detail-container,
.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber), #3f3b38);
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.brand-copy,
.footer-logo span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong,
.footer-logo strong {
  color: var(--amber-pale);
  font-size: 20px;
}

.brand-copy small,
.footer-logo small {
  color: var(--muted-2);
  font-size: 12px;
  margin-top: 4px;
}

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

.desktop-nav > a,
.nav-drop > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  color: var(--muted);
  transition: background 0.25s ease, color 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.nav-drop:hover > a {
  color: #ffffff;
  background: var(--amber);
}

.nav-drop {
  position: relative;
}

.drop-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 210px;
  padding: 8px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(87, 83, 78, 0.8);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-drop:hover .drop-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.drop-panel a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease;
}

.icon-button:hover {
  color: #ffffff;
  background: var(--panel-soft);
}

.menu-button {
  display: none;
}

.search-panel,
.mobile-nav {
  display: none;
  border-top: 1px solid rgba(87, 83, 78, 0.6);
}

.search-panel.is-open,
.mobile-nav.is-open {
  display: block;
}

.search-form {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  gap: 10px;
}

.search-form input,
.filter-line input,
.filter-line select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #ffffff;
  background: var(--panel);
  outline: none;
}

.search-form input,
.filter-line input {
  flex: 1;
  padding: 0 14px;
}

.filter-line select {
  padding: 0 12px;
}

.search-form input:focus,
.filter-line input:focus,
.filter-line select:focus {
  border-color: var(--amber-soft);
}

.search-form button,
.primary-button,
.ghost-button,
.section-more,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.search-form button,
.primary-button {
  border: 0;
  color: #ffffff;
  background: var(--amber);
}

.search-form button {
  padding: 0 22px;
}

.primary-button,
.ghost-button {
  min-height: 48px;
  padding: 0 26px;
}

.primary-button:hover,
.search-form button:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(0, 0, 0, 0.18);
}

.ghost-button:hover {
  border-color: var(--amber-soft);
  color: var(--amber-pale);
}

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

.mobile-nav a {
  display: block;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--muted);
}

.mobile-nav a:hover {
  color: #ffffff;
  background: var(--panel-soft);
}

.hero {
  position: relative;
  min-height: 500px;
  height: 70vh;
  overflow: hidden;
  background: #0c0a09;
}

.hero-stage,
.hero-slide,
.hero-slide img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

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

.hero-overlay {
  background: linear-gradient(to top, #1c1917 0%, rgba(28, 25, 23, 0.72) 48%, rgba(28, 25, 23, 0.14) 100%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(16px, calc((100vw - 1280px) / 2));
  bottom: 64px;
  width: min(720px, calc(100% - 32px));
}

.eyebrow,
.card-category {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--amber);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.eyebrow {
  padding: 8px 16px;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
}

.hero-meta span,
.movie-meta span,
.detail-meta span,
.detail-meta a {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.36);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  transition: background 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.6);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.category-strip {
  padding: 22px 0;
  background: var(--panel);
  border-top: 1px solid rgba(87, 83, 78, 0.45);
  border-bottom: 1px solid rgba(87, 83, 78, 0.45);
}

.category-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.category-strip a {
  min-height: 90px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(68, 64, 60, 0.68);
  transition: transform 0.25s ease, background 0.25s ease;
}

.category-strip a:hover {
  transform: translateY(-3px);
  background: rgba(217, 119, 6, 0.82);
}

.category-strip strong,
.category-strip span {
  display: block;
}

.category-strip strong {
  color: #ffffff;
  margin-bottom: 6px;
}

.category-strip span {
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 64px 0;
}

.section-alt {
  width: 100%;
  max-width: none;
  padding-right: max(16px, calc((100vw - 1280px) / 2));
  padding-left: max(16px, calc((100vw - 1280px) / 2));
  background: var(--panel);
}

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

.section-head h2,
.page-hero h1,
.movie-detail-copy h1 {
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-more,
.text-link {
  color: var(--amber-soft);
}

.section-more:hover,
.text-link:hover {
  color: var(--amber-pale);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0c0a09;
}

.poster-link img,
.wide-cover img,
.detail-poster,
.category-cover-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img,
.wide-cover img {
  transition: transform 0.5s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 62%);
  opacity: 0.8;
}

.card-category {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
}

.card-year {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 12px;
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--amber);
  font-size: 14px;
}

.card-body {
  padding: 15px;
}

.card-body h2,
.wide-content h2 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.wide-content h2 a:hover,
.movie-detail-copy a:hover {
  color: var(--amber-soft);
}

.card-body p,
.wide-content p,
.page-hero p,
.movie-detail-copy p,
.footer-brand p,
.category-tile p {
  color: var(--muted-2);
  line-height: 1.75;
}

.card-body p,
.wide-content p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 12px;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--amber-pale);
  background: rgba(217, 119, 6, 0.18);
  font-size: 12px;
}

.page-main,
.detail-main {
  padding-top: 64px;
}

.page-hero {
  padding-top: 70px;
  padding-bottom: 34px;
}

.compact-hero {
  margin-top: 24px;
  padding: 48px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 10%, rgba(217, 119, 6, 0.32), transparent 34%),
    linear-gradient(135deg, rgba(68, 64, 60, 0.9), rgba(28, 25, 23, 0.96));
  box-shadow: var(--shadow);
}

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

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

.filter-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-cover-stack img {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #0c0a09;
}

.category-tile h2 {
  margin: 0 0 10px;
}

.rank-list {
  display: grid;
  gap: 16px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 178px;
}

.wide-cover {
  position: relative;
  overflow: hidden;
  background: #0c0a09;
}

.wide-content {
  padding: 18px 20px;
}

.wide-content .card-category {
  position: static;
  margin-bottom: 10px;
  padding: 5px 10px;
}

.detail-container {
  padding-top: 92px;
  padding-bottom: 48px;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.16));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 18px 42px rgba(217, 119, 6, 0.36);
  font-size: 30px;
}

.player-error {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.78);
  text-align: center;
}

.player-error.is-visible {
  display: flex;
}

.player-controls {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.player-shell:hover .player-controls,
.player-shell.is-playing .player-controls {
  opacity: 1;
}

.player-controls button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.player-controls button:hover {
  background: var(--amber);
}

.control-title {
  flex: 1;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-detail-copy {
  margin-top: 24px;
  padding: 28px;
  border-radius: 22px;
  background: var(--panel);
}

.movie-detail-copy h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 46px);
}

.movie-detail-copy section {
  margin-top: 26px;
}

.movie-detail-copy h2,
.side-card h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 21px;
}

.movie-detail-copy p {
  margin: 0;
}

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

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.prev-next a {
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--muted);
  background: var(--panel);
}

.prev-next a:last-child {
  text-align: right;
}

.prev-next a:hover {
  color: #ffffff;
  background: var(--panel-soft);
}

.detail-side {
  display: grid;
  gap: 18px;
  align-content: start;
  position: sticky;
  top: 88px;
}

.detail-poster,
.side-card {
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.detail-poster {
  aspect-ratio: 16 / 10;
}

.side-card {
  padding: 22px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

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

.side-card dd {
  margin: 0;
  color: var(--muted);
}

.related-section {
  width: 100%;
  padding-bottom: 0;
}

.site-footer {
  border-top: 1px solid rgba(87, 83, 78, 0.45);
  background: #0c0a09;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-brand p {
  max-width: 620px;
}

.site-footer h2 {
  margin: 0 0 16px;
  font-size: 17px;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--muted-2);
}

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

.copyright {
  color: var(--muted-2);
  font-size: 13px;
}

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

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

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

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

  .detail-side {
    position: static;
    grid-template-columns: minmax(0, 360px) 1fr;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

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

  .brand-copy small {
    display: none;
  }

  .hero {
    height: 72vh;
  }

  .hero-content {
    bottom: 72px;
  }

  .hero h1 {
    font-size: clamp(34px, 12vw, 54px);
  }

  .hero-arrow {
    display: none;
  }

  .section,
  .section-alt {
    padding-top: 46px;
    padding-bottom: 46px;
  }

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

  .movie-card-wide {
    grid-template-columns: 138px minmax(0, 1fr);
    min-height: 150px;
  }

  .category-tile,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .compact-hero {
    padding: 32px 22px;
  }

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

  .prev-next {
    grid-template-columns: 1fr;
  }

  .prev-next a:last-child {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-grid,
  .section,
  .category-strip-inner,
  .detail-container,
  .page-hero,
  .search-form,
  .mobile-nav {
    width: min(100% - 24px, 1280px);
  }

  .brand-copy {
    display: none;
  }

  .category-strip-inner,
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta,
  .detail-meta {
    gap: 7px;
  }

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

  .wide-cover {
    aspect-ratio: 16 / 9;
  }

  .filter-line,
  .search-filter {
    flex-direction: column;
  }

  .search-form {
    flex-direction: column;
  }

  .search-form button {
    min-height: 44px;
  }

  .movie-detail-copy {
    padding: 22px;
  }
}
