:root {
  color-scheme: light;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-600: #ea580c;
  --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;
  --shadow-sm: 0 4px 16px rgba(17, 24, 39, 0.08);
  --shadow-md: 0 14px 32px rgba(17, 24, 39, 0.12);
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--orange-50) 0%, var(--amber-50) 38%, var(--white) 100%);
}

body.lock-scroll {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 32px, 1280px);
  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));
  box-shadow: 0 6px 24px rgba(146, 64, 14, 0.12);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

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

.brand-text {
  font-size: clamp(18px, 2vw, 24px);
}

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

.nav-link {
  padding: 22px 0 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-700);
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.search-panel input,
.toolbar input {
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-900);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 210px;
  padding: 11px 16px;
}

.header-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--white);
  background: var(--amber-600);
  font-weight: 700;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--amber-100);
  margin-left: auto;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--amber-700);
  border-radius: 999px;
}

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

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

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

.hero {
  position: relative;
  height: min(72vh, 760px);
  min-height: 520px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45) 50%, rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 86px;
  color: var(--white);
}

.hero-kicker {
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.9);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  max-width: 840px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

.hero-desc {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.hero-meta,
.hero-tags,
.hero-actions,
.detail-meta,
.tag-row,
.detail-tags,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.hero-tags span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  color: var(--white);
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-tags {
  margin-top: 12px;
}

.hero-actions {
  margin-top: 26px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 16px 30px rgba(234, 88, 12, 0.28);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(10px);
}

.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.34);
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.home-shell,
.overview-shell,
.listing-shell,
.search-page,
.ranking-page-list {
  padding: 52px 0;
}

.home-section {
  margin-bottom: 68px;
}

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

.section-heading p,
.page-hero p,
.category-overview-body p {
  margin: 0 0 8px;
  color: var(--amber-700);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3.2vw, 36px);
  line-height: 1.12;
}

.section-heading a {
  color: var(--amber-700);
  font-weight: 800;
}

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

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

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

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

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

.movie-card a {
  display: block;
  height: 100%;
}

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

.ratio-standard {
  aspect-ratio: 2 / 3;
}

.ratio-wide {
  aspect-ratio: 16 / 9;
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent);
  opacity: 0.88;
}

.rating,
.duration {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.58);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.rating {
  top: 10px;
  right: 10px;
  color: #fde68a;
}

.duration {
  left: 10px;
  bottom: 10px;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--amber-700);
}

.meta,
.desc {
  margin: 0;
}

.meta {
  color: var(--gray-500);
  font-size: 13px;
  margin-bottom: 10px;
}

.desc {
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.6;
}

.line-2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-size: 12px;
  font-weight: 800;
}

.category-section {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--amber-100), var(--orange-100));
}

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

.category-tile {
  display: grid;
  min-height: 134px;
  align-content: space-between;
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span,
.category-tile em {
  color: var(--amber-700);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.category-tile strong {
  font-size: 21px;
}

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

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

.rank-item a {
  display: grid;
  grid-template-columns: auto 74px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.rank-item img {
  width: 74px;
  height: 94px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.rank-item p,
.rank-item span {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.5;
}

.page-hero {
  padding: 70px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
}

.page-hero h1 {
  max-width: 920px;
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
}

.page-hero p {
  color: var(--amber-100);
}

.page-hero span {
  display: block;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.7;
}

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

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

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

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

.category-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.category-overview-body {
  padding: 22px;
}

.category-overview-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-overview-body span {
  color: var(--gray-600);
  line-height: 1.7;
}

.toolbar {
  display: grid;
  gap: 18px;
  margin-bottom: 26px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.toolbar label {
  display: grid;
  gap: 8px;
  color: var(--gray-700);
  font-weight: 800;
}

.toolbar input {
  width: min(100%, 520px);
  padding: 13px 18px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--gray-700);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--gray-200);
  font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: none;
}

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

.search-panel input {
  flex: 1;
  padding: 13px 18px;
}

.search-state {
  margin: 20px 0;
  color: var(--gray-600);
  font-weight: 800;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 26px 0 64px;
}

.player-card,
.detail-card,
.side-box,
.side-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.42));
  transition: opacity 0.2s ease;
}

.play-overlay span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  font-size: 30px;
  transform: translateX(2px);
}

.player-box.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: none;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.65);
  text-align: center;
}

.player-message.is-visible {
  display: block;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.detail-meta {
  margin-bottom: 24px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-weight: 800;
}

.detail-card section {
  margin-top: 28px;
}

.detail-card h2,
.side-box h2 {
  margin: 0 0 12px;
  font-size: 21px;
}

.detail-card p,
.side-box p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.85;
}

.related-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--amber-700);
  font-weight: 800;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.side-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.side-box {
  padding: 22px;
}

.side-box a {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--amber-700);
  font-weight: 900;
}

.side-card-grid {
  display: grid;
  gap: 14px;
}

.side-card-grid .movie-card {
  display: block;
}

.site-footer {
  color: var(--gray-300);
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 42px;
  padding: 52px 0;
}

.footer-brand {
  color: var(--white);
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 420px;
  color: var(--gray-400);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 18px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.site-footer a {
  color: var(--gray-400);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 16px;
  text-align: center;
  color: var(--gray-400);
}

[hidden] {
  display: none !important;
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav {
    display: block;
  }

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

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

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

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

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

  .related-side {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    min-height: 560px;
    height: 78vh;
  }

  .hero-content {
    padding-bottom: 72px;
  }

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

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

  .movie-grid,
  .listing-grid,
  .wide-grid,
  .rank-grid,
  .rank-grid.two-col,
  .category-overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .category-section {
    padding: 22px;
  }

  .rank-item a {
    grid-template-columns: auto 62px 1fr;
  }

  .rank-item img {
    width: 62px;
    height: 82px;
  }

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

  .detail-card {
    padding: 22px;
  }

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

  .side-poster {
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 18px;
  }

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

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

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