:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-900: #78350f;
  --orange-500: #f97316;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 16px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  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(--slate-900);
  background: linear-gradient(180deg, var(--amber-50), var(--white) 35%, var(--slate-50));
  line-height: 1.6;
}

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

img,
video {
  display: block;
  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: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.96));
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

.nav-bar {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(217, 119, 6, 0.32);
}

.brand-text {
  font-size: clamp(20px, 2vw, 26px);
  background: linear-gradient(90deg, var(--amber-700), var(--orange-500));
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--slate-700);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-700);
}

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

.nav-search input,
.search-panel input {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: var(--white);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  min-width: 180px;
}

.nav-search input:focus,
.search-panel input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.nav-search button,
.btn,
.play-button,
.search-panel button {
  border: 0;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
  color: var(--white);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(217, 119, 6, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.btn:hover,
.play-button:hover,
.search-panel button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.32);
}

.btn.light {
  color: var(--amber-700);
  background: var(--white);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--slate-700);
  font-size: 24px;
}

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.32), transparent 24%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.24), transparent 22%),
    linear-gradient(120deg, var(--amber-500), var(--orange-500) 48%, var(--amber-600));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(30deg, rgba(255, 255, 255, 0.34) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.34) 87.5%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.34) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.34) 87.5%);
  background-size: 64px 112px;
}

.hero-inner {
  position: relative;
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 42px;
  align-items: center;
  padding: 54px 0;
  color: var(--white);
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

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

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  font-size: clamp(18px, 2vw, 24px);
  color: rgba(255, 255, 255, 0.92);
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-tags a,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.hero-stage {
  position: relative;
  min-height: 470px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  align-items: end;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateX(18px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.hero-slide img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.22);
}

.hero-slide h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
}

.hero-slide p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-pager {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 8px;
  z-index: 4;
}

.hero-dot {
  width: 34px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--white);
}

.section {
  padding: 74px 0;
}

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

.section-title h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.05em;
}

.section-title p,
.page-title p {
  margin: 8px 0 0;
  color: var(--slate-500);
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--amber-300));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--slate-500);
  font-size: 13px;
}

.movie-card h3,
.rank-body h3,
.related-card h3 {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-body h3 a:hover,
.related-card h3 a:hover {
  color: var(--amber-700);
}

.movie-card p {
  min-height: 50px;
  margin: 0 0 12px;
  color: var(--slate-700);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span,
.detail-tags span {
  background: var(--amber-100);
  color: var(--amber-700);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
}

.score {
  color: var(--amber-700);
  font-weight: 900;
}

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

.category-tile {
  padding: 26px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--white), var(--amber-50));
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(245, 158, 11, 0.12);
}

.category-tile h2 {
  margin: 0 0 8px;
}

.category-tile p {
  color: var(--slate-500);
  margin: 0 0 16px;
}

.page-hero {
  padding: 64px 0 34px;
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.64), rgba(255, 255, 255, 0));
}

.page-title {
  max-width: 780px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 86px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
  font-weight: 900;
}

.rank-cover img {
  width: 86px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: var(--amber-100);
}

.rank-body p {
  margin: 0 0 8px;
  color: var(--slate-700);
}

.detail-hero {
  padding: 50px 0;
  background:
    radial-gradient(circle at 75% 10%, rgba(251, 191, 36, 0.25), transparent 28%),
    linear-gradient(135deg, #1f1306, var(--amber-900));
  color: var(--white);
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.34);
  background: rgba(255, 255, 255, 0.18);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--amber-100);
  font-size: 14px;
}

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

.detail-copy .intro {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

.detail-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.content-box,
.player-box,
.side-box,
.search-panel {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.content-box h2,
.player-box h2,
.side-box h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-box p {
  margin: 0 0 16px;
  color: var(--slate-700);
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.72));
}

.play-button {
  padding: 14px 24px;
  font-size: 18px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.related-card img {
  width: 78px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: var(--amber-100);
}

.related-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 13px;
}

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

.search-panel input {
  flex: 1;
  border-radius: 18px;
}

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

.site-footer {
  margin-top: 70px;
  color: var(--amber-100);
  background: linear-gradient(180deg, var(--amber-900), #3b1c04);
}

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

.footer-brand {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
}

.site-footer h3 {
  color: var(--white);
  margin: 0 0 12px;
}

.site-footer p {
  margin: 0;
  color: rgba(254, 243, 199, 0.78);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 7px;
}

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

.empty-message {
  padding: 30px;
  color: var(--slate-500);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

@media (max-width: 1024px) {
  .hero-inner,
  .detail-grid,
  .detail-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 430px;
  }

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

@media (max-width: 760px) {
  .nav-bar {
    flex-wrap: wrap;
    height: auto;
    min-height: 66px;
    padding: 12px 0;
  }

  .mobile-menu-button {
    display: block;
  }

  .nav-links,
  .nav-search {
    display: none;
    width: 100%;
  }

  .nav-links.open,
  .nav-search.open {
    display: flex;
  }

  .nav-links.open {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav-search.open input {
    flex: 1;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 42px 0 52px;
  }

  .hero-slide {
    grid-template-columns: 130px 1fr;
    gap: 14px;
    padding: 16px;
  }

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

  .section-title {
    display: block;
  }

  .rank-item {
    grid-template-columns: 52px 72px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-cover img {
    width: 72px;
  }

  .detail-poster {
    max-width: 280px;
  }

  .search-panel form {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-slide img {
    max-width: 190px;
  }
}
