:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-500: #f97316;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 10px 26px rgba(17, 24, 39, 0.09);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--amber-700);
  background: var(--white);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

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

.nav-link {
  position: relative;
  padding: 22px 0;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 16px;
  width: 0;
  height: 3px;
  border-radius: 99px;
  background: var(--white);
  transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: var(--white);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  color: var(--white);
  background: #111827;
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.68) 45%, rgba(17, 24, 39, 0.18) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.1) 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  align-items: center;
  gap: 44px;
}

.hero-copy {
  padding-top: 18px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.22);
  color: var(--amber-100);
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

.hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
}

.hero-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.94);
  font-weight: 700;
}

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

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

.primary-btn {
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-600), var(--orange-500));
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.35);
}

.secondary-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

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

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

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

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

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

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.38);
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.62);
}

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

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

.main-space {
  display: grid;
  gap: 54px;
  padding: 50px 0 72px;
}

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

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

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

.section-link {
  min-height: 40px;
  color: var(--amber-700);
  background: var(--amber-100);
}

.horizontal-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x proximity;
}

.horizontal-row .movie-card {
  width: 270px;
  flex: 0 0 270px;
  scroll-snap-align: start;
}

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

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--gray-200));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.year-badge,
.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.year-badge {
  top: 10px;
  right: 10px;
  padding: 7px 10px;
  background: rgba(17, 24, 39, 0.68);
  font-size: 12px;
}

.type-badge {
  left: 10px;
  bottom: 10px;
  padding: 7px 10px;
  background: rgba(217, 119, 6, 0.9);
  font-size: 12px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.35);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 45px;
  margin: 8px 0 0;
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.55;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 700;
}

.movie-meta span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.feature-panel,
.category-panel {
  padding: 28px;
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.warm-panel {
  padding: 28px;
  border-radius: 26px;
  background: linear-gradient(90deg, var(--amber-50), #fff7ed);
  box-shadow: var(--shadow-soft);
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  border-radius: 20px;
  color: var(--gray-900);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--gray-500);
}

.category-count {
  display: inline-flex;
  margin-top: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  font-weight: 800;
}

.page-hero {
  padding: 58px 0 38px;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.34), transparent 34%),
    linear-gradient(135deg, #111827 0%, #7c2d12 100%);
}

.page-hero .container {
  display: grid;
  gap: 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--white);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: center;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-panel h2 {
  margin: 0;
  font-size: 24px;
}

.filter-panel p {
  margin: 6px 0 0;
  color: var(--gray-500);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  gap: 12px;
}

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

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

.filter-empty {
  grid-column: 1 / -1;
  padding: 16px;
  border-radius: 16px;
  color: var(--gray-700);
  background: var(--amber-50);
  font-weight: 700;
  text-align: center;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.rank-poster img {
  width: 80px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: var(--gray-200);
}

.rank-info h3 {
  margin: 0;
  font-size: 17px;
}

.rank-info p {
  margin: 5px 0 0;
  color: var(--gray-500);
  font-size: 13px;
}

.rank-score {
  color: var(--amber-700);
  font-size: 18px;
  font-weight: 900;
}

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

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.player-frame {
  position: relative;
  overflow: hidden;
  background: #000000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
  box-shadow: 0 22px 42px rgba(217, 119, 6, 0.42);
}

.play-ring::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid var(--white);
}

.player-cover span:last-child {
  font-size: 18px;
  font-weight: 900;
}

.detail-card {
  padding: 28px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

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

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

.side-card {
  padding: 20px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-link img {
  width: 72px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: var(--gray-200);
}

.side-link h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.side-link p {
  margin: 4px 0 0;
  color: var(--gray-500);
  font-size: 12px;
}

.site-footer {
  margin-top: 40px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 34px;
  padding: 42px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer p {
  margin: 0;
}

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

.footer-links a:hover {
  color: var(--amber-100);
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: none;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.35);
  font-weight: 900;
}

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 620px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 24px;
    padding: 46px 0 72px;
  }

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

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

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

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

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

@media (max-width: 640px) {
  .container,
  .header-inner,
  .mobile-nav {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 20px;
  }

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

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

  .hero-arrow {
    display: none;
  }

  .main-space {
    gap: 38px;
    padding: 36px 0 58px;
  }

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

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

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

  .movie-card p {
    min-height: auto;
  }

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

  .feature-panel,
  .category-panel,
  .warm-panel,
  .detail-card {
    padding: 20px;
  }

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

  .rank-score {
    grid-column: 2;
  }

  .rank-poster img {
    width: 58px;
  }
}
