:root {
  --primary-50: #fef8f2;
  --primary-100: #fdebd9;
  --primary-400: #f29d5b;
  --primary-500: #ee7f38;
  --primary-600: #e0642d;
  --accent-50: #fefce8;
  --accent-500: #eab308;
  --secondary-50: #f5f5f4;
  --secondary-100: #e7e6e3;
  --secondary-500: #736d5f;
  --secondary-700: #4d4944;
  --secondary-800: #433f3c;
  --warm-50: #fdf8f6;
  --warm-100: #f2e8e5;
  --warm-200: #eaddd7;
  --warm-300: #d7c0b7;
  --text: #2d2926;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(67, 63, 60, 0.12);
  --shadow-soft: 0 10px 30px rgba(67, 63, 60, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--warm-50);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(234, 221, 215, 0.8);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  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: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 8px 20px rgba(238, 127, 56, 0.32);
  font-size: 14px;
}

.brand-text {
  font-size: 21px;
  color: var(--secondary-800);
}

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--primary-500);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: var(--warm-100);
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 9px;
  background: var(--secondary-700);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 18px;
  border-top: 1px solid var(--warm-200);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
  background: var(--warm-100);
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-400) 46%, var(--accent-500));
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  filter: blur(8px);
}

.hero::before {
  top: -160px;
  right: -120px;
}

.hero::after {
  bottom: -210px;
  left: -150px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 480px);
  align-items: center;
  gap: 42px;
  padding: 70px 0;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  font-size: 14px;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero-copy p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: var(--white);
  color: var(--primary-600);
  box-shadow: 0 12px 26px rgba(67, 63, 60, 0.16);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.38);
}

.btn-solid {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 12px 24px rgba(238, 127, 56, 0.26);
}

.hero-slider {
  position: relative;
}

.hero-slide {
  display: none;
  overflow: hidden;
  border-radius: 24px;
  background: var(--secondary-800);
  box-shadow: 0 28px 70px rgba(67, 63, 60, 0.32);
}

.hero-slide.active {
  display: block;
}

.hero-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
}

.hero-card-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 26px;
}

.hero-card-copy strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.2;
}

.hero-card-copy span {
  display: block;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.hero-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

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

.hero-dot.active {
  width: 28px;
  background: var(--white);
}

.page-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

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

.section {
  padding: 58px 0;
}

.section-white {
  background: var(--white);
}

.section-soft {
  background: linear-gradient(90deg, var(--warm-100), var(--primary-50));
}

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

.section-title h2 {
  margin: 0;
  color: var(--secondary-800);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--secondary-500);
  line-height: 1.7;
}

.section-title > span {
  flex: 1;
  height: 4px;
  min-width: 80px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-500), transparent);
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--secondary-100);
}

.poster-link img,
.compact-cover img,
.category-tile img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.compact-card:hover img,
.category-tile:hover img,
.detail-poster:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.56), transparent 55%);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-500);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  border-radius: 10px;
  color: var(--white);
  background: rgba(238, 127, 56, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.movie-body {
  padding: 18px;
}

.movie-body h2 {
  margin: 0 0 10px;
  color: var(--secondary-800);
  font-size: 18px;
  line-height: 1.35;
}

.movie-body h2 a:hover {
  color: var(--primary-500);
}

.movie-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--secondary-500);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.movie-meta {
  margin-bottom: 12px;
  color: var(--secondary-500);
  font-size: 12px;
}

.movie-meta span,
.tag-row span,
.detail-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--warm-100);
  color: var(--secondary-700);
  font-size: 12px;
  font-weight: 700;
}

.tag-row span {
  background: var(--primary-50);
  color: var(--primary-600);
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 270px;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 2px 16px;
  scroll-snap-type: x proximity;
}

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

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

.compact-card {
  display: flex;
  gap: 14px;
  overflow: hidden;
  padding: 10px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.compact-cover {
  position: relative;
  flex: 0 0 132px;
  height: 82px;
  overflow: hidden;
  border-radius: 13px;
  background: var(--secondary-100);
}

.compact-cover::after {
  content: "▶";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-500);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.compact-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.compact-info strong {
  color: var(--secondary-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-info em {
  color: var(--secondary-500);
  font-size: 13px;
  font-style: normal;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--secondary-800);
  box-shadow: var(--shadow-soft);
}

.category-tile img {
  position: absolute;
  inset: 0;
}

.category-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
}

.category-tile-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px;
  color: var(--white);
}

.category-tile-content strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-tile-content em {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  line-height: 1.6;
}

.search-panel {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--warm-200);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.search-grid input,
.search-grid select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--warm-200);
  border-radius: 13px;
  background: var(--warm-50);
  color: var(--secondary-800);
  outline: none;
}

.search-grid input:focus,
.search-grid select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(238, 127, 56, 0.13);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--secondary-700);
  background: var(--warm-100);
  cursor: pointer;
  font-weight: 800;
}

.filter-tabs button.active,
.filter-tabs button:hover {
  color: var(--white);
  background: var(--primary-500);
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 20px;
  color: var(--secondary-500);
  text-align: center;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 78px 190px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.rank-cover {
  height: 112px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--secondary-100);
}

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

.rank-info h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--secondary-800);
}

.rank-info p {
  margin: 0 0 12px;
  color: var(--secondary-500);
  line-height: 1.7;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: var(--secondary-500);
  font-size: 14px;
}

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

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

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.1);
}

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

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.22));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: var(--primary-500);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
  cursor: pointer;
  font-size: 30px;
}

.player-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 24px;
  z-index: 3;
  color: var(--white);
}

.player-caption strong {
  display: block;
  margin-bottom: 6px;
  font-size: 25px;
}

.player-caption span {
  color: rgba(255, 255, 255, 0.84);
}

.player-card.is-playing .player-cover,
.player-card.is-playing .player-button,
.player-card.is-playing .player-caption {
  display: none;
}

.detail-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 16px;
  color: var(--secondary-800);
  font-size: clamp(30px, 4vw, 45px);
  line-height: 1.18;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.detail-tags span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary-600);
  background: var(--primary-50);
  font-size: 13px;
  font-weight: 800;
}

.detail-card h2,
.side-card h2 {
  margin: 24px 0 12px;
  color: var(--secondary-800);
  font-size: 24px;
}

.detail-card p {
  color: var(--secondary-700);
  line-height: 1.9;
  font-size: 17px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
  background: var(--secondary-100);
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  margin-top: 0;
}

.side-card .compact-list {
  grid-template-columns: 1fr;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}

.pagination-links a {
  flex: 1 1 220px;
  padding: 14px 16px;
  border-radius: 15px;
  background: var(--warm-100);
  color: var(--secondary-700);
  font-weight: 800;
}

.pagination-links a:hover {
  color: var(--white);
  background: var(--primary-500);
}

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

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

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

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

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

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

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

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

  .rank-card {
    grid-template-columns: 54px 120px minmax(0, 1fr);
  }

  .rank-card .btn {
    grid-column: 2 / -1;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .mobile-nav,
  .hero-inner,
  .container,
  .page-hero-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero-inner,
  .page-hero-inner {
    padding: 42px 0;
  }

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

  .hero-card-copy {
    padding: 20px;
  }

  .hero-card-copy strong {
    font-size: 23px;
  }

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

  .rank-number {
    text-align: left;
  }

  .rank-cover {
    height: 180px;
  }

  .player-button {
    width: 66px;
    height: 66px;
  }

  .player-caption {
    left: 18px;
    right: 18px;
    bottom: 16px;
  }
}
