:root {
  --bg: #0f0f0f;
  --panel: #1a1a1a;
  --panel-soft: rgba(26, 26, 26, 0.78);
  --brown: #4e342e;
  --brown-soft: rgba(78, 52, 46, 0.42);
  --warm: #ffa726;
  --gold: #ffb74d;
  --beige: #d7ccc8;
  --muted: rgba(215, 204, 200, 0.62);
  --white: #ffffff;
  --black: #000000;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 167, 38, 0.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(78, 52, 46, 0.34), transparent 26rem),
    var(--bg);
  color: var(--beige);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(78, 52, 46, 0.42);
  background: rgba(26, 26, 26, 0.92);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--warm), var(--gold));
  color: #21130b;
  box-shadow: 0 12px 30px rgba(255, 167, 38, 0.25);
}

.brand-text {
  font-size: 1.18rem;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(215, 204, 200, 0.78);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
  background: rgba(78, 52, 46, 0.42);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 183, 77, 0.24);
  border-radius: 14px;
  background: transparent;
  color: var(--beige);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--gold);
  border-radius: 999px;
}

.hero {
  position: relative;
  height: 500px;
  margin-top: 32px;
  border: 1px solid rgba(255, 183, 77, 0.15);
  border-radius: 24px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

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

.hero-slide img,
.detail-bg,
.category-card img,
.ranking-row img,
.poster-frame img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(255, 167, 38, 0.22), rgba(78, 52, 46, 0.56)),
    var(--panel);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.08)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent 52%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  right: clamp(24px, 8vw, 110px);
  bottom: clamp(30px, 8vw, 74px);
  max-width: 700px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 183, 77, 0.28);
  border-radius: 999px;
  background: rgba(255, 167, 38, 0.14);
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.14rem);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-meta,
.detail-meta {
  margin-top: 18px;
}

.hero-meta span,
.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
}

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

.primary-btn,
.ghost-btn,
.rank-more,
.center-action a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--warm), var(--gold));
  color: #251300;
  box-shadow: 0 14px 28px rgba(255, 167, 38, 0.25);
}

.ghost-btn,
.rank-more,
.center-action a {
  border: 1px solid rgba(255, 183, 77, 0.24);
  background: rgba(26, 26, 26, 0.74);
  color: var(--gold);
}

.primary-btn:hover,
.ghost-btn:hover,
.rank-more:hover,
.center-action a:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s ease, background 0.2s ease;
}

.hero:hover .hero-arrow {
  opacity: 1;
}

.hero-arrow:hover {
  background: rgba(255, 167, 38, 0.88);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

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

.hero-dot.active {
  width: 32px;
  background: var(--warm);
}

.quick-panel,
.filter-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: center;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid rgba(78, 52, 46, 0.52);
  border-radius: 22px;
  background: rgba(26, 26, 26, 0.72);
}

.quick-panel h2,
.section-heading h2,
.detail-block h2,
.detail-side h2 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.quick-panel p,
.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.pill-row a,
.genre-links a,
.genre-links span,
.tag-cloud span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(78, 52, 46, 0.38);
  color: var(--gold);
}

.pill-row a {
  padding: 8px 13px;
}

.content-section,
.split-section,
.category-grid,
.ranking-page,
.detail-layout,
.player-section {
  margin-top: 42px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  background: linear-gradient(135deg, #fff1cf, var(--warm));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-heading.small h2 {
  font-size: 1.5rem;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(78, 52, 46, 0.42);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 183, 77, 0.48);
  box-shadow: 0 26px 65px rgba(0, 0, 0, 0.34);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 167, 38, 0.18), rgba(78, 52, 46, 0.56)),
    var(--panel);
}

.poster-frame img {
  transition: transform 0.32s ease, opacity 0.2s ease;
}

.card-link:hover .poster-frame img {
  transform: scale(1.08);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent);
}

.card-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 167, 38, 0.92);
  color: #21130b;
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.card-link:hover .card-play {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  display: block;
  padding: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.card-body h2 {
  min-height: 2.8em;
  margin: 10px 0 8px;
  color: var(--white);
  font-size: 1rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-body p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  color: rgba(215, 204, 200, 0.68);
  font-size: 0.82rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.ranking-card,
.detail-side {
  border: 1px solid rgba(78, 52, 46, 0.48);
  border-radius: 20px;
  background: rgba(26, 26, 26, 0.78);
  padding: 22px;
  box-shadow: var(--shadow);
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li + li {
  border-top: 1px solid rgba(78, 52, 46, 0.35);
}

.rank-list a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
}

.rank-list span,
.ranking-num {
  color: var(--warm);
  font-weight: 900;
}

.rank-list strong {
  min-width: 0;
  overflow: hidden;
  color: var(--white);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-list em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.rank-more {
  width: 100%;
  margin-top: 18px;
}

.center-action {
  margin-top: 28px;
  text-align: center;
}

.page-hero {
  position: relative;
  margin-top: 32px;
  padding: clamp(42px, 8vw, 82px);
  overflow: hidden;
  border: 1px solid rgba(255, 183, 77, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(78, 52, 46, 0.62), rgba(26, 26, 26, 0.78)),
    radial-gradient(circle at top right, rgba(255, 167, 38, 0.2), transparent 24rem);
  box-shadow: var(--shadow);
}

.filter-panel {
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 220px));
}

.search-panel {
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, 220px));
}

.filter-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 183, 77, 0.18);
  border-radius: 14px;
  outline: none;
  background: rgba(15, 15, 15, 0.75);
  color: var(--beige);
  padding: 0 14px;
}

.filter-input:focus,
.filter-select:focus {
  border-color: rgba(255, 167, 38, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 167, 38, 0.12);
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid rgba(78, 52, 46, 0.44);
  border-radius: 20px;
  background: var(--panel);
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-card span {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.16)),
    linear-gradient(135deg, rgba(255, 167, 38, 0.24), transparent);
}

.category-card strong,
.category-card em {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-card strong {
  bottom: 50px;
  color: var(--white);
  font-size: 1.45rem;
}

.category-card em {
  bottom: 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  font-style: normal;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-page {
  display: grid;
  gap: 12px;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 70px 86px minmax(0, 1fr) 74px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(78, 52, 46, 0.42);
  border-radius: 18px;
  background: rgba(26, 26, 26, 0.72);
}

.ranking-row img {
  width: 86px;
  height: 116px;
  border-radius: 12px;
}

.ranking-info strong {
  display: block;
  color: var(--white);
  font-size: 1.1rem;
}

.ranking-info em {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-style: normal;
}

.ranking-info p {
  margin: 7px 0 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.ranking-action {
  justify-self: end;
  color: var(--warm);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(4px) saturate(0.82);
  transform: scale(1.04);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 15, 15, 0.96), rgba(15, 15, 15, 0.72), rgba(15, 15, 15, 0.82)),
    linear-gradient(0deg, var(--bg), transparent 58%);
}

.detail-head {
  position: relative;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
  min-height: 520px;
  padding-top: 72px;
  padding-bottom: 52px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 183, 77, 0.2);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.detail-copy p {
  color: rgba(255, 255, 255, 0.78);
}

.genre-links,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.genre-links a,
.genre-links span,
.tag-cloud span {
  padding: 7px 12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 183, 77, 0.2);
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
  color: var(--white);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-button span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--warm), var(--gold));
  color: #21130b;
  font-size: 2rem;
  box-shadow: 0 18px 45px rgba(255, 167, 38, 0.28);
}

.player-shell.is-playing .play-button {
  opacity: 0;
  visibility: hidden;
}

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

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

.detail-block {
  padding: 24px;
  border: 1px solid rgba(78, 52, 46, 0.44);
  border-radius: 20px;
  background: rgba(26, 26, 26, 0.76);
}

.detail-block p {
  margin: 14px 0 0;
  color: rgba(215, 204, 200, 0.84);
  font-size: 1.02rem;
  line-height: 1.9;
}

.detail-side dl {
  margin: 16px 0 0;
}

.detail-side div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(78, 52, 46, 0.28);
}

.detail-side dt {
  color: var(--gold);
}

.detail-side dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(78, 52, 46, 0.42);
  background: rgba(10, 10, 10, 0.58);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  padding: 34px 0;
}

.footer-grid p {
  max-width: 620px;
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 1rem;
}

.footer-grid a:not(.footer-brand) {
  display: inline-block;
  margin: 0 12px 8px 0;
  color: rgba(215, 204, 200, 0.7);
}

.copyright {
  padding: 18px 0 26px;
  border-top: 1px solid rgba(78, 52, 46, 0.28);
  color: rgba(215, 204, 200, 0.46);
  font-size: 0.9rem;
}

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

img.is-missing {
  opacity: 0;
}

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

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

  .filter-panel,
  .search-panel,
  .quick-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid rgba(78, 52, 46, 0.54);
    border-radius: 18px;
    background: rgba(26, 26, 26, 0.98);
  }

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

  .nav-link {
    border-radius: 12px;
  }

  .hero {
    height: 430px;
    margin-top: 18px;
    border-radius: 18px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.18));
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 42px;
  }

  .hero-arrow {
    opacity: 1;
  }

  .hero-dots {
    left: 20px;
    right: auto;
  }

  .quick-panel,
  .filter-panel,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .pill-row {
    justify-content: flex-start;
  }

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

  .detail-head {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 42px;
  }

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

  .ranking-row a {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }

  .ranking-row img {
    width: 72px;
    height: 98px;
  }

  .ranking-action {
    display: none;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .compact-grid,
  .archive-grid,
  .category-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-body {
    padding: 11px;
  }

  .card-body h2 {
    font-size: 0.92rem;
  }

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