* {
  box-sizing: border-box;
}

:root {
  --color-bg: #fffaf3;
  --color-surface: #ffffff;
  --color-soft: #fff4df;
  --color-line: #f1dfc2;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-amber: #d97706;
  --color-amber-dark: #b45309;
  --color-orange: #ea580c;
  --color-red: #dc2626;
  --shadow-soft: 0 18px 50px rgba(146, 64, 14, 0.13);
  --shadow-card: 0 12px 34px rgba(31, 41, 55, 0.10);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 250, 243, 0.88);
  border-bottom: 1px solid rgba(217, 119, 6, 0.16);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-red));
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

.brand-text {
  font-size: 1.08rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--color-amber-dark);
  background: rgba(217, 119, 6, 0.12);
}

.nav-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 14px;
  background: rgba(217, 119, 6, 0.12);
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--color-amber-dark);
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: linear-gradient(135deg, #fffbeb, #fff7ed 48%, #fee2e2);
}

.hero-orb {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.24;
  animation: pulseOrb 5s ease-in-out infinite alternate;
}

.hero-orb.one {
  top: 72px;
  left: 6%;
  background: #f59e0b;
}

.hero-orb.two {
  right: 7%;
  top: 160px;
  background: #fb923c;
  animation-delay: 1s;
}

.hero-orb.three {
  bottom: 48px;
  left: 44%;
  background: #ef4444;
  animation-delay: 2s;
}

@keyframes pulseOrb {
  from {
    transform: scale(0.94);
  }

  to {
    transform: scale(1.08);
  }
}

.hero-track {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
  transform: translateY(18px);
}

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

.hero-slide-inner {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 44px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: var(--color-amber-dark);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(217, 119, 6, 0.18);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.08);
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy h1 span {
  display: block;
  color: var(--color-amber);
}

.hero-copy p {
  margin: 0 0 28px;
  color: #4b5563;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button-primary,
.button-secondary,
.button-plain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.26);
}

.button-secondary {
  color: var(--color-amber-dark);
  background: #ffffff;
  border: 2px solid rgba(217, 119, 6, 0.56);
}

.button-plain {
  color: var(--color-amber-dark);
  background: rgba(217, 119, 6, 0.12);
}

.button-primary:hover,
.button-secondary:hover,
.button-plain:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(217, 119, 6, 0.20);
}

.hero-poster-wrap {
  position: relative;
}

.hero-poster {
  min-height: 430px;
  border-radius: 34px;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transform: rotate(1.4deg);
}

.hero-poster::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.48));
}

.hero-poster-info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  padding: 18px;
  color: #ffffff;
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.56);
  backdrop-filter: blur(12px);
}

.hero-poster-info strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.hero-poster-info span {
  color: rgba(255, 255, 255, 0.82);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.34);
  cursor: pointer;
}

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

.section {
  padding: 72px 0;
}

.section-soft {
  background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.section-strong {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-orange), var(--color-red));
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-lead {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.section-strong .section-heading p,
.section-strong .page-lead {
  color: rgba(255, 255, 255, 0.86);
}

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

.stat-card {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.stat-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 999px;
  color: var(--color-amber-dark);
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  font-weight: 900;
}

.stat-card h2,
.stat-card h3 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.stat-card p {
  margin: 0;
  color: var(--color-muted);
}

.search-panel {
  padding: 28px;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.search-bar {
  display: flex;
  gap: 12px;
}

.search-bar input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  color: var(--color-text);
}

.search-bar input:focus {
  border-color: rgba(217, 119, 6, 0.72);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.13);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(217, 119, 6, 0.36);
  box-shadow: var(--shadow-card);
  transform: translateY(-6px);
}

.movie-cover,
.rank-thumb,
.category-thumb,
.detail-poster,
.related-cover {
  background-position: center;
  background-size: cover;
  background-color: #fef3c7;
}

.movie-cover {
  position: relative;
  display: block;
  min-height: 285px;
  overflow: hidden;
}

.cover-chip,
.cover-year {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.70);
  font-size: 0.78rem;
  font-weight: 800;
}

.cover-chip {
  left: 12px;
}

.cover-year {
  right: 12px;
}

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

.movie-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--color-amber-dark);
  font-weight: 800;
}

.movie-card-topline a {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.10);
}

.movie-card h2,
.movie-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card h2 a,
.movie-card h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--color-muted);
  font-size: 0.93rem;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6b7280;
  font-size: 0.86rem;
}

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

.category-card {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card .category-letter {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 20px;
  color: var(--color-amber-dark);
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  font-size: 1.55rem;
  font-weight: 900;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

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

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

.rank-panel {
  padding: 26px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.rank-panel h2 {
  margin: 0 0 18px;
  font-size: 1.5rem;
}

.rank-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item {
  display: grid;
  grid-template-columns: 46px 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.rank-number {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-red));
  font-weight: 900;
}

.rank-thumb {
  width: 74px;
  height: 96px;
  border-radius: 16px;
}

.rank-item h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.rank-item p {
  margin: 0 0 4px;
  color: var(--color-muted);
  font-size: 0.88rem;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-item span {
  color: var(--color-amber-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.page-hero {
  padding: 72px 0 42px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed 50%, #fee2e2);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--color-muted);
  font-size: 0.92rem;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.60), rgba(17, 24, 39, 0.28));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  min-height: 560px;
  padding: 58px 0;
}

.detail-poster {
  min-height: 410px;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-copy p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.06rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.86rem;
  font-weight: 800;
}

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

.content-card,
.side-card {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.content-card + .content-card {
  margin-top: 24px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 1.55rem;
}

.content-card p {
  margin: 0 0 14px;
  color: #4b5563;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px dashed var(--color-line);
  padding-bottom: 10px;
  color: var(--color-muted);
}

.info-list strong {
  color: var(--color-text);
}

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

.tag-list span {
  color: var(--color-amber-dark);
  background: rgba(217, 119, 6, 0.12);
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 22px 64px rgba(17, 24, 39, 0.22);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.32), rgba(17, 24, 39, 0.76));
}

.player-cover > * {
  position: relative;
  z-index: 2;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-amber), var(--color-red));
  font-size: 2.1rem;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.30);
}

.player-cover strong {
  max-width: min(90%, 620px);
  font-size: clamp(1.2rem, 4vw, 2rem);
  text-align: center;
}

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

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

.related-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff7ed;
}

.related-cover {
  display: block;
  min-height: 145px;
}

.related-card div {
  padding: 14px;
}

.related-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.related-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.88rem;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 24px;
  background: #ffffff;
  text-align: center;
  color: var(--color-muted);
}

.empty-state.is-visible {
  display: block;
}

.search-results {
  margin-top: 28px;
}

.site-footer {
  padding: 56px 0 24px;
  background: #1f2937;
  color: rgba(255, 255, 255, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 36px;
}

.footer-brand {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 1.2rem;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: #fbbf24;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

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

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

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-card);
  }

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

  .hero-slide-inner,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 330px;
    transform: none;
  }

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

@media (max-width: 640px) {
  .container,
  .site-header-inner,
  .hero-slide-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .section {
    padding: 48px 0;
  }

  .hero-carousel,
  .hero-track,
  .hero-slide-inner {
    min-height: 760px;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
  }

  .hero-actions,
  .section-actions,
  .detail-actions,
  .search-bar {
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid-wide,
  .category-grid,
  .stats-grid,
  .rank-grid,
  .footer-grid,
  .related-list {
    grid-template-columns: 1fr;
  }

  .movie-cover {
    min-height: 330px;
  }

  .section-heading {
    display: block;
  }

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

  .detail-hero-inner {
    padding: 36px 0;
  }

  .detail-poster {
    min-height: 350px;
  }
}
