:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 50px rgba(31, 41, 55, 0.14);
  --shadow-card: 0 10px 30px rgba(146, 64, 14, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
  box-shadow: 0 10px 30px rgba(146, 64, 14, 0.10);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--amber-600);
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.33);
}

.brand-text {
  font-size: 24px;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
  -webkit-background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  font-weight: 700;
  color: var(--gray-700);
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: var(--amber-600);
}

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

.header-search input,
.inline-filter input,
.hero-search input {
  border: 2px solid var(--amber-200);
  border-radius: 999px;
  padding: 12px 18px;
  min-width: 240px;
  background: white;
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.header-search input:focus,
.inline-filter input:focus,
.hero-search input:focus {
  border-color: var(--amber-400);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.header-search button,
.hero-search button,
.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  color: white;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
  transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
}

.header-search button:hover,
.hero-search button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.34);
}

.ghost-button,
.section-link {
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 800;
  color: var(--amber-700);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--gray-700);
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid rgba(245, 158, 11, 0.18);
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.36) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  max-width: 1180px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 14px 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.03;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tag,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 6px 14px;
  color: white;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-500));
  font-weight: 850;
  font-size: 13px;
  letter-spacing: 0.05em;
}

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

.hero-meta {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.hero-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s, background 0.25s;
}

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

.hero-search {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 82px;
  z-index: 5;
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
}

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

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

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.text-panel h2,
.detail-side h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  color: var(--gray-800);
  font-weight: 950;
  letter-spacing: -0.05em;
}

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

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

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

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 45px rgba(146, 64, 14, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--gray-200));
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s;
}

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.45));
}

.play-mark,
.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: white;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.play-mark {
  width: 52px;
  height: 52px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-weight: 950;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

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

.card-meta-row,
.card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
}

.card-category,
.category-pill {
  color: var(--amber-700);
  font-weight: 850;
}

.movie-card h2 {
  margin: 10px 0 8px;
  color: var(--gray-800);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card h2 a:hover {
  color: var(--amber-600);
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--gray-600);
  line-height: 1.65;
  font-size: 14px;
}

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

.category-card,
.category-tile {
  position: relative;
  display: grid;
  min-height: 180px;
  overflow: hidden;
  border-radius: 24px;
  color: white;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.category-card img,
.category-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s;
}

.category-card::after,
.category-tile::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.78));
}

.category-card:hover img,
.category-tile:hover img {
  transform: scale(1.08);
}

.category-card {
  align-content: end;
  padding: 22px;
}

.category-card span,
.category-tile span {
  font-size: 22px;
  font-weight: 950;
}

.category-card p,
.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.category-tile {
  min-height: 240px;
  align-items: end;
  padding: 28px;
}

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

.movie-card-compact {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: stretch;
}

.movie-card-compact .poster-wrap {
  aspect-ratio: auto;
  height: 128px;
}

.movie-card-compact .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-shell,
.detail-shell {
  padding: 34px 0 22px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 54px;
  background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.33), transparent 34%), linear-gradient(135deg, #fff7ed, #ffffff);
  box-shadow: var(--shadow-card);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--gray-600);
  font-size: 18px;
  line-height: 1.8;
}

.inline-filter {
  margin-top: 26px;
}

.inline-filter input {
  width: min(100%, 620px);
}

.empty-state {
  padding: 46px;
  border-radius: 24px;
  text-align: center;
  color: var(--gray-600);
  background: white;
  box-shadow: var(--shadow-card);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--gray-500);
  font-weight: 700;
}

.breadcrumbs a {
  color: var(--amber-700);
}

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

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

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.48));
  transition: opacity 0.24s;
}

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

.player-button {
  width: 86px;
  height: 86px;
  font-size: 34px;
  padding-left: 5px;
}

.detail-copy {
  padding: 28px;
}

.detail-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.lead-text {
  margin: 18px 0 24px;
  color: var(--gray-600);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

.detail-meta div {
  padding: 14px;
  border-radius: 18px;
  background: var(--amber-50);
}

.detail-meta dt {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 850;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: var(--gray-800);
  font-weight: 900;
}

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

.tag-list span {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--amber-800);
  font-size: 13px;
  font-weight: 800;
  background: var(--amber-100);
}

.text-panel {
  margin-top: 24px;
  padding: 30px;
}

.text-panel h2 {
  font-size: 28px;
}

.text-panel p {
  color: var(--gray-700);
  line-height: 1.95;
  font-size: 17px;
}

.accent-panel {
  background: linear-gradient(135deg, var(--amber-50), #fff);
}

.detail-side {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 22px;
}

.detail-side h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

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

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

.side-list .movie-card-compact .poster-wrap {
  height: 92px;
}

.side-list .movie-card-compact p,
.side-list .movie-card-compact .card-stats {
  display: none;
}

.site-footer {
  margin-top: 80px;
  padding: 50px 0 0;
  color: #ffedd5;
  background: linear-gradient(135deg, #7c2d12, #92400e, #431407);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-grid p {
  max-width: 520px;
  color: #fed7aa;
  line-height: 1.8;
}

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

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #fed7aa;
}

.footer-copy {
  margin-top: 36px;
  padding: 18px 0;
  text-align: center;
  color: #fed7aa;
  border-top: 1px solid rgba(254, 215, 170, 0.22);
}

[hidden] {
  display: none !important;
}

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

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

  .detail-side {
    position: static;
  }
}

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

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

  .brand-text {
    font-size: 20px;
  }

  .hero {
    height: 640px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.35));
  }

  .hero-content {
    justify-content: flex-start;
    padding-top: 78px;
  }

  .hero-search {
    left: 18px;
    right: 18px;
    bottom: 76px;
    flex-direction: column;
    border-radius: 24px;
  }

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

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

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

  .page-hero {
    padding: 34px 24px;
    border-radius: 24px;
  }

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

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

@media (max-width: 580px) {
  .container {
    width: min(100% - 20px, 1180px);
  }

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

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

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

  .movie-card-compact,
  .side-list .movie-card-compact {
    grid-template-columns: 120px 1fr;
  }

  .movie-card-compact .poster-wrap,
  .side-list .movie-card-compact .poster-wrap {
    height: 100%;
    min-height: 110px;
  }

  .detail-copy,
  .text-panel {
    padding: 22px;
  }

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