:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --orange-50: #fff7ed;
  --orange-700: #c2410c;
  --orange-800: #9a3412;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.14);
  --shadow-soft: 0 10px 28px rgba(120, 53, 15, 0.1);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(135deg, var(--amber-50) 0%, var(--orange-50) 48%, #fefce8 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff7ed;
  background: linear-gradient(90deg, var(--amber-800), var(--orange-700), var(--amber-800));
  box-shadow: 0 10px 28px rgba(120, 53, 15, 0.28);
}

.site-nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  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.03em;
}

.brand {
  font-size: 21px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--amber-900);
  background: linear-gradient(135deg, var(--amber-100), var(--amber-500));
  box-shadow: inset 0 -2px 6px rgba(120, 53, 15, 0.22);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
  justify-content: flex-end;
}

.nav-link {
  color: #ffedd5;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #fef3c7;
  transform: translateY(-1px);
}

.search-form {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(120, 53, 15, 0.34);
  border: 1px solid rgba(253, 230, 138, 0.22);
}

.search-form input {
  width: 190px;
  border: 0;
  outline: 0;
  color: #fff7ed;
  background: transparent;
  padding: 10px 14px;
  transition: width 0.2s ease;
}

.search-form input:focus {
  width: 260px;
}

.search-form input::placeholder {
  color: #fde68a;
}

.search-form button {
  border: 0;
  color: #78350f;
  background: #fef3c7;
  height: 38px;
  min-width: 42px;
  cursor: pointer;
}

.menu-button {
  display: none;
  border: 0;
  color: #fff7ed;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  background: rgba(120, 53, 15, 0.96);
  backdrop-filter: blur(14px);
  padding: 12px 20px 18px;
}

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

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: #ffedd5;
  font-weight: 700;
}

.mobile-search {
  margin-top: 10px;
}

.hero {
  position: relative;
  background: #111827;
}

.hero-stage {
  position: relative;
  height: 520px;
  overflow: hidden;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.58) 47%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  right: 32px;
  bottom: 112px;
  max-width: 780px;
  color: white;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #78350f;
  background: #fef3c7;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.06;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.45);
}

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

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 26px;
  color: white;
  background: var(--amber-600);
  box-shadow: 0 12px 25px rgba(217, 119, 6, 0.32);
}

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

.ghost-button {
  min-height: 46px;
  padding: 0 24px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(253, 230, 138, 0.48);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--amber-500);
}

.hero-search-card {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: -54px auto 0;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search {
  width: 100%;
  background: white;
  border: 1px solid var(--amber-100);
}

.hero-search input {
  width: 100%;
  color: var(--gray-900);
  padding: 14px 18px;
}

.hero-search input:focus {
  width: 100%;
}

.hero-search input::placeholder {
  color: var(--gray-500);
}

.hero-search button {
  height: 50px;
  min-width: 100px;
  color: white;
  background: var(--amber-600);
}

.hero-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-categories a {
  border-radius: 999px;
  color: var(--amber-900);
  background: var(--amber-100);
  padding: 8px 13px;
  font-weight: 800;
  font-size: 13px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-categories a:hover {
  background: var(--amber-200);
  transform: translateY(-2px);
}

.page-stack {
  padding: 72px 0 20px;
  display: grid;
  gap: 64px;
}

.content-section {
  display: grid;
  gap: 24px;
}

.content-section.bg-warm,
.filter-panel,
.detail-block,
.detail-title-card,
.player-card,
.side-panel,
.poster-card,
.rank-sidebar,
.category-tile {
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
}

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

.section-heading h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.section-icon {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--amber-600);
  font-weight: 900;
}

.section-more {
  color: white;
  background: var(--amber-600);
  padding: 10px 18px;
  white-space: nowrap;
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(120, 53, 15, 0.18);
}

.card-image {
  position: relative;
  display: block;
  height: 218px;
  overflow: hidden;
  background: var(--gray-200);
}

.movie-card.small .card-image {
  height: 170px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.05));
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade {
  opacity: 1;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: var(--amber-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-700));
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  min-height: 44px;
  color: var(--gray-900);
  font-size: 17px;
  line-height: 1.35;
}

.card-desc {
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.65;
  min-height: 46px;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 12px;
}

.card-meta span:first-child {
  color: var(--amber-900);
  background: var(--amber-100);
  padding: 5px 8px;
  border-radius: 8px;
  font-weight: 800;
}

.page-hero {
  padding: 72px 0 34px;
  color: white;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.3), transparent 35%), linear-gradient(135deg, var(--amber-900), var(--orange-800));
}

.page-hero.compact {
  padding: 58px 0 42px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber-200);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.12;
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 0;
  color: #ffedd5;
  font-size: 17px;
  line-height: 1.85;
}

.category-grid-wrap {
  padding: 58px 0 10px;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 18px;
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-thumbs img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--gray-200);
}

.category-tile strong {
  align-self: end;
  color: var(--gray-900);
  font-size: 24px;
}

.category-tile > span:last-child {
  color: var(--gray-600);
  line-height: 1.7;
}

.filter-panel {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.filter-search input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  outline: 0;
  padding: 14px 16px;
  color: var(--gray-900);
  background: var(--gray-50);
}

.filter-search input:focus,
.filter-selects select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

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

.filter-selects select {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  outline: 0;
  color: var(--gray-800);
  background: white;
  padding: 11px 12px;
}

.empty-state {
  display: none;
  margin: 0;
  color: var(--gray-600);
  text-align: center;
  padding: 18px;
}

.empty-state.show {
  display: block;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  padding-top: 58px;
}

.rank-sidebar {
  align-self: start;
  position: sticky;
  top: 88px;
  padding: 20px;
}

.rank-sidebar h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.compact-card {
  display: grid;
  grid-template-columns: 30px 64px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.compact-card:last-child {
  border-bottom: 0;
}

.compact-card img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--gray-200);
}

.compact-card strong {
  display: block;
  color: var(--gray-900);
  line-height: 1.45;
}

.compact-card small {
  display: block;
  margin-top: 5px;
  color: var(--gray-500);
}

.side-rank {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: var(--amber-600);
  font-weight: 900;
  font-size: 12px;
}

.detail-page {
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--gray-600);
  font-size: 14px;
  margin-bottom: 22px;
}

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

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

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

.player-card {
  overflow: hidden;
  background: var(--gray-900);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(217, 119, 6, 0.92);
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-start:hover {
  transform: scale(1.06);
}

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

.detail-title-card,
.detail-block {
  padding: 24px;
}

.detail-title-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
}

.detail-meta {
  color: var(--gray-600);
  margin-bottom: 18px;
}

.detail-meta a,
.detail-meta span {
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--gray-100);
  font-size: 13px;
  font-weight: 800;
}

.detail-meta a {
  color: var(--amber-900);
  background: var(--amber-100);
}

.lead-text {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.85;
}

.detail-block h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.detail-block.warm {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.tags-block .tag-list span {
  color: var(--amber-900);
  background: var(--amber-100);
}

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

.detail-side {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 88px;
}

.poster-card {
  padding: 18px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: var(--gray-200);
}

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

.side-panel {
  padding: 18px;
}

.site-footer {
  margin-top: 72px;
  color: #ffedd5;
  background: linear-gradient(90deg, var(--amber-900), var(--orange-800), var(--amber-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-brand {
  font-size: 24px;
  color: #fff7ed;
}

.footer-intro p,
.site-footer a,
.site-footer li {
  color: #fde68a;
}

.footer-intro p {
  max-width: 620px;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fff7ed;
  font-size: 18px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.site-footer a:hover {
  color: white;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(253, 230, 138, 0.25);
  padding: 20px 0 24px;
  color: #fcd34d;
}

.footer-bottom button {
  border: 0;
  color: #fef3c7;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

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

  .desktop-nav {
    gap: 14px;
  }

  .search-form input {
    width: 150px;
  }

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

  .rank-sidebar,
  .detail-side {
    position: static;
  }
}

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

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

  .hero-stage {
    height: 560px;
  }

  .hero-content {
    left: 22px;
    bottom: 128px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-search-card {
    margin-top: -70px;
  }

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

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

  .category-thumbs {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container,
  .site-nav-wrap,
  .hero-search-card,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-content h1 {
    font-size: 34px;
  }

  .hero-content p {
    font-size: 15px;
  }

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

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .page-stack {
    padding-top: 52px;
    gap: 46px;
  }

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

  .card-image {
    height: 230px;
  }

  .detail-title-card,
  .detail-block {
    padding: 20px;
  }
}
