:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-900: #78350f;
  --orange-50: #fff7ed;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.22);
  --radius-lg: 18px;
  --radius-xl: 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-900);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--gray-900);
  white-space: nowrap;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), #ea580c);
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.28);
}

.brand-text {
  font-size: 22px;
  letter-spacing: 0.02em;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--gray-600);
  font-weight: 600;
  transition: color 0.25s ease, background 0.25s ease;
}

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

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 34vw);
}

.nav-search input,
.toolbar input,
.large-search input,
.intro-search input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--white);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.nav-search button,
.intro-search button,
.large-search button,
.primary-btn,
.small-btn {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.nav-search button {
  padding: 11px 18px;
}

.nav-search button:hover,
.intro-search button:hover,
.large-search button:hover,
.primary-btn:hover,
.small-btn:hover {
  background: var(--amber-700);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(180, 83, 9, 0.25);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--amber-50);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 21px;
  height: 2px;
  background: var(--amber-700);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  padding: 10px 16px 16px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--gray-700);
  font-weight: 700;
}

.mobile-link.is-active,
.mobile-link:hover {
  background: var(--amber-50);
  color: var(--amber-700);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

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

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1240px) / 2));
  right: 32px;
  bottom: 72px;
  width: min(760px, calc(100% - 64px));
  color: var(--white);
  z-index: 4;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--amber-200);
  font-size: 14px;
}

.hero-meta a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  padding: 13px 28px;
}

.ghost-btn {
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
  font-weight: 700;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.ghost-btn:hover {
  background: rgba(0, 0, 0, 0.46);
  border-color: var(--amber-200);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

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

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

.home-intro {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.intro-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 480px);
  gap: 24px;
  align-items: center;
  padding: 30px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber-700);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro-panel h2,
.page-hero-small h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.intro-search,
.large-search {
  display: flex;
  gap: 10px;
}

.intro-search button,
.large-search button {
  flex: none;
  padding: 12px 20px;
}

.page-stack {
  display: grid;
  gap: 48px;
}

.top-space {
  padding-top: 36px;
  padding-bottom: 64px;
}

.content-section {
  min-width: 0;
}

.warm-section {
  padding: 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--orange-50), var(--amber-50));
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.section-link {
  flex: none;
  color: var(--amber-700);
  font-weight: 800;
}

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

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

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

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

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

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

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(217, 119, 6, 0.92);
}

.rank-badge {
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.82);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.ranking-body h2 a:hover {
  color: var(--amber-700);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--gray-500);
  font-size: 13px;
}

.card-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: var(--gray-400);
}

.card-body p {
  margin: 0 0 14px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.7;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--amber-800);
  background: var(--amber-50);
  font-size: 12px;
  font-weight: 700;
}

.movie-card-compact .card-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero-small {
  padding: 40px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--white), var(--amber-50));
  box-shadow: var(--shadow-sm);
}

.page-hero-small p:last-child {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--gray-600);
  font-size: 17px;
  line-height: 1.8;
}

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 190px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--gray-900);
}

.category-covers img {
  width: 100%;
  height: 89px;
  object-fit: cover;
  border-radius: 12px;
}

.category-card-body {
  padding: 24px;
}

.category-card-body h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.category-card-body p {
  margin: 0 0 18px;
  color: var(--gray-600);
  line-height: 1.7;
}

.category-card-body span {
  color: var(--amber-700);
  font-weight: 800;
}

.toolbar {
  display: flex;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.toolbar input {
  flex: 1;
  border-radius: 14px;
}

.toolbar select {
  min-width: 180px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--white);
  outline: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 14px;
}

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

.detail-page {
  padding-bottom: 64px;
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
}

.player-block,
.detail-content-panel,
.content-panel,
.side-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.player-block {
  overflow: hidden;
  padding: 0;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--black);
  overflow: hidden;
}

.player-video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--black);
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden,
.player-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-disc {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 18px 36px rgba(217, 119, 6, 0.38);
  font-size: 34px;
  text-indent: 6px;
}

.player-loading {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-loading span {
  width: 34px;
  height: 34px;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--amber-500);
  border-radius: 999px;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.detail-content-panel,
.content-panel,
.side-card {
  padding: 26px;
}

.detail-content-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

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

.detail-meta a,
.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 13px;
  font-weight: 700;
}

.detail-meta a {
  color: var(--amber-800);
  background: var(--amber-100);
}

.detail-lead {
  margin: 0;
  color: var(--gray-700);
  font-size: 18px;
  line-height: 1.85;
}

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

.content-panel p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.9;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 18px;
  background: var(--gray-900);
}

.side-tags {
  margin-top: 4px;
}

.mini-list {
  display: grid;
  gap: 12px;
}

.mini-movie {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--gray-50);
  transition: background 0.25s ease, transform 0.25s ease;
}

.mini-movie:hover {
  background: var(--amber-50);
  transform: translateX(2px);
}

.mini-movie img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

.mini-info {
  display: grid;
  gap: 6px;
}

.mini-info strong {
  font-size: 15px;
  line-height: 1.35;
}

.mini-info small {
  color: var(--gray-500);
  line-height: 1.45;
}

.mini-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  font-size: 12px;
  font-weight: 800;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 52px 88px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.ranking-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), #ea580c);
  font-weight: 900;
}

.ranking-poster img {
  width: 88px;
  height: 118px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-body h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-body p {
  margin: 0 0 10px;
  color: var(--gray-600);
  line-height: 1.7;
}

.small-btn {
  padding: 10px 18px;
}

.large-search {
  max-width: 760px;
  margin-top: 22px;
}

.site-footer {
  margin-top: 40px;
  padding: 40px 0;
  color: var(--gray-300);
  background: var(--gray-900);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--gray-400);
}

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

.footer-links a {
  color: var(--amber-200);
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

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

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

  .detail-side {
    grid-template-columns: minmax(0, 300px) 1fr;
  }
}

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

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

  .intro-panel,
  .category-card a,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 720px) {
  .hero {
    height: 560px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 70px;
    width: auto;
  }

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

  .hero-arrow {
    width: 38px;
    height: 38px;
    font-size: 28px;
  }

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

  .warm-section,
  .page-hero-small,
  .detail-content-panel,
  .content-panel,
  .side-card {
    padding: 20px;
  }

  .section-heading,
  .toolbar,
  .intro-search,
  .large-search {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar select {
    width: 100%;
  }

  .ranking-row {
    grid-template-columns: 42px 72px 1fr;
  }

  .ranking-row .small-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .ranking-poster img {
    width: 72px;
    height: 96px;
  }
}

@media (max-width: 460px) {
  .container,
  .nav-shell {
    width: min(100% - 24px, 1240px);
  }

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

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

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