:root {
  --cream-50: #fffef9;
  --cream-100: #faf7ef;
  --cream-200: #f5f1e8;
  --cream-300: #e8dcc8;
  --warm-100: #ffe4e1;
  --warm-300: #ffc4b8;
  --warm-400: #f4a460;
  --warm-500: #e89452;
  --soft-500: #c7b9a6;
  --soft-600: #b8ada0;
  --soft-700: #a8a29e;
  --soft-800: #98908c;
  --soft-900: #887e7a;
  --ink: #34302e;
  --white: #ffffff;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-soft-lg: 0 10px 40px -5px rgba(0, 0, 0, 0.1), 0 20px 25px -5px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(to bottom, var(--cream-50), var(--white), var(--cream-50));
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(to bottom, var(--cream-50), rgba(255, 254, 249, 0));
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--soft-900);
  font-size: 20px;
  font-weight: 700;
}

.site-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cream-300), var(--warm-300));
  border-radius: 999px;
  transition: transform 0.3s ease;
}

.site-logo:hover .site-logo-mark {
  transform: scale(1.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--soft-700);
  font-weight: 600;
}

.nav-links a {
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--warm-400);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--soft-700);
  font-size: 24px;
  cursor: pointer;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--soft-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.04));
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  color: var(--white);
}

.hero-copy {
  width: min(680px, 100%);
  padding-top: 54px;
}

.hero-label,
.small-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  background: var(--warm-400);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.movie-card-tags,
.detail-tags,
.filter-row,
.pagination,
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.detail-tags span,
.movie-card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 11px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font-size: 13px;
}

.hero .hero-button,
.button,
.pagination a,
.pagination span,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  color: var(--white);
  background: var(--warm-400);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.hero .hero-button {
  margin-top: 26px;
  color: var(--warm-400);
  background: var(--white);
}

.hero .hero-button:hover,
.button:hover,
.pagination a:hover,
.search-button:hover {
  transform: translateY(-2px);
  background: var(--warm-500);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.hero .hero-button:hover {
  background: var(--cream-100);
  color: var(--warm-500);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 32px;
  background: var(--white);
}

.section {
  padding: 64px 0;
}

.section-tight {
  padding: 36px 0;
}

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

.section-title h1,
.section-title h2 {
  margin: 0;
  color: var(--soft-900);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.2;
}

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

.filter-panel,
.soft-panel,
.search-panel,
.content-card {
  border: 1px solid rgba(232, 220, 200, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.filter-panel {
  padding: 24px;
  margin-bottom: 30px;
}

.filter-group {
  margin-top: 18px;
}

.filter-group:first-child {
  margin-top: 0;
}

.filter-group h3 {
  margin: 0 0 12px;
  color: var(--soft-700);
  font-size: 14px;
}

.filter-button,
.category-chip {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  color: var(--soft-700);
  background: var(--cream-100);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.filter-button:hover,
.filter-button.is-active,
.category-chip:hover {
  color: var(--white);
  background: var(--warm-400);
  box-shadow: var(--shadow-soft);
}

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

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

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

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

.movie-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--cream-200);
}

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

.movie-card:hover img,
.horizontal-card:hover img {
  transform: scale(1.08);
}

.movie-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  transition: opacity 0.25s ease;
}

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

.movie-duration,
.movie-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
}

.movie-duration {
  right: 10px;
  bottom: 10px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.7);
}

.movie-badge {
  left: 10px;
  top: 10px;
  color: var(--soft-800);
  background: rgba(232, 220, 200, 0.9);
}

.movie-play-mark {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: var(--warm-400);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-body h3,
.horizontal-card h3 {
  margin: 0 0 8px;
  color: var(--soft-900);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p,
.horizontal-card p {
  margin: 0 0 14px;
  color: var(--soft-600);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-tags span {
  color: var(--soft-700);
  background: var(--cream-100);
}

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: var(--soft-500);
  font-size: 13px;
}

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

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

.horizontal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft-lg);
}

.horizontal-card-link {
  display: flex;
  gap: 16px;
  height: 100%;
}

.horizontal-card-media {
  position: relative;
  width: 190px;
  min-height: 140px;
  overflow: hidden;
  background: var(--cream-200);
  flex-shrink: 0;
}

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

.horizontal-card-body {
  padding: 16px 16px 16px 0;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  padding: 22px;
  border-radius: 22px;
  color: var(--soft-800);
  background: linear-gradient(135deg, var(--white), var(--cream-100));
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft-lg);
}

.category-card h2,
.category-card h3 {
  margin: 0;
  color: var(--soft-900);
}

.category-card p {
  margin: 10px 0 0;
  color: var(--soft-600);
}

.page-hero {
  padding: 132px 0 46px;
  background: linear-gradient(135deg, var(--cream-50), var(--cream-200));
}

.page-hero h1 {
  margin: 0;
  color: var(--soft-900);
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.2;
}

.page-hero p {
  width: min(780px, 100%);
  margin: 14px 0 0;
  color: var(--soft-600);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--soft-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--warm-500);
}

.detail-hero {
  padding: 124px 0 42px;
  background: linear-gradient(135deg, var(--cream-50), var(--cream-200));
}

.detail-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  border-radius: 26px;
  overflow: hidden;
  background: var(--cream-200);
  box-shadow: var(--shadow-soft-lg);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 12px;
  color: var(--soft-900);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.16;
}

.detail-info p {
  margin: 14px 0;
  color: var(--soft-600);
  font-size: 18px;
}

.detail-tags span {
  color: var(--soft-700);
  background: var(--white);
}

.player-wrap {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #111;
  box-shadow: var(--shadow-soft-lg);
}

.player-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  border: 0;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  padding-left: 6px;
  color: var(--warm-400);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  font-size: 34px;
  transition: transform 0.25s ease;
}

.player-overlay:hover .play-circle {
  transform: scale(1.08);
}

.player-status {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
}

.content-card {
  padding: 28px;
  margin-bottom: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  color: var(--soft-900);
  font-size: 26px;
}

.content-card p {
  margin: 0 0 14px;
  color: var(--soft-700);
}

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

.rank-item {
  counter-increment: rank;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-item::before {
  content: counter(rank);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--white);
  background: var(--warm-400);
  font-weight: 900;
}

.rank-item h2,
.rank-item h3 {
  margin: 0;
  color: var(--soft-900);
  font-size: 18px;
}

.rank-item p {
  margin: 4px 0 0;
  color: var(--soft-600);
  font-size: 14px;
}

.search-panel {
  padding: 24px;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 160px auto;
  gap: 12px;
}

.search-form input,
.search-form select {
  width: 100%;
  border: 1px solid var(--cream-300);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--soft-800);
  background: var(--white);
  outline: none;
}

.search-form input:focus,
.search-form select:focus {
  border-color: var(--warm-400);
  box-shadow: 0 0 0 4px rgba(244, 164, 96, 0.16);
}

.search-results-info {
  margin: 18px 0 0;
  color: var(--soft-600);
}

.pagination {
  justify-content: center;
  margin-top: 34px;
}

.pagination span {
  color: var(--soft-500);
  background: var(--cream-100);
  cursor: default;
}

.pagination .current {
  color: var(--white);
  background: var(--warm-400);
}

.site-footer {
  margin-top: 54px;
  padding: 48px 0;
  border-top: 1px solid var(--cream-300);
  background: linear-gradient(to bottom, var(--cream-100), var(--cream-200));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--soft-900);
  font-size: 18px;
}

.site-footer p,
.site-footer a {
  display: block;
  margin: 0 0 8px;
  color: var(--soft-600);
  font-size: 14px;
}

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

.footer-note {
  color: var(--warm-500) !important;
  font-weight: 700;
}

.hidden-by-filter,
.search-hidden {
  display: none !important;
}

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

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--cream-300);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft-lg);
  }

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

  .nav-links a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-links a.active,
  .nav-links a:hover {
    background: var(--cream-100);
  }

  .hero {
    height: 620px;
  }

  .hero-copy {
    padding-top: 70px;
  }

  .hero-arrow {
    display: none;
  }

  .section-title {
    display: block;
  }

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

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

  .horizontal-card-link {
    display: block;
  }

  .horizontal-card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

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

  .search-form {
    grid-template-columns: 1fr;
  }

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

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

  .site-logo {
    font-size: 18px;
  }

  .hero {
    height: 590px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

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

  .page-hero,
  .detail-hero {
    padding-top: 110px;
  }

  .rank-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-item > span {
    grid-column: 2;
  }

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