:root {
  --paper-50: #faf9f7;
  --paper-100: #f5f2ee;
  --paper-200: #e7e5e4;
  --paper-300: #d6d3d1;
  --paper-500: #78716c;
  --ink-400: #888888;
  --ink-500: #6d6d6d;
  --ink-600: #5d5d5d;
  --ink-700: #4f4f4f;
  --ink-900: #3d3d3d;
  --primary-50: #f0f9f4;
  --primary-100: #dcf2e4;
  --primary-400: #5ab889;
  --primary-600: #267f56;
  --primary-700: #1f6546;
  --accent-50: #fff8e8;
  --accent-100: #fcefD0;
  --accent-200: #f8df9b;
  --accent-400: #f0a838;
  --accent-600: #cf6913;
  --accent-700: #ac4a12;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.14);
  --radius: 18px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper-50);
  color: var(--ink-900);
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 249, 247, 0.88);
  border-bottom: 1px solid rgba(214, 211, 209, 0.75);
  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-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-900);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

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

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

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-700);
  background: var(--primary-100);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink-900);
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
  background: var(--ink-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 1s ease, visibility 1s ease, transform 5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-overlay,
.detail-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.06));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 680px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 800;
}

.hero-subtitle {
  margin: 18px 0 10px;
  font-size: clamp(20px, 3vw, 30px);
  color: var(--paper-200);
  font-weight: 300;
}

.hero-description {
  max-width: 620px;
  margin: 0 0 24px;
  color: var(--paper-300);
  font-size: 18px;
}

.hero-feature-card {
  width: min(620px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}

.hero-feature-card h2 {
  margin: 0 0 10px;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 28px;
}

.hero-feature-card p {
  margin: 0 0 18px;
  color: var(--paper-200);
}

.primary-button,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-600);
  color: #ffffff;
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

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

.hero-arrow-left {
  left: 24px;
}

.hero-arrow-right {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: #ffffff;
}

.page-stack {
  display: grid;
  gap: 64px;
  padding-block: 64px;
}

.page-top {
  padding-top: 42px;
}

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

.section-heading h2 {
  margin: 0 0 8px;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
}

.section-heading p,
.page-hero p,
.quick-search-card p,
.featured-copy p,
.movie-card-body p,
.story-card p,
.footer-inner p {
  margin: 0;
  color: var(--ink-600);
}

.section-more {
  flex: 0 0 auto;
  color: var(--primary-700);
  font-weight: 800;
}

.quick-search-card,
.category-panel,
.page-hero,
.story-card,
.filter-panel {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.quick-search-card {
  padding: 34px;
  background: linear-gradient(135deg, #ffffff, var(--primary-50), var(--accent-50));
}

.quick-search-card h2 {
  margin: 0 0 10px;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: clamp(28px, 5vw, 46px);
}

.home-search {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--paper-300);
  border-radius: 12px;
  background: #ffffff;
  padding: 0 14px;
  color: var(--ink-900);
  outline: none;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 4px rgba(38, 127, 86, 0.12);
}

.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 30px;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.featured-media {
  position: relative;
  min-height: 360px;
  overflow: hidden;
}

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

.featured-card:hover .featured-media img {
  transform: scale(1.06);
}

.featured-play,
.play-pill {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(38, 127, 86, 0.92);
  color: #ffffff;
  font-weight: 800;
  box-shadow: var(--shadow-md);
}

.featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 34px 34px 34px 0;
}

.featured-copy h2 {
  margin: 0;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: clamp(28px, 4vw, 42px);
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card.is-hidden,
.ranking-item.is-hidden {
  display: none;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

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

.movie-poster {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-200);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.72));
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-600);
  color: #ffffff;
  font-weight: 900;
}

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

.movie-meta {
  margin-bottom: 8px;
  color: var(--primary-700);
  font-size: 13px;
  font-weight: 800;
}

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-copy .tag-row span {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(6px);
}

.category-panel {
  padding: 34px;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.category-chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-700);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, color 0.2s ease;
}

.category-chips a:hover {
  background: var(--primary-600);
  color: #ffffff;
}

.category-chips span {
  color: var(--accent-700);
}

.ranking-list {
  display: grid;
  gap: 12px;
}

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

.ranking-link {
  display: grid;
  grid-template-columns: 52px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 10px 16px 10px 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.ranking-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  color: #ffffff;
  font-weight: 900;
}

.ranking-link img {
  width: 96px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-copy {
  min-width: 0;
}

.ranking-copy strong,
.ranking-copy em {
  display: block;
}

.ranking-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.ranking-copy em {
  color: var(--ink-500);
  font-style: normal;
  font-size: 14px;
}

.heat {
  color: var(--accent-700);
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 40px;
}

.soft-hero {
  background: linear-gradient(135deg, #ffffff, var(--primary-50), var(--accent-50));
}

.rank-hero {
  background: linear-gradient(135deg, var(--ink-900), var(--primary-700));
  color: #ffffff;
}

.rank-hero p {
  color: var(--paper-200);
}

.filter-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 800;
}

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

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

.category-card a {
  position: relative;
  display: block;
  min-height: 280px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.82));
}

.category-count {
  position: absolute;
  right: 16px;
  top: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.category-card div {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  color: #ffffff;
}

.category-card h2 {
  margin: 0 0 8px;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 28px;
}

.category-card p {
  margin: 0;
  color: var(--paper-200);
}

.empty-state {
  display: none;
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--ink-600);
  text-align: center;
  box-shadow: var(--shadow-md);
}

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

.movie-detail {
  background: var(--paper-50);
}

.detail-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-block: 46px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 26px;
  color: var(--paper-200);
  font-size: 14px;
}

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

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

.detail-cover {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg);
}

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

.detail-copy {
  max-width: 760px;
}

.detail-one-line {
  margin: 18px 0 6px;
  color: var(--paper-200);
  font-size: 20px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 24px 0;
  list-style: none;
}

.detail-meta li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.detail-meta span {
  color: var(--paper-300);
}

.detail-meta strong {
  text-align: right;
}

.detail-content {
  padding-top: 64px;
}

.player-section {
  scroll-margin-top: 90px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow-lg);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.72));
  color: #ffffff;
  text-align: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(38, 127, 86, 0.92);
  color: #ffffff;
  font-size: 38px;
  line-height: 1;
  box-shadow: var(--shadow-lg);
}

.player-overlay strong {
  max-width: 88%;
  font-size: clamp(22px, 4vw, 38px);
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
}

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

.story-card {
  padding: 30px;
}

.story-card h2 {
  margin: 0 0 14px;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 28px;
}

.site-footer {
  margin-top: 40px;
  background: var(--ink-900);
  color: #ffffff;
}

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

.footer-logo {
  margin-bottom: 12px;
  color: #ffffff;
}

.footer-inner p {
  color: var(--paper-300);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--paper-200);
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

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

  .compact-grid,
  .category-grid,
  .home-ranking,
  .story-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .featured-copy {
    padding: 0 30px 34px;
  }

  .detail-cover {
    max-width: 320px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .brand {
    font-size: 22px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .mobile-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-lg);
  }

  body.nav-open .nav {
    display: flex;
  }

  .nav-link {
    border-radius: 12px;
  }

  .hero-carousel {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content {
    padding-inline: 10px;
  }

  .hero-feature-card {
    padding: 18px;
  }

  .hero-arrow {
    top: auto;
    bottom: 24px;
    width: 42px;
    height: 42px;
    font-size: 30px;
  }

  .hero-arrow-left {
    left: 18px;
  }

  .hero-arrow-right {
    right: 18px;
  }

  .hero-dots {
    bottom: 36px;
  }

  .page-stack {
    gap: 42px;
    padding-block: 42px;
  }

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

  .home-search,
  .filter-selects,
  .footer-inner,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .home-search {
    display: grid;
  }

  .movie-grid,
  .listing-grid,
  .compact-grid,
  .category-grid,
  .home-ranking,
  .story-panel {
    grid-template-columns: 1fr;
  }

  .category-panel,
  .quick-search-card,
  .page-hero,
  .story-card {
    padding: 24px;
  }

  .ranking-link {
    grid-template-columns: 38px 82px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-number {
    width: 34px;
    height: 34px;
  }

  .ranking-link img {
    width: 82px;
    height: 56px;
  }

  .heat {
    grid-column: 3;
    justify-self: start;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-copy h1 {
    font-size: 38px;
  }

  .detail-one-line {
    font-size: 17px;
  }

  .play-circle {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}
