:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --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;
  --black: #000000;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: var(--gray-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.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-600));
  box-shadow: 0 8px 24px rgba(185, 85, 12, 0.28);
}

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

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--amber-600);
  background: var(--white);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

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

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 3px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--white);
  border-radius: 999px;
  transition: transform 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.48) 55%, rgba(0, 0, 0, 0.08));
}

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

.hero-pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--white);
  background: var(--amber-600);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
}

.eyebrow {
  color: var(--amber-700);
  background: var(--amber-100);
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

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

.hero-actions,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.btn-primary {
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.28);
}

.btn-primary:hover,
.section-more:hover {
  background: var(--amber-700);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  border: 0;
  border-radius: 999px;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.search-panel {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
  margin-top: -38px;
  position: relative;
  z-index: 6;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.search-panel h2 {
  margin: 10px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.quick-links a {
  padding: 10px 16px;
  color: var(--amber-700);
  background: var(--amber-50);
  border: 1px solid var(--amber-100);
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.quick-links a:hover {
  background: var(--amber-100);
  transform: translateY(-1px);
}

.section-block {
  padding-top: 64px;
  padding-bottom: 64px;
}

.soft-bg,
.category-section {
  background: linear-gradient(135deg, var(--amber-50), #fff7ed);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.section-line {
  flex: 1;
  height: 4px;
  min-width: 40px;
  background: linear-gradient(90deg, var(--amber-600), rgba(217, 119, 6, 0));
  border-radius: 999px;
}

.section-more,
.text-link {
  color: var(--white);
  background: var(--amber-600);
}

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

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

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

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

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--gray-200);
}

.compact-grid .card-cover,
.category-movie-grid .card-cover,
.related-grid .card-cover {
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover .card-cover img,
.category-tile:hover img,
.rank-item:hover img,
.side-link:hover img {
  transform: scale(1.08);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.05) 60%);
  opacity: 0.82;
}

.card-badge,
.card-duration,
.card-play {
  position: absolute;
  z-index: 2;
  color: var(--white);
  border-radius: 8px;
  font-weight: 700;
}

.card-badge {
  top: 12px;
  left: 12px;
  padding: 4px 9px;
  background: var(--amber-600);
  font-size: 12px;
}

.card-duration {
  right: 12px;
  bottom: 12px;
  padding: 4px 9px;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
}

.card-play {
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: rgba(217, 119, 6, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-body {
  padding: 18px;
}

.card-body h3,
.card-body h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

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

.card-body p,
.rank-content p {
  display: -webkit-box;
  margin: 0 0 14px;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 12px;
}

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

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

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px 120px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

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

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: var(--gray-200);
}

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

.rank-content h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.35;
}

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

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

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

.category-tile a {
  position: relative;
  display: block;
  min-height: 260px;
  padding: 22px;
  color: var(--white);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.48s ease;
}

.category-tile a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  display: block;
  margin-top: 132px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.inner-hero {
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
  padding: 52px 0;
}

.inner-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
}

.inner-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 26px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  color: var(--gray-900);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.category-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--gray-200);
}

.category-collage a {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.category-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-top {
  color: var(--white);
  background: radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.32), transparent 32%), linear-gradient(135deg, #101827, #1f2937 58%, #111827);
  padding: 34px 0 56px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 30px;
  align-items: center;
}

.detail-player-card {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
}

.player-shell {
  position: relative;
  background: var(--black);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.14));
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 5px;
  background: var(--amber-600);
  border-radius: 999px;
  font-size: 38px;
  box-shadow: 0 18px 38px rgba(217, 119, 6, 0.42);
}

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

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
}

.detail-info p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-tags span {
  padding: 7px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-weight: 700;
}

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

.detail-meta-grid div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
}

.detail-meta-grid strong,
.detail-meta-grid span {
  display: block;
}

.detail-meta-grid strong {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.detail-meta-grid span {
  margin-top: 4px;
  font-weight: 800;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.content-card,
.side-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

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

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

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

.detail-side {
  position: sticky;
  top: 88px;
}

.side-link {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.side-link:hover {
  background: var(--gray-50);
}

.side-link img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.36s ease;
}

.side-link span {
  color: var(--gray-800);
  font-weight: 800;
  line-height: 1.35;
}

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

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

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

.footer-brand .brand-mark {
  color: var(--white);
  background: var(--amber-600);
}

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

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
}

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

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

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

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

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

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    display: none;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    padding: 10px 16px 16px;
    background: var(--amber-700);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 6px;
  }

  .nav-link::after {
    display: none;
  }

  .hero-carousel {
    height: 520px;
  }

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

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

  .hero-control {
    width: 40px;
    height: 40px;
    font-size: 34px;
  }

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

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

  .section-title {
    flex-wrap: wrap;
  }

  .section-line {
    order: 3;
    flex-basis: 100%;
  }

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

  .card-body {
    padding: 14px;
  }

  .card-body h3,
  .card-body h2 {
    font-size: 16px;
  }

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

  .rank-number {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .rank-content h3 {
    font-size: 16px;
  }

  .detail-top {
    padding-top: 24px;
  }

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

  .content-card,
  .side-card {
    padding: 20px;
  }

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

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

  .movie-grid,
  .compact-grid,
  .category-movie-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .quick-links {
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost,
  .quick-links a,
  .section-more {
    width: 100%;
  }

  .rank-item {
    grid-template-columns: 36px 82px 1fr;
    padding: 10px;
  }
}
