* {
  box-sizing: border-box;
}

:root {
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --bg-card: #292524;
  --bg-card-deep: #1f1b18;
  --line: rgba(120, 113, 108, 0.28);
  --text: #fafaf9;
  --muted: #d6d3d1;
  --subtle: #a8a29e;
  --amber: #f59e0b;
  --amber-deep: #d97706;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(245, 158, 11, 0.14), transparent 32rem),
    radial-gradient(circle at 88% 18%, rgba(120, 53, 15, 0.16), transparent 24rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(28, 25, 23, 0.94);
  border-bottom: 1px solid rgba(68, 64, 60, 0.78);
  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: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28);
}

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

.nav-link {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #1c1917;
  background: var(--amber);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(41, 37, 36, 0.82);
  border-radius: 14px;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  background: rgba(12, 10, 9, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav-link,
.mobile-category-row a {
  display: block;
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 12px;
}

.mobile-category-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.hero {
  position: relative;
  height: 680px;
  overflow: hidden;
  background: #111;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0c0a09 0%, rgba(12, 10, 9, 0.84) 22%, rgba(12, 10, 9, 0.32) 62%, rgba(12, 10, 9, 0.24) 100%),
    linear-gradient(to right, rgba(12, 10, 9, 0.82), rgba(12, 10, 9, 0.12));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2));
  bottom: 132px;
  width: min(650px, calc(100% - 48px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #1c1917;
  background: var(--amber);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.lead-text {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--subtle);
}

.hero-meta {
  margin-top: 22px;
  font-weight: 700;
}

.hero-meta span:first-child,
.movie-meta span:first-child {
  color: #fbbf24;
}

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

.primary-button,
.ghost-button,
.section-more,
.search-row a,
.category-card-head a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #1c1917;
  background: var(--amber);
}

.primary-button:hover,
.search-row a:hover,
.category-card-head a:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

.ghost-button,
.section-more {
  color: var(--text);
  background: rgba(41, 37, 36, 0.72);
  border: 1px solid var(--line);
}

.ghost-button:hover,
.section-more:hover {
  border-color: rgba(245, 158, 11, 0.58);
  background: rgba(68, 64, 60, 0.72);
  transform: translateY(-1px);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

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

.search-box {
  position: relative;
  padding: 18px;
  background: rgba(28, 25, 23, 0.88);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box label,
.filter-panel label span {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-row input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  background: rgba(12, 10, 9, 0.78);
  border: 1px solid rgba(120, 113, 108, 0.46);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
}

.search-row input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.9);
}

.search-row a,
.category-card-head a {
  color: #1c1917;
  background: var(--amber);
}

.search-results {
  position: absolute;
  left: 18px;
  right: 18px;
  top: calc(100% - 4px);
  z-index: 20;
  display: none;
  max-height: 420px;
  overflow: auto;
  padding: 10px;
  background: rgba(12, 10, 9, 0.98);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.search-results.open {
  display: grid;
  gap: 8px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
}

.search-result-item:hover {
  background: rgba(68, 64, 60, 0.58);
}

.search-result-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.search-result-item strong {
  display: block;
  color: var(--text);
}

.search-result-item span {
  color: var(--subtle);
  font-size: 13px;
}

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

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

.no-top-padding {
  padding-top: 0;
}

.with-top-space {
  padding-top: 112px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--subtle);
  line-height: 1.7;
}

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

.category-tile {
  min-height: 124px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(41, 37, 36, 0.95), rgba(28, 25, 23, 0.95));
  border: 1px solid var(--line);
  border-radius: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover,
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.48);
}

.category-tile span {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.category-tile em {
  display: block;
  margin-top: 10px;
  color: var(--subtle);
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
}

.movie-grid,
.featured-grid,
.horizontal-grid,
.category-card-grid {
  display: grid;
  gap: 18px;
}

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

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

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

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

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

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

.movie-card {
  overflow: hidden;
  background: rgba(28, 25, 23, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: rgba(41, 37, 36, 0.9);
}

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

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

.movie-card:hover .movie-cover img,
.category-preview a:hover img,
.rank-cover:hover img {
  transform: scale(1.08);
}

.movie-badge,
.movie-score {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-badge {
  left: 10px;
  top: 10px;
  color: #1c1917;
  background: rgba(245, 158, 11, 0.94);
}

.movie-score {
  right: 10px;
  bottom: 10px;
  color: #fbbf24;
  background: rgba(0, 0, 0, 0.62);
}

.movie-info {
  padding: 14px;
}

.movie-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-info p {
  display: -webkit-box;
  min-height: 42px;
  margin: 9px 0 12px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  font-size: 13px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
}

.movie-card-horizontal .movie-cover {
  aspect-ratio: auto;
  height: 100%;
}

.gradient-panel,
.rank-section {
  padding: 34px;
  background: linear-gradient(135deg, rgba(41, 37, 36, 0.88), rgba(12, 10, 9, 0.88));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}

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

.rank-list-large {
  grid-template-columns: 1fr;
}

.rank-item {
  display: grid;
  grid-template-columns: 50px 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: rgba(12, 10, 9, 0.52);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.rank-number {
  color: var(--amber);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  overflow: hidden;
  border-radius: 12px;
}

.rank-cover img {
  width: 82px;
  height: 110px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.rank-title {
  display: block;
  color: var(--text);
  font-weight: 850;
}

.rank-item p {
  display: -webkit-box;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--subtle);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero,
.detail-hero,
.filter-panel,
.detail-text,
.player-section {
  background: linear-gradient(135deg, rgba(41, 37, 36, 0.92), rgba(12, 10, 9, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: 44px;
  margin-bottom: 34px;
}

.inline-search {
  max-width: 720px;
  margin-top: 28px;
  box-shadow: none;
}

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

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

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

.category-card-large {
  padding: 22px;
  background: rgba(28, 25, 23, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-card-head span {
  font-size: 22px;
  font-weight: 900;
}

.category-card-large p {
  color: var(--subtle);
  line-height: 1.7;
}

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

.category-preview a {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.category-preview img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-preview span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: -webkit-box;
  padding: 28px 8px 8px;
  overflow: hidden;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86), transparent);
  font-size: 12px;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 220px;
  gap: 16px;
  padding: 18px;
  margin-bottom: 32px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  padding: 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
}

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

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

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.detail-meta-grid div {
  padding: 15px;
  background: rgba(12, 10, 9, 0.58);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.detail-meta-grid strong {
  display: block;
  color: #fbbf24;
  font-size: 20px;
}

.detail-meta-grid span {
  color: var(--subtle);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.tag-row span {
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(68, 64, 60, 0.64);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.player-section,
.detail-text {
  margin-top: 32px;
  padding: 28px;
}

.player-section h2,
.detail-text h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 24px;
  aspect-ratio: 16 / 9;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--text);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.18));
  border: 0;
  cursor: pointer;
}

.play-cover.is-hidden {
  display: none;
}

.play-cover span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: #1c1917;
  background: var(--amber);
  border-radius: 999px;
  font-size: 30px;
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.32);
}

.play-cover strong {
  font-size: 18px;
}

.detail-text p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

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

.site-footer {
  margin-top: 70px;
  background: rgba(28, 25, 23, 0.88);
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 28px;
}

.site-footer p,
.footer-links a {
  color: var(--subtle);
  line-height: 1.7;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

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

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

.footer-bottom {
  padding: 18px;
  color: var(--subtle);
  text-align: center;
  border-top: 1px solid var(--line);
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 760px;
  }

  .hero-content {
    bottom: 208px;
  }

  .hero-search-panel {
    bottom: 24px;
  }

  .hero-dots {
    bottom: 178px;
  }

  .hero-control {
    display: none;
  }

  .search-row,
  .filter-panel,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .category-card-grid,
  .category-movie-grid,
  .movie-grid,
  .four-cols,
  .six-cols,
  .featured-grid,
  .horizontal-grid,
  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movie-card-horizontal {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

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

  .detail-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .page-shell,
  .hero-search-panel,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .hero-content {
    left: 16px;
    width: calc(100% - 32px);
  }

  .compact-hero,
  .detail-hero,
  .player-section,
  .detail-text,
  .gradient-panel,
  .rank-section {
    padding: 20px;
    border-radius: 22px;
  }

  .category-grid,
  .category-card-grid,
  .category-movie-grid,
  .movie-grid,
  .four-cols,
  .six-cols,
  .featured-grid,
  .horizontal-grid {
    grid-template-columns: 1fr;
  }

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

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