:root {
  --warm-50: #faf8f3;
  --warm-100: #f1eadf;
  --warm-200: #e3d8ca;
  --warm-300: #c9b9a8;
  --warm-400: #9b8776;
  --warm-600: #6f5f50;
  --warm-700: #4e4238;
  --warm-800: #2f2a24;
  --warm-900: #1d1915;
  --sky-50: #eef8ff;
  --sky-100: #d8efff;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --shadow-soft: 0 18px 45px rgba(29, 25, 21, 0.12);
  --shadow-card: 0 10px 24px rgba(29, 25, 21, 0.1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--warm-50);
  color: var(--warm-900);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 28px rgba(29, 25, 21, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 64px;
  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-text {
  font-size: 21px;
  color: var(--warm-900);
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--sky-600), var(--amber-500));
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.25);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
}

.nav-link,
.mobile-nav-link {
  color: var(--warm-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--sky-600);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  border: 0;
  border-radius: 12px;
  background: var(--warm-100);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--warm-800);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--warm-100);
  padding: 14px 24px 20px;
  background: #fff;
}

.mobile-nav.is-open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--warm-900);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(29, 25, 21, 0.92), rgba(29, 25, 21, 0.62) 48%, rgba(29, 25, 21, 0.12));
}

.hero-content {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  color: #fff;
  padding: 90px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--amber-500);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 900;
}

.hero-copy p {
  max-width: 660px;
  margin: 0 0 24px;
  color: #f8efe4;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
}

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

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

.primary-button,
.home-search-box button,
.search-box button {
  background: var(--sky-600);
  color: #fff;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.28);
}

.primary-button:hover,
.home-search-box button:hover,
.search-box button:hover {
  background: var(--sky-700);
  transform: translateY(-1px);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

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

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

.hero-dot.is-active {
  width: 58px;
  background: var(--sky-500);
}

.home-search,
.search-panel,
.category-tiles-section {
  padding: 28px 0;
  background: #fff;
}

.home-search-box,
.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px;
  border-radius: 22px;
  background: var(--warm-50);
  box-shadow: var(--shadow-card);
}

.home-search-box input,
.search-box input {
  min-height: 50px;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 0 18px;
  color: var(--warm-900);
  background: #fff;
}

.section {
  padding: 70px 0;
}

.soft-section {
  background: linear-gradient(135deg, var(--sky-50), var(--warm-50));
}

.warm-section {
  background: var(--warm-100);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.section-heading.with-link {
  justify-content: space-between;
}

.section-heading h2 {
  margin: 0 0 4px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 900;
}

.section-heading p {
  margin: 0;
  color: var(--warm-600);
}

.section-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--sky-600));
}

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

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

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

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

.movie-card {
  min-width: 0;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--warm-100);
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.58));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-frame::after {
  opacity: 1;
}

.movie-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--amber-500);
  font-size: 12px;
  font-weight: 800;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--sky-600);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-body h3 {
  min-height: 48px;
  margin: 0 0 9px;
  color: var(--warm-900);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover h3 {
  color: var(--sky-700);
}

.movie-card-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--warm-600);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  justify-content: space-between;
  color: var(--warm-600);
  font-size: 13px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags a {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--warm-700);
  background: var(--warm-100);
  font-size: 12px;
  font-weight: 700;
}

.category-stack {
  display: grid;
  gap: 38px;
}

.category-preview {
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.category-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.category-preview h3 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 900;
}

.category-preview p {
  margin: 0;
  color: var(--warm-600);
}

.category-preview a,
.category-tile:hover strong {
  color: var(--sky-700);
}

.wide-list {
  display: grid;
  gap: 22px;
}

.movie-card-wide .movie-card-link {
  display: grid;
  grid-template-columns: 230px 1fr;
}

.movie-card-wide .poster-frame {
  aspect-ratio: 4 / 3;
  height: 100%;
}

.movie-card-wide .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 10% 10%, rgba(14, 165, 233, 0.3), transparent 38%),
    linear-gradient(135deg, var(--warm-900), #162f40);
}

.small-hero {
  padding: 72px 0 64px;
}

.page-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 900;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #f6ede2;
  font-size: 18px;
  line-height: 1.8;
}

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

.category-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-radius: 22px;
  background: var(--warm-50);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.category-tile strong {
  font-size: 22px;
  font-weight: 900;
}

.category-tile span {
  color: var(--warm-600);
  line-height: 1.6;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--warm-200);
  border-radius: 999px;
  color: var(--warm-700);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  border-color: var(--sky-600);
  background: var(--sky-600);
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 20px;
  text-align: center;
  color: var(--warm-600);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.empty-state.is-visible {
  display: block;
}

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

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

.rank-item {
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.rank-link {
  display: grid;
  grid-template-columns: 62px 90px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 116px;
  padding: 14px;
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--sky-600));
  font-weight: 900;
}

.rank-link img {
  width: 90px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--warm-100);
}

.rank-content {
  display: grid;
  gap: 6px;
}

.rank-content strong {
  font-size: 18px;
  color: var(--warm-900);
}

.rank-content em {
  color: var(--warm-600);
  font-style: normal;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-content small {
  color: var(--warm-500, #8f7c6a);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.82);
}

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

.detail-top {
  padding: 36px 0 62px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.24), transparent 34%),
    linear-gradient(135deg, var(--warm-900), #102d40);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 34px;
  align-items: center;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover {
  position: absolute;
  inset: 0;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
}

.play-circle {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--sky-600);
  background: rgba(255, 255, 255, 0.94);
  font-size: 30px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.detail-info h1 {
  margin: 18px 0 18px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.15;
  font-weight: 900;
}

.detail-one-line {
  margin: 0 0 22px;
  color: #f5eee6;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags a {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-section {
  padding-top: 54px;
}

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

.content-card {
  padding: 30px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 900;
}

.content-card p {
  margin: 0;
  color: var(--warm-700);
  line-height: 1.9;
  font-size: 16px;
}

.site-footer {
  color: var(--warm-100);
  background: var(--warm-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 52px 0 42px;
}

.footer-brand {
  margin-bottom: 16px;
  color: #fff;
  font-size: 20px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--amber-400);
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  color: var(--warm-300);
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.site-footer a {
  color: var(--warm-300);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px;
  text-align: center;
  color: var(--warm-400);
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(29, 25, 21, 0.9), rgba(29, 25, 21, 0.62));
  }

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

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

  .movie-card-wide .movie-card-link {
    grid-template-columns: 180px 1fr;
  }
}

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

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

  .hero-copy {
    padding: 72px 0 96px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-actions,
  .home-search-box,
  .search-box {
    grid-template-columns: 1fr;
  }

  .hero-actions a,
  .home-search-box button,
  .search-box button {
    width: 100%;
  }

  .section {
    padding: 48px 0;
  }

  .movie-grid,
  .compact-grid,
  .all-grid,
  .category-tiles {
    gap: 14px;
  }

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

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

  .movie-card-wide .movie-card-link,
  .rank-link {
    grid-template-columns: 1fr;
  }

  .movie-card-wide .poster-frame {
    aspect-ratio: 16 / 10;
  }

  .rank-number {
    position: absolute;
    margin: 12px;
    z-index: 2;
  }

  .rank-link {
    position: relative;
  }

  .rank-link img {
    width: 100%;
    height: 180px;
  }

  .content-card {
    padding: 22px;
  }

  .player-shell {
    border-radius: 18px;
  }
}
