:root {
  --red-900: #7f1d1d;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --orange-600: #ea580c;
  --amber-300: #fcd34d;
  --teal-900: #134e4a;
  --cyan-800: #155e75;
  --blue-700: #1d4ed8;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 16px 38px rgba(15, 23, 42, 0.14);
  --shadow-xl: 0 28px 70px rgba(15, 23, 42, 0.26);
  --radius-lg: 16px;
  --radius-xl: 22px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red-600), var(--orange-600));
  color: var(--white);
  font-size: 22px;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

.brand-text {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--gray-600);
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  background: #fee2e2;
  color: var(--red-700);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--gray-900);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 82% 18%, rgba(252, 211, 77, 0.34), transparent 28%), linear-gradient(135deg, #7f1d1d, #9a3412 48%, #b45309);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.28;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18) 58%, rgba(0, 0, 0, 0.42));
}

.hero-track {
  position: relative;
  z-index: 2;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 48px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition: opacity 680ms ease, transform 680ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffedd5;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero h1 {
  max-width: 720px;
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero h1 span {
  color: var(--amber-300);
}

.hero p {
  max-width: 660px;
  margin: 0 0 30px;
  color: #f3f4f6;
  font-size: clamp(17px, 2vw, 21px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.btn-primary {
  background: var(--white);
  color: var(--red-900);
  box-shadow: 0 14px 30px rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: #fffbeb;
}

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.86);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--red-900);
}

.btn-red {
  background: linear-gradient(135deg, var(--red-600), var(--orange-600));
  color: var(--white);
  box-shadow: 0 16px 32px rgba(220, 38, 38, 0.24);
}

.hero-poster-panel {
  position: relative;
  display: grid;
  gap: 18px;
}

.hero-main-poster {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-xl);
}

.hero-main-poster img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transition: transform 500ms ease;
}

.hero-main-poster:hover img {
  transform: scale(1.05);
}

.hero-main-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
}

.hero-poster-caption {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  z-index: 2;
}

.hero-poster-caption strong {
  display: block;
  font-size: 24px;
}

.hero-poster-caption span {
  color: #fde68a;
  font-weight: 800;
}

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

.hero-tile {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.hero-tile img {
  width: 100%;
  height: 104px;
  object-fit: cover;
  filter: saturate(1.08);
}

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

.hero-tile span {
  position: absolute;
  right: 10px;
  bottom: 8px;
  left: 10px;
  z-index: 2;
  overflow: hidden;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-controls {
  position: absolute;
  right: 0;
  bottom: 36px;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-dots {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.hero-dot {
  width: 32px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
  background: var(--amber-300);
}

.hero-arrows {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 22px;
  backdrop-filter: blur(12px);
}

.section {
  padding: 72px 0;
}

.section-white {
  background: var(--white);
}

.section-dark {
  background: linear-gradient(135deg, var(--teal-900), var(--cyan-800));
  color: var(--white);
}

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

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

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

.section-dark .section-heading p {
  color: #99f6e4;
}

.section-link {
  flex: 0 0 auto;
  color: var(--red-700);
  font-weight: 900;
}

.section-dark .section-link {
  color: #99f6e4;
}

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

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

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

.feature-card,
.movie-card,
.compact-card,
.category-card,
.info-panel,
.search-panel {
  background: var(--white);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.feature-card {
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feature-card:hover,
.movie-card:hover,
.compact-card:hover,
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.feature-poster img,
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.feature-card:hover img,
.movie-card:hover img {
  transform: scale(1.07);
}

.feature-content,
.card-body {
  padding: 18px;
}

.pill,
.tag-row span,
.score-badge,
.rank-badge,
.detail-tag,
.category-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.pill {
  margin-bottom: 10px;
  padding: 5px 10px;
  background: #fee2e2;
  color: var(--red-700);
  font-size: 12px;
}

.feature-content h3,
.card-title,
.compact-card h3 {
  display: block;
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
}

.movie-card {
  overflow: hidden;
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.46), transparent 58%);
}

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  background: rgba(17, 24, 39, 0.82);
  color: #fde68a;
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span,
.detail-tag,
.category-chip {
  padding: 5px 9px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 12px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: auto 120px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.section-dark .compact-card {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--white);
  backdrop-filter: blur(16px);
}

.section-dark .compact-card h3,
.section-dark .compact-card p,
.section-dark .compact-card span {
  color: var(--white);
}

.compact-card img {
  width: 120px;
  height: 82px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-badge {
  width: 42px;
  height: 42px;
  justify-content: center;
  background: var(--red-600);
  color: var(--white);
  font-size: 18px;
}

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

.category-card {
  display: block;
  padding: 22px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 14px;
}

.cta-band {
  padding: 56px 0;
  background: linear-gradient(90deg, var(--red-600), var(--orange-600));
  color: var(--white);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.cta-inner h2 {
  margin: 0 0 8px;
  font-size: 32px;
}

.cta-inner p {
  margin: 0;
  color: #ffedd5;
}

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

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #ffedd5;
  font-size: 19px;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
  gap: 30px;
  padding: 34px 0 72px;
}

.player-shell {
  overflow: hidden;
  margin-bottom: 24px;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow-xl);
}

.player-box {
  position: relative;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
  pointer-events: none;
  transition: opacity 180ms ease;
}

.player-overlay.is-hidden {
  opacity: 0;
}

.player-start {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red-700);
  font-size: 30px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
}

.info-panel,
.search-panel {
  padding: 24px;
}

.info-panel h1,
.info-panel h2,
.search-panel h2 {
  margin: 0 0 14px;
  line-height: 1.2;
}

.info-panel h1 {
  font-size: clamp(28px, 5vw, 42px);
}

.info-panel h2,
.search-panel h2 {
  font-size: 24px;
}

.info-panel p {
  margin: 0 0 14px;
  color: var(--gray-700);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.side-card {
  position: sticky;
  top: 92px;
}

.side-poster {
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
  box-shadow: var(--shadow-md);
}

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

.side-meta {
  margin-top: 18px;
  padding: 20px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.side-meta dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  margin: 0;
}

.side-meta dt {
  color: var(--gray-500);
  font-weight: 800;
}

.side-meta dd {
  margin: 0;
  color: var(--gray-900);
  font-weight: 800;
}

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

.search-box {
  position: relative;
  max-width: 760px;
  margin-top: 28px;
}

.search-input {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  padding: 0 22px;
  color: var(--gray-900);
  box-shadow: var(--shadow-md);
  outline: none;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.empty-state {
  padding: 52px 20px;
  text-align: center;
  color: var(--gray-600);
}

.site-footer {
  padding: 56px 0;
  background: #0f172a;
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 34px;
}

.footer-grid p {
  color: #94a3b8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  color: #cbd5e1;
}

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

@media (max-width: 1060px) {
  .grid-cards.wide,
  .grid-cards,
  .search-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .hero-poster-panel {
    display: none;
  }

  .hero h1,
  .hero p {
    max-width: 820px;
  }
}

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

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

  .mobile-menu.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .hero,
  .hero-track {
    min-height: 560px;
  }

  .hero-slide {
    align-content: center;
    min-height: 560px;
  }

  .hero-controls {
    bottom: 20px;
  }

  .grid-feature,
  .grid-cards.wide,
  .grid-cards,
  .compact-list,
  .related-grid,
  .search-results,
  .footer-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .compact-card img {
    width: 96px;
    height: 72px;
  }

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

  .section {
    padding: 52px 0;
  }
}

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

  .brand-text {
    font-size: 16px;
  }

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

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

  .btn {
    width: 100%;
  }

  .compact-card {
    grid-template-columns: 1fr;
  }

  .compact-card img {
    width: 100%;
    height: 170px;
  }
}
