:root {
  --page-bg: #fffaf0;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(245, 158, 11, 0.22);
  --card: rgba(255, 255, 255, 0.86);
  --amber: #d97706;
  --orange: #ea580c;
  --gold: #f59e0b;
  --deep: #78350f;
  --shadow: 0 22px 60px rgba(146, 64, 14, 0.16);
  --soft-shadow: 0 12px 30px rgba(146, 64, 14, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(251, 191, 36, 0.22), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(249, 115, 22, 0.16), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fffaf0 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 251, 235, 0.92);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--amber);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  color: #374151;
}

.nav-links a {
  padding: 10px 2px;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--amber);
}

.menu-button {
  display: none;
  border: 0;
  background: rgba(245, 158, 11, 0.12);
  color: var(--deep);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 20px;
}

.hero {
  position: relative;
  min-height: 88vh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 70px 0 56px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 237, 213, 0.88)),
    radial-gradient(circle at 72% 24%, rgba(251, 146, 60, 0.34), transparent 30rem);
}

.hero-stage {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 42px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeSlide 0.7s ease both;
}

.hero-copy {
  padding: 34px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #92400e;
  font-weight: 800;
  background: rgba(251, 191, 36, 0.2);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  color: transparent;
  background: linear-gradient(90deg, #b45309, #ea580c, #ca8a04);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero p {
  margin: 0 0 24px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 24px 0;
}

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

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(146, 64, 14, 0.18);
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.button-light {
  color: var(--amber);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(245, 158, 11, 0.38);
}

.search-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  max-width: 560px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.search-strip input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 14px;
  font-size: 15px;
  background: transparent;
}

.search-strip button {
  border: 0;
  white-space: nowrap;
  cursor: pointer;
}

.hero-poster {
  position: relative;
  min-height: 540px;
}

.poster-card {
  position: absolute;
  inset: 0 0 0 6%;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(120, 53, 15, 0.28);
  transform: rotate(1.5deg);
  background: #fef3c7;
}

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

.poster-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.68) 100%);
}

.poster-meta {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  color: #ffffff;
}

.poster-meta strong {
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

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

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--gold), var(--orange));
}

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

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section h2,
.page-title h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section p,
.page-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.card-grid.featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--soft-shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  border: 1px solid rgba(245, 158, 11, 0.12);
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
}

.movie-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #fef3c7;
}

.movie-thumb.tall {
  aspect-ratio: 3 / 4;
}

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

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

.play-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  font-size: 12px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.card-body p {
  min-height: 50px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #92400e;
  background: rgba(251, 191, 36, 0.16);
}

.tag {
  color: #4b5563;
  background: rgba(229, 231, 235, 0.68);
}

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

.category-card {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(245, 158, 11, 0.12);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--amber);
  font-size: 20px;
}

.page-hero {
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.95), rgba(254, 243, 199, 0.8));
  border-bottom: 1px solid var(--line);
}

.page-title {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 40px;
}

.breadcrumb {
  margin-bottom: 20px;
  color: var(--amber);
  font-weight: 800;
}

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

.sidebar {
  position: sticky;
  top: 92px;
  border-radius: 24px;
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.sidebar h3 {
  margin: 0 0 16px;
}

.side-link {
  display: block;
  padding: 11px 12px;
  border-radius: 14px;
  color: #4b5563;
  font-weight: 800;
}

.side-link:hover,
.side-link.active {
  color: var(--amber);
  background: rgba(251, 191, 36, 0.14);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 130px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.rank-num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.rank-item img {
  width: 130px;
  height: 82px;
  object-fit: cover;
  border-radius: 16px;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 70px;
}

.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 26px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.28);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111827;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.58));
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 36px;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.play-overlay.is-hidden {
  display: none;
}

.detail-card {
  border-radius: 28px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-poster {
  margin-bottom: 18px;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #fef3c7;
}

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

.article {
  display: grid;
  gap: 22px;
  margin-top: 34px;
}

.article-section {
  border-radius: 24px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.article-section h2 {
  margin: 0 0 14px;
}

.article-section p {
  margin: 0;
  color: #4b5563;
  line-height: 2;
}

.search-panel {
  border-radius: 26px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px 130px;
  gap: 12px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  outline: 0;
  background: #fffaf0;
  font-size: 15px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.footer {
  margin-top: 40px;
  color: #fffbeb;
  background: linear-gradient(135deg, #78350f, #9a3412);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 30px;
  padding: 46px 0;
}

.footer h3 {
  margin: 0 0 12px;
  color: #fde68a;
}

.footer p,
.footer a {
  color: #fed7aa;
  line-height: 1.8;
}

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

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

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

  .menu-button {
    display: block;
  }

  .hero-slide,
  .watch-grid,
  .library-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 420px;
  }

  .poster-card {
    inset: 0;
  }

  .card-grid,
  .card-grid.featured,
  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .rank-item .button {
    grid-column: 3;
    justify-self: start;
  }

  .rank-item img {
    width: 98px;
    height: 68px;
  }

  .search-controls {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .hero {
    min-height: auto;
  }

  .hero-copy {
    padding: 22px;
  }

  .search-strip {
    border-radius: 24px;
    flex-direction: column;
    align-items: stretch;
  }

  .card-grid,
  .card-grid.featured,
  .category-grid,
  .search-results {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item img {
    display: none;
  }

  .rank-item .button {
    grid-column: 2;
  }
}
