:root {
  --bg: #0c0a09;
  --panel: #1c1917;
  --panel-soft: #292524;
  --line: rgba(245, 158, 11, 0.18);
  --text: #fff7ed;
  --muted: #d6d3d1;
  --soft: #a8a29e;
  --accent: #f59e0b;
  --accent-dark: #b45309;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.13), transparent 34rem),
    radial-gradient(circle at 82% 14%, rgba(180, 83, 9, 0.12), transparent 36rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.94), rgba(146, 64, 14, 0.92), rgba(120, 53, 15, 0.94));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #451a03;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: clamp(18px, 2vw, 25px);
}

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

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

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px 14px;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #111;
}

.hero-stage {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0c0a09 3%, rgba(12, 10, 9, 0.72) 46%, rgba(12, 10, 9, 0.1)),
    linear-gradient(90deg, rgba(12, 10, 9, 0.92), rgba(12, 10, 9, 0.38), rgba(12, 10, 9, 0.18));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 9vh;
  width: min(680px, calc(100% - 48px));
  animation: heroRise 900ms ease both;
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fcd34d;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-one-line {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #451a03;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.24);
}

.primary-button.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.ghost-button {
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 36px;
  background: #fbbf24;
}

.search-panel,
.content-section,
.page-main,
.site-footer .footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-panel {
  margin-top: -34px;
  position: relative;
  z-index: 3;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-box input {
  width: 100%;
  height: 50px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  padding: 0 20px;
  color: var(--text);
  background: rgba(12, 10, 9, 0.62);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.78);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-box span {
  min-width: 90px;
  color: #fcd34d;
  font-weight: 800;
  text-align: right;
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-cats a {
  padding: 7px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
}

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

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

.section-title-row h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-title-row p {
  margin: 8px 0 0;
  color: var(--soft);
}

.section-more {
  color: #fbbf24;
  font-weight: 900;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.88);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
}

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

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

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

.poster-year,
.poster-score {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.poster-year {
  left: 12px;
  color: #fff7ed;
  background: rgba(12, 10, 9, 0.68);
}

.poster-score {
  right: 12px;
  color: #451a03;
  background: #fbbf24;
}

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

.movie-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: #fcd34d;
  font-size: 12px;
  font-weight: 800;
}

.movie-meta-line span,
.movie-meta-line a {
  opacity: 0.9;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

.movie-card p {
  margin: 0;
  min-height: 64px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.55;
}

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

.tag-row span {
  display: inline-flex;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 999px;
  padding: 4px 8px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.large-tags span {
  padding: 7px 11px;
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
}

.hot-rank-box,
.text-card,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.78);
  box-shadow: var(--shadow);
}

.hot-rank-box {
  padding: 22px;
  align-self: start;
  position: sticky;
  top: 88px;
}

.compact-title {
  align-items: start;
  margin-bottom: 18px;
}

.compact-title h2 {
  font-size: 28px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 18px;
  background: rgba(12, 10, 9, 0.28);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(3px);
  background: rgba(245, 158, 11, 0.08);
}

.rank-no {
  color: #fbbf24;
  font-weight: 950;
}

.rank-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy small {
  color: var(--soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1c1917;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.62;
}

.category-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(12, 10, 9, 0.92), transparent);
}

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

.category-card span {
  bottom: 48px;
  font-size: 22px;
  font-weight: 950;
}

.category-card strong {
  bottom: 20px;
  color: #fcd34d;
}

.page-main {
  padding-bottom: 70px;
}

.page-hero {
  margin-top: 34px;
  padding: clamp(36px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(120, 53, 15, 0.58), rgba(28, 25, 23, 0.9)),
    radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.22), transparent 22rem);
  box-shadow: var(--shadow);
}

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

.category-overview-list {
  display: grid;
  gap: 22px;
  margin-top: 36px;
}

.category-overview-card {
  padding: 22px;
}

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

.category-overview-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.category-overview-head p {
  margin: 0;
  color: var(--soft);
}

.mini-poster-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mini-poster-row a {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 8;
  background: #111;
}

.mini-poster-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.mini-poster-row span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  font-weight: 900;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.95);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 28px 0 18px;
  color: var(--soft);
}

.breadcrumb a {
  color: #fcd34d;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: clamp(24px, 5vw, 52px);
  align-items: center;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(28, 25, 23, 0.94), rgba(68, 64, 60, 0.36)),
    radial-gradient(circle at 75% 10%, rgba(245, 158, 11, 0.2), transparent 23rem);
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
  font-size: clamp(38px, 5vw, 70px);
}

.player-section {
  margin-top: 42px;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: 32px;
  font-weight: 950;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff7ed;
  cursor: pointer;
  background:
    linear-gradient(rgba(12, 10, 9, 0.28), rgba(12, 10, 9, 0.82)),
    var(--player-poster, transparent);
}

.player-shell.is-playing .player-cover {
  display: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #451a03;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.32);
  font-size: 26px;
  padding-left: 4px;
}

.player-cover strong {
  font-size: 24px;
}

.detail-text-section {
  padding-top: 42px;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.text-card {
  padding: clamp(20px, 3vw, 30px);
}

.text-card h2,
.text-card h3 {
  margin: 0 0 14px;
  color: #fde68a;
  font-size: 26px;
  font-weight: 950;
}

.text-card p {
  color: var(--muted);
  line-height: 1.9;
}

.narrow-page {
  max-width: 900px;
}

.site-footer {
  margin-top: 70px;
  padding: 46px 0;
  border-top: 1px solid var(--line);
  background: rgba(12, 10, 9, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 36px;
}

.site-footer h3,
.site-footer h4 {
  margin: 0 0 14px;
  color: #fde68a;
}

.site-footer p,
.site-footer a {
  color: var(--soft);
  line-height: 1.8;
}

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

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

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

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

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

  .hot-rank-box {
    position: static;
  }

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

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

@media (max-width: 780px) {
  .site-header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 4px;
  }

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

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

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    bottom: 88px;
  }

  .search-box {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box span {
    min-width: 0;
    text-align: left;
  }

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

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

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    min-height: 56px;
    font-size: 13px;
  }

  .category-grid,
  .rank-page-list,
  .mini-poster-row,
  .footer-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 260px;
  }

  .page-hero {
    padding: 28px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .feature-grid,
  .small-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .brand-text {
    font-size: 18px;
  }
}
