:root {
  --color-amber: #d97706;
  --color-amber-dark: #b45309;
  --color-orange: #f97316;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-900: #111827;
  --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.10);
  --shadow-hover: 0 18px 45px rgba(15, 23, 42, 0.18);
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  width: 100%;
  height: auto;
}

.container {
  width: min(100% - 32px, 1280px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-amber), var(--color-orange));
  box-shadow: 0 10px 25px rgba(180, 83, 9, 0.24);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.brand-text {
  font-size: clamp(20px, 3vw, 28px);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
  font-weight: 700;
}

.nav-link {
  opacity: 0.96;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover {
  color: #fef3c7;
  opacity: 1;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 21px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-nav-link {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.10);
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  height: min(540px, 70vh);
  min-height: 420px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

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

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

.hero-slide.is-active img {
  animation: heroZoom 7s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.10));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  color: #ffffff;
  padding: 48px 0;
}

.hero-content-inner {
  max-width: 760px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.82);
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content p {
  margin: 0 0 18px;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.90);
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-meta span,
.movie-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.16);
}

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

.button-primary,
.button-secondary,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-amber), var(--color-orange));
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.34);
}

.button-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.button-primary:hover,
.button-secondary:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  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.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: #ffffff;
}

.main-content {
  padding: 46px 0 26px;
}

.page-hero {
  margin: 36px auto 30px;
  padding: 34px;
  border-radius: var(--radius-xl);
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
  box-shadow: var(--shadow-card);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
}

.page-hero p {
  margin: 0;
  max-width: 820px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
}

.content-section {
  margin-bottom: 58px;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--color-gray-900);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

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

.section-more {
  min-height: 38px;
  color: var(--color-amber-dark);
  background: #fffbeb;
}

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

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

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 285px);
  gap: 22px;
  margin-inline: -16px;
  padding: 4px 16px 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

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

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fde68a, #f97316);
}

.movie-card-large .movie-poster {
  aspect-ratio: 16 / 10;
}

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

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

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.movie-card:hover .play-badge {
  background: rgba(0, 0, 0, 0.32);
  opacity: 1;
}

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

.movie-card h3 {
  margin: 0;
  overflow: hidden;
  color: var(--color-gray-900);
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-one-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--color-gray-600);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 8px;
  color: #d1d5db;
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.movie-tags span,
.detail-tags span {
  padding: 4px 9px;
  color: #b45309;
  background: #fef3c7;
}

.feature-card,
.category-card,
.info-card {
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.feature-card {
  padding: 28px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.20), transparent 46%);
  pointer-events: none;
}

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

.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 22px;
}

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

.category-count {
  position: relative;
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-weight: 800;
}

.search-panel {
  margin-bottom: 30px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.search-row {
  display: grid;
  gap: 8px;
}

.search-label {
  color: var(--color-gray-700);
  font-size: 14px;
  font-weight: 800;
}

.search-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--color-gray-200);
  border-radius: 14px;
  outline: none;
  background: #ffffff;
  color: var(--color-gray-900);
}

.search-input {
  min-height: 48px;
  padding: 0 16px;
  font-size: 16px;
}

.search-input:focus,
.filter-select:focus {
  border-color: var(--color-amber);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.filter-select {
  min-height: 42px;
  padding: 0 12px;
}

.filter-count {
  margin: 12px 0 0;
  color: var(--color-gray-600);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
  font-weight: 900;
}

.rank-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #fde68a, #f97316);
}

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

.rank-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-content p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--color-gray-600);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
}

.player-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow-hover);
}

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

.video-player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.25));
  cursor: pointer;
}

.player-cover-button.is-hidden {
  display: none;
}

.player-play-icon {
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
  box-shadow: 0 14px 32px rgba(217, 119, 6, 0.45);
  font-size: 32px;
}

.player-hint {
  display: block;
  font-size: 18px;
  font-weight: 800;
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

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

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

.detail-block {
  margin-top: 26px;
}

.detail-block h2,
.detail-block h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-block p {
  margin: 0;
  color: var(--color-gray-700);
  line-height: 1.9;
}

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

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

.sidebar-card {
  position: sticky;
  top: 88px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.sidebar-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.sidebar-card .movie-card {
  margin-bottom: 16px;
}

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: #111827;
}

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

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--color-amber);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.back-to-top.is-visible {
  display: block;
}

.hidden-by-filter {
  display: none !important;
}

.sitemap-list {
  columns: 3 260px;
  margin: 0;
  padding-left: 20px;
  line-height: 1.9;
}

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

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

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

  .sidebar-card {
    position: static;
  }
}

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

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

  .hero-carousel {
    min-height: 520px;
  }

  .hero-content {
    padding: 34px 0 54px;
  }

  .hero-control {
    display: none;
  }

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

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

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

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

  .rank-item {
    grid-template-columns: 42px 74px 1fr;
    gap: 12px;
  }

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

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

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

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-one-line {
    min-height: 40px;
    font-size: 13px;
  }

  .page-hero,
  .detail-card,
  .feature-card {
    padding: 22px;
  }
}
