:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.16);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 42%, #fef9c3 100%);
  min-height: 100vh;
}

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

img {
  display: block;
  width: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-500), var(--amber-500));
  box-shadow: 0 12px 30px rgba(194, 65, 12, 0.28);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  transition: transform 0.25s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.08) rotate(-4deg);
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff7ed;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 10px 24px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(194, 65, 12, 0.28);
}

.mobile-nav a {
  display: block;
  color: var(--white);
  padding: 10px 12px;
  border-radius: 10px;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #111827;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: center;
  gap: 42px;
  padding: 88px max(24px, calc((100vw - 1280px) / 2 + 24px)) 72px;
}

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

.hero-bg img {
  height: 100%;
  filter: blur(16px) brightness(0.48) saturate(1.18);
  transform: scale(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.58), rgba(17, 24, 39, 0.86));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  color: var(--white);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-kicker {
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
}

.tag-row span {
  background: var(--gray-100);
  color: var(--slate-700);
}

.hero-actions,
.intro-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

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

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

.btn.primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 14px 28px rgba(234, 88, 12, 0.35);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.btn.warm {
  color: #9a3412;
  background: #ffedd5;
}

.hero-poster {
  position: relative;
  z-index: 2;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
}

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

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

.hero-arrow.prev {
  left: 20px;
}

.hero-arrow.next {
  right: 20px;
}

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

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

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

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.intro-strip h2,
.section-heading h2,
.filter-panel h2,
.page-hero h1,
.detail-main h1 {
  margin: 12px 0 10px;
  color: var(--gray-900);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.intro-strip p,
.page-hero p {
  color: var(--slate-500);
  font-size: 17px;
  line-height: 1.8;
  max-width: 760px;
}

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

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

.section-heading.light h2,
.section-heading.light a {
  color: var(--white);
}

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

.category-tile {
  min-height: 180px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -52px;
  bottom: -52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(249, 115, 22, 0.14));
}

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

.category-tile span {
  color: var(--orange-600);
  font-weight: 800;
}

.category-tile strong {
  font-size: 24px;
  line-height: 1.2;
}

.category-tile em {
  color: var(--slate-500);
  font-style: normal;
  line-height: 1.65;
}

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

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

.movie-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #fef3c7);
}

.poster-link img {
  aspect-ratio: 2 / 3;
  transition: transform 0.35s ease;
}

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

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

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

.movie-card h3 {
  margin: 0 0 9px;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-meta span,
.small-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--gray-100);
}

.movie-desc {
  min-height: 68px;
  color: #4b5563;
  line-height: 1.65;
  font-size: 14px;
}

.rank-section {
  max-width: none;
  margin: 30px 0;
  padding: 64px max(24px, calc((100vw - 1280px) / 2 + 24px));
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

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

.rank-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  min-height: 154px;
}

.rank-cover {
  position: relative;
  background: #111827;
}

.rank-cover img {
  height: 100%;
  aspect-ratio: 2 / 3;
}

.rank-number {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  font-weight: 900;
}

.rank-info {
  padding: 16px;
}

.rank-info h3 {
  margin: 0 0 8px;
}

.rank-info p {
  color: var(--slate-500);
  line-height: 1.55;
  font-size: 14px;
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 76px 24px 26px;
}

.compact-hero > div {
  padding: 40px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.filter-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 20px;
  align-items: end;
  margin-bottom: 26px;
  padding: 22px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--gray-900);
  background: var(--gray-50);
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

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

.category-panel {
  overflow: hidden;
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-panel-link {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 250px;
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  background: #111827;
}

.category-posters img {
  height: 123px;
}

.category-panel-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-panel-body h2 {
  margin: 12px 0;
  font-size: 30px;
}

.category-panel-body p {
  color: var(--slate-500);
  line-height: 1.7;
}

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

.detail-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 24px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 10px 0 20px;
  color: var(--slate-500);
  font-size: 14px;
}

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

.detail-card {
  overflow: hidden;
  border-radius: 30px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.player-shell {
  position: relative;
  background: #000000;
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.64));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 18px 40px rgba(234, 88, 12, 0.38);
  font-size: 34px;
  text-indent: 6px;
}

.player-overlay strong {
  font-size: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  padding: 34px;
}

.detail-main h1 {
  margin-top: 16px;
}

.detail-one-line {
  color: var(--slate-700);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin: 18px 0 24px;
}

.text-section {
  margin-top: 30px;
}

.text-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.text-section p {
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-link {
  display: block;
  padding: 15px 17px;
  border-radius: 16px;
  color: #9a3412;
  background: #fff7ed;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.side-link:hover {
  transform: translateX(4px);
  background: #ffedd5;
}

.related-section {
  padding-top: 46px;
}

.site-footer {
  margin-top: 48px;
  color: #d1d5db;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-brand h2,
.site-footer h3 {
  color: var(--white);
}

.footer-brand p {
  max-width: 650px;
  color: #9ca3af;
  line-height: 1.8;
}

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

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

.site-footer a {
  color: #9ca3af;
  transition: color 0.2s ease;
}

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

.footer-copy {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
}

.is-filtered-out {
  display: none !important;
}

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

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

  .filter-panel,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .filter-controls {
    grid-template-columns: repeat(2, 1fr);
  }

  .rank-grid,
  .rank-page .rank-list {
    grid-template-columns: 1fr;
  }
}

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

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

  .mobile-nav.is-open {
    display: block;
  }

  .hero-carousel {
    height: auto;
    min-height: 640px;
  }

  .hero-slide {
    position: absolute;
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 78px 24px 72px;
  }

  .hero-poster {
    max-width: 230px;
    transform: none;
  }

  .intro-strip,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .category-posters {
    height: 220px;
  }

  .category-posters img {
    height: 108px;
  }

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

@media (max-width: 620px) {
  .header-inner {
    padding: 0 16px;
  }

  .logo {
    font-size: 19px;
  }

  .section-wrap,
  .page-hero,
  .detail-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .compact-hero > div,
  .detail-content {
    padding: 24px;
  }

  .movie-grid,
  .large-grid,
  .category-grid,
  .category-panel-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-arrow {
    display: none;
  }
}
