:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-400: #f59e0b;
  --amber-500: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --orange-700: #c2410c;
  --orange-900: #7c2d12;
  --text-dark: #2f1608;
  --text-muted: #855d35;
  --surface: rgba(255, 251, 235, 0.96);
  --shadow-soft: 0 18px 50px rgba(120, 53, 15, 0.18);
  --shadow-card: 0 14px 34px rgba(120, 53, 15, 0.15);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-dark);
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.18), transparent 32rem),
    linear-gradient(180deg, #fff7ed 0%, #fffbeb 42%, #fff7ed 100%);
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--amber-50);
  background: linear-gradient(90deg, var(--amber-800), var(--orange-700), var(--amber-900));
  box-shadow: 0 12px 34px rgba(120, 53, 15, 0.32);
}

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

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--amber-900);
  background: linear-gradient(135deg, var(--amber-100), var(--amber-300));
  font-weight: 900;
  box-shadow: inset 0 -5px 12px rgba(146, 64, 14, 0.18);
}

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

.brand-copy strong {
  font-size: 1.45rem;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--amber-200);
  font-size: 0.76rem;
}

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

.nav-link {
  font-weight: 700;
  color: var(--amber-100);
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  border-color: var(--amber-300);
}

.nav-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.large-search input,
.filter-bar input {
  color: var(--amber-50);
  border: 1px solid rgba(253, 230, 138, 0.48);
  border-radius: 999px;
  background: rgba(120, 53, 15, 0.5);
  padding: 10px 14px;
  outline: none;
  min-width: 210px;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(253, 230, 138, 0.82);
}

.nav-search button,
.mobile-search button,
.large-search button,
.primary-button {
  border: 0;
  color: var(--amber-900);
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-200), var(--amber-400));
  padding: 10px 18px;
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.38);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(253, 230, 138, 0.35);
  border-radius: 12px;
  background: rgba(120, 53, 15, 0.42);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--amber-50);
}

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

.mobile-link {
  display: block;
  padding: 12px 0;
  color: var(--amber-50);
  font-weight: 700;
  border-top: 1px solid rgba(253, 230, 138, 0.18);
}

.hero-carousel {
  position: relative;
  height: min(720px, calc(100vh - 74px));
  min-height: 560px;
  overflow: hidden;
  background: var(--amber-900);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.03);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(47, 22, 8, 0.9) 0%, rgba(120, 53, 15, 0.66) 42%, rgba(124, 45, 18, 0.28) 100%),
    linear-gradient(0deg, rgba(255, 251, 235, 0.95) 0%, rgba(255, 251, 235, 0.1) 44%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber-300);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.4);
}

.hero-summary {
  max-width: 740px;
  margin: 24px 0 0;
  color: var(--amber-100);
  font-size: clamp(1rem, 2vw, 1.28rem);
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span {
  color: var(--amber-900);
  background: var(--amber-100);
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 0.82rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.ghost-button,
.ghost-link {
  color: var(--amber-900);
  font-weight: 800;
  background: rgba(255, 251, 235, 0.78);
  border: 1px solid rgba(253, 230, 138, 0.8);
  border-radius: 999px;
  padding: 10px 18px;
  backdrop-filter: blur(10px);
}

.hero-control-panel {
  position: absolute;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 52px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(47, 22, 8, 0.55);
  border: 1px solid rgba(253, 230, 138, 0.28);
  backdrop-filter: blur(16px);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: transparent;
}

.hero-arrow {
  font-size: 2rem;
  width: 42px;
  height: 42px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 251, 235, 0.45);
}

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

.hero-quick-links {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  bottom: 52px;
  z-index: 5;
  display: flex;
  gap: 12px;
}

.hero-quick-links a {
  color: var(--amber-50);
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(120, 53, 15, 0.54);
  border: 1px solid rgba(253, 230, 138, 0.24);
  backdrop-filter: blur(16px);
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--amber-900);
}

.section-heading a {
  flex-shrink: 0;
  color: var(--amber-700);
  font-weight: 900;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid rgba(245, 158, 11, 0.14);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-800), var(--orange-900));
}

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

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

.card-badge,
.rank-number {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.card-badge {
  left: 12px;
  bottom: 12px;
  color: var(--amber-900);
  background: rgba(255, 251, 235, 0.92);
  padding: 6px 10px;
  font-size: 0.76rem;
}

.rank-number {
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange-700), var(--amber-400));
  box-shadow: 0 10px 20px rgba(124, 45, 18, 0.35);
}

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

.movie-title {
  display: block;
  color: var(--amber-900);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.35;
}

.movie-meta {
  margin: 8px 0 0;
  color: var(--amber-700);
  font-size: 0.9rem;
}

.movie-desc {
  min-height: 3.8em;
  margin: 10px 0 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.tag-row span {
  color: var(--amber-700);
  background: #fff7ed;
  font-size: 0.75rem;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-xl);
  color: #ffffff;
  box-shadow: var(--shadow-card);
}

.category-card img,
.category-card-overlay {
  position: absolute;
  inset: 0;
}

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

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

.category-card-overlay {
  background: linear-gradient(0deg, rgba(47, 22, 8, 0.88), rgba(120, 53, 15, 0.36));
}

.category-card strong,
.category-card small {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 1.45rem;
  font-weight: 900;
}

.category-card small {
  color: var(--amber-100);
  line-height: 1.5;
}

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

.movie-card-compact {
  display: grid;
  grid-template-columns: 118px 1fr;
  min-height: 170px;
}

.movie-card-compact .poster-link {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-compact .movie-desc {
  min-height: 0;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(120, 53, 15, 0.92), rgba(194, 65, 12, 0.86)),
    radial-gradient(circle at 85% 15%, rgba(253, 230, 138, 0.3), transparent 20rem);
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0;
}

.slim-hero > div {
  padding: 72px 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
}

.page-hero p:not(.eyebrow) {
  max-width: 740px;
  margin: 18px 0 0;
  color: var(--amber-100);
  font-size: 1.1rem;
}

.filter-panel {
  margin-top: 42px;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 251, 235, 0.78);
  box-shadow: var(--shadow-card);
}

.filter-bar input,
.large-search input {
  flex: 1;
  color: var(--text-dark);
  min-width: 0;
  background: #ffffff;
  border-color: rgba(245, 158, 11, 0.32);
}

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

.breadcrumb-bar {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--amber-700);
  font-weight: 800;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

.player-card,
.detail-article,
.poster-panel,
.info-panel {
  border-radius: var(--radius-xl);
  background: rgba(255, 251, 235, 0.94);
  border: 1px solid rgba(245, 158, 11, 0.14);
  box-shadow: var(--shadow-soft);
}

.player-card {
  padding: 14px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.55));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2.2rem;
  padding-left: 6px;
  color: var(--amber-900);
  background: linear-gradient(135deg, var(--amber-100), var(--amber-400));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

.detail-article {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 36px);
}

.detail-article h1 {
  margin: 0;
  color: var(--amber-900);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.05;
}

.detail-one-line {
  margin: 18px 0 0;
  color: var(--amber-700);
  font-size: 1.22rem;
  font-weight: 800;
}

.detail-tags {
  margin: 22px 0 28px;
}

.detail-article h2 {
  margin: 30px 0 12px;
  color: var(--amber-900);
  font-size: 1.55rem;
}

.detail-article p {
  color: var(--text-muted);
  font-size: 1.04rem;
}

.detail-aside {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 18px;
}

.poster-panel {
  overflow: hidden;
}

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

.poster-panel div,
.info-panel {
  padding: 18px;
}

.poster-panel strong {
  color: var(--amber-900);
  font-size: 1.25rem;
}

.poster-panel p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.info-panel dl {
  margin: 0;
}

.info-panel div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(245, 158, 11, 0.16);
}

.info-panel div:last-child {
  border-bottom: 0;
}

.info-panel dt {
  color: var(--amber-700);
  font-weight: 900;
}

.info-panel dd {
  margin: 0;
  color: var(--text-muted);
}

.search-page {
  margin-top: 42px;
}

.large-search {
  padding: 18px;
  border-radius: var(--radius-xl);
  background: rgba(255, 251, 235, 0.86);
  box-shadow: var(--shadow-card);
}

.search-result-title {
  margin: 26px 0 18px;
  color: var(--amber-900);
  font-weight: 900;
  font-size: 1.35rem;
}

.site-footer {
  margin-top: 92px;
  color: var(--amber-100);
  background: linear-gradient(135deg, var(--amber-900), var(--orange-900));
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.footer-brand strong {
  font-size: 1.35rem;
  color: #ffffff;
}

.footer-brand p,
.copyright {
  margin: 6px 0 0;
  color: var(--amber-200);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  font-weight: 800;
}

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

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

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

  .detail-aside {
    position: static;
    grid-template-columns: 220px 1fr;
  }
}

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-actions,
  .hero-quick-links,
  .section-heading,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-control-panel,
  .hero-quick-links {
    left: 16px;
    right: 16px;
    justify-content: center;
  }

  .hero-quick-links {
    bottom: 112px;
  }

  .ranking-list {
    grid-template-columns: 1fr;
  }

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

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

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

  .brand-copy strong {
    font-size: 1.1rem;
  }

  .brand-copy small {
    display: none;
  }

  .hero-carousel {
    min-height: 640px;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .movie-grid,
  .compact-grid,
  .all-category-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-compact {
    grid-template-columns: 104px 1fr;
  }

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

  .play-circle {
    width: 74px;
    height: 74px;
  }
}
