:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 14px 40px rgba(217, 119, 6, 0.12);
  --shadow-card: 0 10px 30px rgba(17, 24, 39, 0.08);
  --radius-xl: 22px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--amber-50), #fff7ed 46%, var(--amber-50));
  line-height: 1.6;
}

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

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

button, input, select {
  font: inherit;
}

button {
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(253, 230, 138, 0.8);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.32);
  transition: transform 0.28s ease;
}

.brand:hover .brand-icon {
  transform: rotate(10deg) scale(1.04);
}

.brand-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--amber-600), var(--orange-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link:hover {
  color: var(--amber-600);
}

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

.nav-search input,
.mobile-search input,
.filter-input,
.filter-select {
  border: 1px solid var(--amber-200);
  background: var(--white);
  color: var(--gray-800);
  outline: none;
  border-radius: 999px;
  padding: 11px 16px;
  min-width: 220px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--amber-400);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.22);
}

.nav-search button,
.mobile-search button,
.btn,
.hero-button,
.filter-button {
  cursor: pointer;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-500), var(--orange-500));
  padding: 11px 18px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.btn:hover,
.hero-button:hover,
.filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.34);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border-radius: 12px;
  background: var(--amber-100);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: var(--amber-700, #b45309);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--amber-200);
  background: var(--white);
  padding: 16px 20px 20px;
}

.mobile-panel.open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-search input {
  min-width: 0;
  width: 100%;
}

.mobile-link {
  display: block;
  padding: 11px 4px;
  color: var(--gray-700);
  font-weight: 700;
}

.page-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 20px 58px;
}

.hero {
  position: relative;
  min-height: 560px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--gray-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide.active .hero-image {
  animation: heroZoom 8s ease both;
}

@keyframes heroZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.1); }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 36%, rgba(251, 191, 36, 0.30), transparent 34%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.58) 52%, rgba(17, 24, 39, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(660px, 100%);
  padding: 76px 64px;
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
  color: #fde68a;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 28px;
}

.hero-meta span,
.tag-row span,
.detail-tags span,
.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 800;
}

.hero-meta span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, 0.20);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-link {
  color: #fde68a;
  font-weight: 900;
  padding: 11px 0;
}

.hero-controls {
  position: absolute;
  left: 64px;
  bottom: 42px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 58px;
  background: linear-gradient(90deg, var(--amber-300), var(--orange-400));
}

.hero-side-card {
  position: absolute;
  z-index: 3;
  right: 44px;
  bottom: 44px;
  width: 330px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--white);
  backdrop-filter: blur(20px);
}

.hero-side-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.hero-side-card a {
  display: block;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.88);
}

.section {
  margin-top: 42px;
}

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

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--gray-900);
}

.section-title p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.more-link {
  font-weight: 900;
  color: var(--amber-600);
}

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

.category-card {
  min-height: 160px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 237, 0.92));
  border: 1px solid rgba(253, 230, 138, 0.88);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 48px rgba(217, 119, 6, 0.16);
}

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

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

.category-pill {
  margin-bottom: 16px;
  background: linear-gradient(90deg, var(--amber-100), #ffedd5);
  color: var(--amber-700, #b45309);
}

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

.movie-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(253, 230, 138, 0.74);
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.12);
}

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

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

.movie-card:hover img,
.compact-card:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.card-type {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 10px;
  color: var(--white);
  background: rgba(245, 158, 11, 0.92);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.play-cue {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.82);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(17, 24, 39, 0.68);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-cue {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  color: var(--gray-900);
}

.card-body h2 a:hover {
  color: var(--amber-600);
}

.card-meta,
.card-line {
  margin: 0;
  color: var(--gray-600);
  font-size: 13px;
}

.card-line {
  margin-top: 8px;
  min-height: 42px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags span {
  background: var(--amber-50);
  color: var(--amber-700, #b45309);
  border: 1px solid var(--amber-200);
}

.compact-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
}

.compact-card {
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid rgba(253, 230, 138, 0.76);
  box-shadow: var(--shadow-card);
}

.compact-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.35s ease;
}

.compact-card span,
.compact-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card span {
  margin-top: 10px;
  font-weight: 900;
  color: var(--gray-900);
}

.compact-card small {
  color: var(--gray-600);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(253, 230, 138, 0.86);
  box-shadow: var(--shadow-card);
  margin-bottom: 22px;
}

.filter-input {
  flex: 1 1 280px;
}

.filter-select {
  min-width: 170px;
}

.page-hero {
  padding: 40px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 85% 25%, rgba(251, 191, 36, 0.26), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.96));
  border: 1px solid rgba(253, 230, 138, 0.86);
  box-shadow: var(--shadow-soft);
  margin-bottom: 30px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  color: var(--gray-900);
}

.page-hero p {
  margin: 14px 0 0;
  max-width: 860px;
  color: var(--gray-600);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gray-600);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 26px;
  align-items: start;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--gray-900);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.24);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(17, 24, 39, 0.42), rgba(17, 24, 39, 0.76));
  cursor: pointer;
}

.player-overlay.hidden {
  display: none;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.34);
}

.player-overlay strong {
  font-size: 22px;
  text-align: center;
}

.detail-panel,
.detail-text,
.related-section,
.rank-panel {
  border-radius: var(--radius-xl);
  background: var(--white);
  border: 1px solid rgba(253, 230, 138, 0.75);
  box-shadow: var(--shadow-card);
}

.detail-panel {
  padding: 24px;
}

.detail-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.18;
  color: var(--gray-900);
}

.detail-panel .one-line {
  margin: 0 0 18px;
  color: var(--gray-600);
  font-size: 17px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.detail-meta div {
  border-radius: 14px;
  padding: 12px;
  background: var(--amber-50);
}

.detail-meta small {
  display: block;
  color: var(--gray-500);
}

.detail-meta strong {
  display: block;
  color: var(--gray-900);
}

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

.detail-text {
  margin-top: 26px;
  padding: 28px;
}

.detail-text h2,
.related-section h2,
.rank-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: var(--gray-900);
}

.detail-text p {
  margin: 0 0 18px;
  color: var(--gray-700);
  font-size: 17px;
}

.related-section {
  margin-top: 26px;
  padding: 24px;
}

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

.related-card {
  min-width: 0;
}

.related-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-card strong,
.related-card small {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-card strong {
  color: var(--gray-900);
}

.related-card small {
  color: var(--gray-600);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(253, 230, 138, 0.74);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.rank-num {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

.rank-item img {
  width: 78px;
  height: 104px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item h2 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--gray-900);
}

.rank-item p {
  margin: 0;
  color: var(--gray-600);
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--gray-600);
  border: 1px solid var(--amber-200);
}

.empty-state.show {
  display: block;
}

.footer {
  margin-top: 38px;
  background: linear-gradient(135deg, var(--amber-50), #ffedd5);
  border-top: 1px solid var(--amber-200);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.7fr) minmax(160px, 0.7fr);
  gap: 30px;
}

.footer-brand p {
  margin: 16px 0 0;
  color: var(--gray-600);
  max-width: 520px;
}

.footer-col h2 {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--gray-900);
}

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

.footer-col li {
  margin: 8px 0;
}

.footer-col a {
  color: var(--gray-600);
}

.footer-col a:hover {
  color: var(--amber-600);
}

.footer-bottom {
  border-top: 1px solid rgba(253, 230, 138, 0.8);
  padding: 16px 20px 24px;
  text-align: center;
  color: var(--gray-600);
}

[data-card].is-hidden {
  display: none;
}

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

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

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

  .hero-side-card {
    display: none;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

  .topbar-inner {
    gap: 12px;
  }

  .hero {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-content {
    padding: 52px 26px;
  }

  .hero-controls {
    left: 26px;
    bottom: 24px;
  }

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

  .compact-row,
  .related-grid,
  .category-grid,
  .rank-list,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 28px;
    border-radius: 24px;
  }

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

@media (max-width: 520px) {
  .page-main {
    padding: 22px 14px 44px;
  }

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

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

  .hero h1 {
    font-size: 38px;
  }

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

  .mobile-search {
    flex-direction: column;
  }

  .movie-grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

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

  .rank-item img {
    width: 64px;
    height: 86px;
  }
}
