:root {
  --stone-950: #1c1917;
  --stone-900: #292524;
  --stone-800: #44403c;
  --stone-700: #57534e;
  --stone-600: #78716c;
  --stone-100: #f5f5f4;
  --stone-50: #fafaf9;
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-200: #fde68a;
  --orange-800: #9a3412;
  --white: #ffffff;
  --shadow-soft: 0 16px 40px rgba(28, 25, 23, 0.12);
  --shadow-card: 0 12px 28px rgba(28, 25, 23, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--stone-800);
  background: var(--stone-50);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar {
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-900), var(--orange-800), var(--amber-900));
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.25);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--amber-900);
  background: linear-gradient(135deg, #fff7ed, var(--amber-200));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  white-space: nowrap;
}

.nav-links a {
  opacity: 0.94;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover {
  color: var(--amber-200);
  opacity: 1;
}

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

.nav-search input,
.search-page-form input,
.quick-search form input,
.filter-box input,
.filter-box select {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  outline: none;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  padding: 10px 16px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input::placeholder,
.search-page-form input::placeholder,
.quick-search form input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.nav-search input:focus,
.search-page-form input:focus,
.quick-search form input:focus,
.filter-box input:focus,
.filter-box select:focus {
  border-color: var(--amber-200);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(253, 230, 138, 0.24);
}

.nav-search button,
.search-page-form button,
.quick-search form button,
.filter-box button {
  border: 0;
  border-radius: 999px;
  color: var(--amber-900);
  background: var(--amber-200);
  padding: 10px 18px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: var(--stone-950);
}

.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-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.06) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 24%, rgba(245, 158, 11, 0.32), transparent 34%),
    linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0%, rgba(28, 25, 23, 0.74) 46%, rgba(28, 25, 23, 0.28) 100%),
    linear-gradient(0deg, rgba(28, 25, 23, 0.78), transparent 38%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2));
  bottom: 82px;
  max-width: 720px;
  padding-right: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--amber-200);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.ranking-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.06;
  font-weight: 900;
  text-wrap: balance;
}

.hero-content p,
.page-hero p,
.ranking-hero p {
  margin: 0 0 24px;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-tags,
.tag-list,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span,
.detail-tags span {
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.24);
  padding: 5px 10px;
  font-size: 13px;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary,
.side-btn {
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.32);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  font-size: 36px;
  line-height: 1;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

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

.band {
  background: linear-gradient(90deg, var(--amber-900), var(--orange-800), var(--amber-900));
}

.quick-search {
  color: var(--white);
  padding: 28px 0;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  align-items: center;
  gap: 24px;
}

.quick-search h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.quick-search p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.quick-search form,
.search-page-form {
  display: flex;
  gap: 10px;
}

.quick-search form input,
.search-page-form input {
  flex: 1;
}

.section {
  padding: 54px 0;
}

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

.section-header h2 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.16;
}

.section-header p {
  margin: 6px 0 0;
  color: var(--stone-600);
}

.section-more,
.rank-more {
  color: var(--amber-700);
  font-weight: 800;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile {
  min-height: 160px;
  padding: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.22), transparent 38%),
    linear-gradient(135deg, #ffffff, #fff7ed);
}

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

.category-tile span,
.category-card h2 {
  display: block;
  color: var(--stone-900);
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  display: block;
  margin: 12px 0 6px;
  color: var(--amber-700);
  font-size: 34px;
  line-height: 1;
}

.category-tile em,
.category-card p {
  color: var(--stone-600);
  font-style: normal;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--stone-900);
}

.poster-link img,
.compact-card img,
.detail-cover,
.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(120, 53, 15, 0.86);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(217, 119, 6, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--stone-900);
  font-size: 18px;
  line-height: 1.3;
}

.movie-meta,
.movie-desc {
  margin: 0 0 10px;
  color: var(--stone-600);
  font-size: 14px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.warm-section {
  background: linear-gradient(90deg, #fff7ed, #fffbeb);
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
}

.rail .movie-card {
  scroll-snap-align: start;
}

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

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

.rank-panel,
.info-card,
.detail-content,
.filter-box,
.category-card {
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.rank-panel h2 {
  margin: 0 0 16px;
  color: var(--stone-900);
}

.rank-panel ol,
.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item + .rank-item {
  margin-top: 12px;
}

.rank-item a {
  display: grid;
  grid-template-columns: 42px 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.rank-number {
  color: var(--amber-700);
  font-weight: 900;
  font-size: 20px;
}

.rank-item img {
  width: 56px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--stone-900);
}

.rank-title {
  display: block;
  overflow: hidden;
  color: var(--stone-900);
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  grid-column: 3;
  display: block;
  color: var(--stone-600);
  font-size: 13px;
}

.page-hero,
.ranking-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-900), var(--orange-800), var(--amber-900));
  padding: 74px 0;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% 45%;
  height: 240px;
  border-radius: 999px;
  background: rgba(253, 230, 138, 0.18);
  filter: blur(8px);
}

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

.category-card {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  height: 150px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--stone-900);
}

.category-card h2 {
  margin: 8px 0 8px;
}

.category-card span {
  color: var(--amber-700);
  font-weight: 900;
}

.filter-box {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 180px 160px auto;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
}

.filter-box input,
.filter-box select {
  color: var(--stone-800);
  border-color: #e7e5e4;
  background: #fff;
}

.filter-box button {
  color: var(--white);
  background: var(--amber-700);
}

.empty-state,
.search-summary {
  border-radius: var(--radius);
  color: var(--stone-600);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  text-align: center;
}

.search-summary {
  margin-bottom: 24px;
  text-align: left;
}

.search-page-form {
  max-width: 760px;
}

.search-page-form input {
  color: var(--white);
}

.ranking-hero {
  min-height: 440px;
  display: flex;
  align-items: center;
}

.ranking-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.95), rgba(28, 25, 23, 0.42));
}

.ranking-hero-content {
  position: relative;
  z-index: 1;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-shell {
  padding: 28px 0 0;
}

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

.breadcrumb a {
  color: var(--amber-700);
  font-weight: 700;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.08));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.94);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  font-size: 30px;
  text-indent: 4px;
}

.player-card.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
}

.detail-content {
  margin-top: 24px;
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 12px;
  color: var(--stone-900);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
}

.lead {
  margin: 0 0 18px;
  color: var(--stone-700);
  font-size: 18px;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-tags span {
  color: var(--amber-900);
  background: #ffedd5;
}

.text-block + .text-block {
  margin-top: 24px;
}

.text-block h2 {
  margin: 0 0 10px;
  color: var(--stone-900);
  font-size: 24px;
}

.text-block p {
  margin: 0;
  color: var(--stone-700);
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 20px;
  background: var(--stone-900);
  box-shadow: var(--shadow-card);
}

.info-card {
  margin-top: 18px;
  padding: 20px;
}

.info-card h2 {
  margin: 0 0 12px;
  color: var(--stone-900);
}

.info-card p {
  margin: 8px 0;
  color: var(--stone-600);
}

.side-btn {
  width: 100%;
  margin-top: 14px;
}

.compact-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compact-card img {
  width: 62px;
  height: 86px;
  border-radius: 10px;
}

.site-footer {
  margin-top: 64px;
  color: #d6d3d1;
  background: linear-gradient(180deg, var(--stone-800), var(--stone-950));
}

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

.footer-brand {
  color: var(--white);
  font-size: 20px;
}

.site-footer p {
  max-width: 360px;
  color: #a8a29e;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  color: #a8a29e;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }

  .filter-box {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .nav-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

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

  .nav-links a {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
  }

  .hero-carousel {
    min-height: 540px;
  }

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

  .hero-control {
    display: none;
  }

  .quick-search-inner,
  .footer-inner,
  .category-list-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .quick-search form,
  .search-page-form {
    flex-direction: column;
  }

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

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

  .filter-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .container,
  .nav-inner,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-carousel {
    min-height: 500px;
  }

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

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

  .category-covers {
    height: 220px;
  }

  .rail {
    grid-auto-columns: 245px;
  }

  .detail-content {
    padding: 22px;
  }
}
