:root {
  color-scheme: dark;
  --bg: #1c1917;
  --panel: #292524;
  --panel-soft: #44403c;
  --line: #57534e;
  --text: #ffffff;
  --muted: #a8a29e;
  --soft: #d6d3d1;
  --brand: #d97706;
  --brand-dark: #92400e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(41, 37, 36, 0.95);
  border-bottom: 1px solid rgba(87, 83, 78, 0.72);
  backdrop-filter: blur(16px);
}

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

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

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--panel-soft));
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.25);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  color: #fef3c7;
  font-size: 20px;
}

.brand-text em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--soft);
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
  background: var(--brand);
  color: #fff;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 210px;
  padding: 10px;
  display: none;
  grid-template-columns: 1fr;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .dropdown-panel {
  display: grid;
}

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

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  font-size: 20px;
}

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

.menu-toggle {
  display: none;
}

.search-bar,
.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
}

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

.search-bar form {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

input,
select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: #fff;
  background: var(--panel-soft);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--brand);
}

button,
.btn {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s ease;
}

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

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.page-shell {
  padding: 38px 0 72px;
}

.hero {
  position: relative;
  height: min(720px, 72vh);
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #1c1917 0%, rgba(28, 25, 23, 0.72) 42%, rgba(0, 0, 0, 0.22) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 70px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  max-width: 860px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

.hero-dots button {
  width: 12px;
  min-height: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--brand);
}

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--panel);
}

.section-title {
  margin-bottom: 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-title h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-title p,
.page-title p,
.category-intro,
.detail-muted {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(87, 83, 78, 0.8);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(217, 119, 6, 0.75);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #292524, #000);
}

.movie-card-large .card-cover {
  aspect-ratio: 16 / 9;
}

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

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

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

.card-year,
.card-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.card-year {
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.65);
}

.card-play {
  left: 12px;
  bottom: 12px;
  padding: 7px 12px;
  background: var(--brand);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.card-body h3 a:hover {
  color: #fbbf24;
}

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span,
.tag {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(217, 119, 6, 0.16);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(87, 83, 78, 0.8);
  background: radial-gradient(circle at top right, rgba(217, 119, 6, 0.35), transparent 40%), var(--panel);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 25px;
}

.category-card p {
  margin: 0 0 20px;
  color: var(--soft);
}

.category-card ul {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.category-card li a {
  color: var(--soft);
}

.category-card li a:hover {
  color: #fbbf24;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 72px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(68, 64, 60, 0.62);
  border: 1px solid rgba(87, 83, 78, 0.62);
}

.rank-item:hover {
  border-color: rgba(217, 119, 6, 0.8);
  background: rgba(68, 64, 60, 0.92);
}

.rank-no,
.rank-dot {
  color: #fbbf24;
  font-weight: 900;
  text-align: center;
}

.rank-dot {
  width: 12px;
  height: 12px;
  margin: auto;
  border-radius: 999px;
  background: var(--brand);
}

.rank-item img {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-item strong,
.rank-item em {
  display: block;
}

.rank-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.filters {
  margin: 24px 0 30px;
  padding: 18px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  border: 1px solid rgba(87, 83, 78, 0.72);
  border-radius: var(--radius);
  background: var(--panel);
}

.movie-card.is-hidden {
  display: none;
}

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

.breadcrumb a:hover {
  color: #fbbf24;
}

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

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

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

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.34);
  transition: opacity 0.2s ease;
}

.player-box.is-playing .player-layer {
  opacity: 0;
  pointer-events: none;
}

.play-main {
  width: 86px;
  height: 86px;
  min-height: 86px;
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 16px 50px rgba(217, 119, 6, 0.35);
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: var(--soft);
  text-align: center;
  pointer-events: none;
}

.detail-title {
  padding: 26px 0 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(68, 64, 60, 0.9);
}

.content-panel {
  margin-top: 22px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(87, 83, 78, 0.7);
}

.content-panel h2 {
  margin: 0 0 12px;
  font-size: 23px;
}

.content-panel p {
  margin: 0;
  color: var(--soft);
}

.detail-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.poster-card,
.side-panel {
  border-radius: var(--radius);
  border: 1px solid rgba(87, 83, 78, 0.7);
  background: var(--panel);
  overflow: hidden;
}

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

.poster-card div,
.side-panel {
  padding: 18px;
}

.side-panel h2 {
  margin: 0 0 16px;
}

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

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.footer-grid p,
.footer-links a,
.footer-bottom {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  border-top: 1px solid rgba(87, 83, 78, 0.4);
  font-size: 13px;
}

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

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

  .mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
  }

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

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

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

@media (max-width: 620px) {
  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    bottom: 62px;
  }

  .section {
    padding: 44px 0;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

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