:root {
  color-scheme: light;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-900: #78350f;
  --rose-50: #fff1f2;
  --rose-700: #be123c;
  --blue-50: #eff6ff;
  --blue-700: #1d4ed8;
  --green-50: #f0fdf4;
  --green-700: #15803d;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 8px 18px rgba(17, 24, 39, 0.08);
  --radius: 18px;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, var(--amber-50) 100%);
  color: var(--gray-900);
}

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--amber-50), #ffffff, var(--amber-50));
  border-bottom: 1px solid var(--amber-200);
  box-shadow: 0 2px 12px rgba(120, 53, 15, 0.08);
}

.site-nav,
.footer-inner,
.page-shell,
.hero-content,
.intro-search,
.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-nav {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav-links,
.hero-actions,
.hero-meta,
.movie-meta,
.movie-tags,
.detail-meta,
.detail-tags,
.footer-links,
.breadcrumb,
.section-head,
.filter-bar {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--amber-900);
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-700));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(180, 83, 9, 0.25);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 20px;
}

.brand-copy small {
  color: var(--amber-600);
  font-size: 12px;
}

.nav-links {
  gap: 22px;
}

.nav-link {
  color: var(--gray-700);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-700);
}

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

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--amber-900);
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), #ffedd5);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
  background: var(--amber-600);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 800;
}

.hero-content h2 + p {
  margin-top: 0;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #f3f4f6;
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta,
.hero-tags,
.hero-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.hero-tags span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
}

.hero-tags {
  display: flex;
  margin: 14px 0 8px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  background: var(--amber-600);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.25);
}

.primary-button:hover {
  background: var(--amber-700);
  transform: translateY(-2px);
}

.primary-button.full {
  width: 100%;
  margin-top: 16px;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.35);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.intro-search {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: var(--radius);
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.intro-search h2,
.section-head h2,
.page-title h1,
.detail-card h1 {
  margin: 0;
  font-weight: 800;
  color: var(--gray-900);
}

.intro-search p,
.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.content-section {
  margin-top: 48px;
  padding: 32px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.content-section.flat {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.content-section.tone-amber {
  background: linear-gradient(135deg, #ffffff, var(--amber-50));
}

.content-section.tone-blue {
  background: linear-gradient(135deg, #ffffff, var(--blue-50));
}

.content-section.tone-green {
  background: linear-gradient(135deg, #ffffff, var(--green-50));
}

.content-section.tone-rose {
  background: linear-gradient(135deg, #ffffff, var(--rose-50));
}

.section-head {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-more {
  color: var(--amber-700);
  padding: 8px 0;
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  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);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--gray-100);
}

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

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

.duration,
.rank-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 8px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: var(--amber-600);
}

.movie-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-title {
  color: var(--gray-900);
  font-size: 17px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-desc {
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta,
.movie-tags,
.detail-meta,
.detail-tags {
  flex-wrap: wrap;
  gap: 7px;
}

.movie-meta span,
.movie-tags span,
.detail-meta span,
.detail-tags a {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--amber-50);
  color: var(--amber-700);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-decoration: none;
}

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

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

.category-tile {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 16px;
  border-radius: 20px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-cover {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 1 / 1;
  background: var(--gray-100);
}

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

.category-tile h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-tile h2 a,
.category-samples a {
  color: var(--gray-900);
  text-decoration: none;
}

.category-tile p {
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.6;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.category-samples a {
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 12px;
}

.rank-list,
.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.rank-list a,
.ranking-item a,
.slim-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.rank-list li,
.ranking-item {
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-list a {
  padding: 12px;
}

.rank-number,
.ranking-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--amber-600);
  color: #ffffff;
  font-weight: 800;
}

.rank-list img {
  width: 80px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-list strong,
.ranking-body strong,
.slim-link strong {
  display: block;
  color: var(--gray-900);
}

.rank-list small,
.slim-link small {
  color: var(--gray-500);
}

.page-shell {
  padding: 36px 0 64px;
}

.page-title {
  margin-bottom: 28px;
  border-radius: 24px;
  padding: 34px;
  background: linear-gradient(135deg, #ffffff, var(--amber-50));
  box-shadow: var(--shadow-soft);
}

.page-title.compact {
  padding: 28px;
}

.page-title span {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--amber-100);
  color: var(--amber-700);
  font-size: 13px;
  font-weight: 800;
}

.page-title h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.breadcrumb {
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-700);
  text-decoration: none;
}

.filter-bar {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-bar label {
  display: flex;
  min-width: 160px;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 700;
}

.filter-search {
  min-width: min(420px, 100%);
  flex: 2;
}

.filter-bar input,
.filter-bar select {
  height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 0 12px;
  background: var(--gray-50);
  color: var(--gray-900);
  outline: none;
}

.empty-state {
  margin: 18px 0;
  border-radius: 14px;
  padding: 18px;
  background: #ffffff;
  color: var(--gray-600);
  text-align: center;
}

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

.ranking-item a {
  padding: 14px;
}

.ranking-item img {
  width: 128px;
  height: 86px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-body {
  min-width: 0;
  flex: 1;
}

.ranking-body em {
  display: block;
  margin: 6px 0 10px;
  color: var(--gray-600);
  font-size: 14px;
  font-style: normal;
  line-height: 1.5;
}

.ranking-score {
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--amber-50);
  color: var(--amber-700);
  font-weight: 800;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.detail-card,
.poster-card,
.side-card {
  border-radius: 22px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 9;
  background: #111827;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--amber-600);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.35);
  font-size: 34px;
  text-indent: 4px;
}

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

.player-error {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.74);
  color: #ffffff;
  transform: translate(-50%, -50%);
}

.detail-card h1 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4vw, 42px);
}

.detail-card h2,
.side-card h2 {
  margin: 26px 0 12px;
  color: var(--gray-900);
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.85;
}

.lead-text {
  margin-top: 18px !important;
  font-weight: 700;
}

.detail-tags {
  margin-top: 22px;
}

.poster-card img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.detail-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

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

.slim-link img {
  width: 96px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
}

.related-section {
  margin-top: 32px;
}

.site-footer {
  margin-top: 48px;
  background: #ffffff;
  border-top: 1px solid var(--amber-100);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0;
}

.footer-brand {
  color: var(--amber-800, #92400e);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.footer-inner p {
  max-width: 540px;
  margin: 0;
  color: var(--gray-600);
}

.footer-links {
  gap: 14px;
}

.footer-links a {
  color: var(--gray-700);
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

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

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

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

@media (max-width: 760px) {
  .site-nav {
    height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 18px;
    padding: 10px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

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

  .nav-link:hover,
  .nav-link.active {
    background: var(--amber-50);
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    width: calc(100% - 44px);
  }

  .hero-content p {
    font-size: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-arrow {
    display: none;
  }

  .intro-search,
  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .category-grid.wide,
  .rank-list,
  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .content-section,
  .page-title {
    padding: 22px;
  }

  .ranking-item a {
    align-items: flex-start;
  }

  .ranking-item img {
    width: 96px;
    height: 72px;
  }

  .ranking-score {
    display: none;
  }
}

@media (max-width: 480px) {
  .site-nav,
  .footer-inner,
  .page-shell,
  .hero-content,
  .intro-search,
  .content-section {
    width: min(100% - 22px, 1180px);
  }

  .brand-copy small {
    display: none;
  }

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

  .hero-meta span,
  .hero-tags span {
    font-size: 12px;
  }

  .filter-bar label {
    min-width: 100%;
  }
}
