:root {
  --paper-50: #fafaf9;
  --paper-100: #f5f5f4;
  --paper-200: #e7e5e4;
  --ink-400: #888888;
  --ink-500: #6d6d6d;
  --ink-600: #5d5d5d;
  --ink-700: #4f4f4f;
  --ink-900: #3d3d3d;
  --primary-50: #f0f9f4;
  --primary-100: #dcf2e4;
  --primary-200: #bce5cd;
  --primary-600: #267f56;
  --primary-700: #1f6546;
  --accent-50: #fef9ee;
  --accent-100: #fcefd0;
  --accent-200: #f8dc9e;
  --accent-600: #cf6913;
  --accent-700: #ac4a12;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(31, 44, 38, 0.12);
  --shadow-card: 0 10px 30px rgba(31, 44, 38, 0.10);
  --radius-xl: 18px;
  --radius-2xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--primary-100);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(38, 127, 86, 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: var(--white);
  font-size: 15px;
  box-shadow: 0 10px 24px rgba(38, 127, 86, 0.28);
}

.brand-text {
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 23px;
  font-weight: 700;
  color: var(--ink-900);
}

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

.desktop-nav a {
  color: var(--ink-700);
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--primary-700);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(330px, 34vw);
}

.header-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid var(--primary-100);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-900);
  padding: 10px 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.primary-button,
.secondary-button,
.play-button,
.filter-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.primary-button,
.play-button {
  background: var(--primary-600);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(38, 127, 86, 0.22);
}

.header-search button {
  padding: 10px 16px;
  white-space: nowrap;
}

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

.secondary-button {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.menu-button {
  display: none;
  border: 0;
  background: var(--primary-50);
  color: var(--primary-700);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  color: var(--ink-700);
  font-weight: 700;
  border-radius: 12px;
}

.mobile-nav a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

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

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.58);
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.16));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 40px;
  color: var(--white);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-meta {
  margin-bottom: 18px;
}

.hero-meta span,
.detail-meta span,
.detail-meta a,
.card-meta span,
.card-meta a,
.rank-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.card-meta span,
.card-meta a,
.rank-meta span {
  background: var(--primary-50);
  color: var(--primary-700);
}

.detail-meta span,
.detail-meta a {
  background: var(--primary-50);
  color: var(--primary-700);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
}

.hero-poster-stack {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-poster {
  width: min(330px, 76vw);
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster img,
.poster-link img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.hero-arrows button,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrows button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
}

.hero-arrows button:hover,
.hero-dot:hover,
.hero-dot.is-active {
  background: var(--primary-600);
  transform: translateY(-1px);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 2px;
}

.hero-dot {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 190px;
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  white-space: nowrap;
}

.hero-dot img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

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

.main-spaced {
  padding: 42px 0 72px;
}

.section-block {
  margin: 46px 0;
}

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

.section-heading h2,
.page-title h1,
.detail-copy h1,
.detail-section h2 {
  margin: 0;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  color: var(--ink-900);
  line-height: 1.18;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading p,
.page-title p,
.category-desc,
.detail-copy p,
.detail-section p {
  color: var(--ink-600);
}

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

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

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

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

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

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

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

.rating {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(207, 105, 19, 0.92);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--ink-900);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--primary-700);
}

.card-meta {
  margin: 10px 0;
}

.card-meta span,
.card-meta a {
  font-size: 12px;
  padding: 3px 8px;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--paper-100);
  color: var(--ink-500);
  font-size: 12px;
}

.featured-panel,
.category-panel,
.search-panel,
.rank-list,
.detail-panel,
.player-panel {
  border-radius: var(--radius-2xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.featured-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.45fr) minmax(0, 1fr);
  gap: 28px;
  padding: 26px;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.featured-panel .poster-link {
  border-radius: 22px;
}

.featured-content h2 {
  margin: 0 0 12px;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: clamp(30px, 4vw, 48px);
}

.featured-content p {
  color: var(--ink-600);
}

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

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-pills a,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 15px;
  background: var(--white);
  color: var(--ink-700);
  font-weight: 800;
}

.category-pills a:hover,
.filter-button:hover,
.filter-button.is-active {
  background: var(--primary-600);
  color: var(--white);
}

.page-hero {
  margin: 36px 0 28px;
  padding: clamp(30px, 6vw, 62px);
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.page-title h1 {
  color: var(--white);
  font-size: clamp(34px, 5vw, 58px);
}

.page-title p {
  max-width: 820px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.category-card {
  display: block;
  min-height: 184px;
  padding: 24px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card h2 {
  margin: 0 0 10px;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  color: var(--ink-900);
}

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

.search-panel {
  margin-bottom: 28px;
  padding: 22px;
}

.search-fields {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
}

.no-results {
  display: none;
  padding: 36px;
  border-radius: var(--radius-xl);
  background: var(--white);
  color: var(--ink-600);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.no-results.is-visible {
  display: block;
}

.rank-list {
  overflow: hidden;
}

.rank-item {
  display: grid;
  grid-template-columns: 78px 112px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--paper-200);
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-number {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-600), var(--accent-700));
  color: var(--white);
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 24px;
  font-weight: 800;
}

.rank-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: var(--primary-50);
}

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

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

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

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto;
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
  background: var(--primary-50);
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-copy .lead {
  font-size: 19px;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-500);
  font-size: 14px;
}

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

.player-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 42px;
  overflow: hidden;
  background: var(--ink-900);
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111111;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  background: #111111;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.28));
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.play-button {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 30px;
}

.player-start h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  display: none;
  max-width: calc(100% - 36px);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(207, 105, 19, 0.92);
  color: var(--white);
  font-weight: 700;
}

.player-message.is-visible {
  display: block;
}

.player-loading {
  position: absolute;
  inset: auto 18px 18px auto;
  z-index: 4;
  display: none;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  backdrop-filter: blur(10px);
}

.player-loading.is-visible {
  display: block;
}

.detail-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 42px;
  padding: clamp(24px, 4vw, 40px);
}

.detail-section {
  margin-bottom: 30px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h2 {
  margin-bottom: 12px;
  font-size: 28px;
}

.detail-section p {
  margin: 0;
  font-size: 17px;
}

.site-footer {
  margin-top: 70px;
  background: var(--ink-900);
  color: var(--paper-200);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 26px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--paper-200);
}

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

.footer-links a {
  color: var(--paper-200);
}

.footer-links a:hover {
  color: var(--white);
}

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

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .hero-poster-stack {
    display: none;
  }

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

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

  .header-inner {
    justify-content: space-between;
  }

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

  .hero {
    height: 78vh;
  }

  .hero-controls {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .hero-dots {
    justify-content: flex-start;
  }

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

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

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

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

  .rank-item .primary-button {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .movie-grid,
  .movie-grid.large,
  .category-list {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

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

  .footer-inner {
    flex-direction: column;
  }

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

  .hero-dot span {
    display: none;
  }

  .hero-dot {
    padding-right: 6px;
  }
}
