:root {
  --blue: #2563eb;
  --blue-dark: #1e3a8a;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --green: #16a34a;
  --purple: #7c3aed;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #fed7aa);
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--blue);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

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

.nav-link {
  color: var(--gray-600);
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--gray-700);
}

.mobile-menu {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--gray-200);
}

.mobile-menu.open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 44%, #111827 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 12%, rgba(249, 115, 22, 0.38), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(59, 130, 246, 0.55), transparent 30%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.42));
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 82px 0 54px;
}

.hero-slider {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.72fr);
  gap: 46px;
  align-items: center;
}

.hero-slide.active {
  display: grid;
  animation: fadeIn 0.55s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

.hero-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  color: #fff;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span:nth-child(2n),
.card-tags span:nth-child(2n) {
  background: rgba(249, 115, 22, 0.92);
}

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

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

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

.btn-primary {
  color: #fff;
  background: var(--orange);
  box-shadow: 0 14px 26px rgba(249, 115, 22, 0.25);
}

.btn-primary:hover {
  background: var(--orange-dark);
}

.btn-secondary {
  color: var(--blue-dark);
  background: #fff;
}

.btn-outline {
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--gray-200);
}

.hero-poster {
  position: relative;
  height: 470px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.35);
}

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

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  color: #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.active {
  width: 28px;
  background: #fff;
}

.hero-search {
  max-width: 760px;
  margin: 28px auto 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-box span {
  padding-left: 12px;
  color: var(--gray-500);
  font-size: 24px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  color: var(--gray-800);
  background: transparent;
}

.search-box button {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.stats-section {
  padding: 28px 0;
  background: #fff;
}

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

.stat-card {
  padding: 24px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--gray-50);
}

.stat-card strong {
  display: block;
  color: var(--blue);
  font-size: 26px;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--gray-600);
}

.section {
  padding: 72px 0;
  background: #fff;
}

.soft-section {
  background: var(--gray-50);
}

.dark-section {
  color: #fff;
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--gray-800);
}

.section-head p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.section-head.light h2,
.section-head.light p {
  color: #fff;
}

.section-link {
  color: var(--blue);
  font-weight: 800;
}

.section-link.light {
  color: #fed7aa;
}

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

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

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

.dark-section .movie-card {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
}

.card-poster {
  position: relative;
  display: block;
  height: 310px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #fed7aa);
}

.movie-card-small .card-poster {
  height: 250px;
}

.card-poster img {
  transition: transform 0.35s ease;
}

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

.play-float,
.wide-poster span {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #fff;
  background: rgba(37, 99, 235, 0.86);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 10px;
  color: #fff;
  background: var(--orange);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 14px;
  right: auto;
  background: var(--blue);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.35;
  color: var(--gray-800);
}

.card-body h3 a:hover,
.wide-body h3 a:hover {
  color: var(--blue);
}

.card-body p {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  margin: 0 0 14px;
  color: var(--gray-600);
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dark-section .card-body h3,
.dark-section .card-body p {
  color: #fff;
}

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

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

.category-tile {
  min-height: 160px;
  padding: 24px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, var(--orange), #b45309);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, var(--purple), var(--blue));
}

.category-tile:hover {
  transform: translateY(-5px);
}

.category-tile strong {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
}

.category-tile span {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.wide-poster {
  position: relative;
  min-height: 220px;
  overflow: hidden;
}

.wide-body {
  padding: 22px;
}

.wide-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--gray-500);
  font-size: 13px;
}

.wide-top strong {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--orange);
  border-radius: 999px;
}

.wide-body h3 {
  margin: 0 0 10px;
  color: var(--gray-800);
  font-size: 22px;
}

.wide-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 14px;
  color: var(--gray-600);
  line-height: 1.7;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.page-hero {
  padding: 74px 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}

.category-page-hero {
  background: linear-gradient(135deg, var(--gray-900), var(--blue));
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero .search-box {
  max-width: 760px;
}

.category-stack,
.ranking-stack {
  display: grid;
  gap: 44px;
}

.category-overview {
  padding: 28px;
  border-radius: 24px;
  background: var(--gray-50);
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.category-overview h2,
.ranking-block h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.category-overview p {
  margin: 0;
  color: var(--gray-600);
}

.detail-hero {
  padding: 60px 0;
  color: #fff;
  background: linear-gradient(135deg, var(--gray-900), var(--blue-dark));
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  height: 500px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 66px);
  line-height: 1.02;
}

.detail-line {
  max-width: 780px;
  margin: 0 0 18px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.75;
}

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

.detail-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.player-section {
  background: var(--gray-50);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
}

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.16), rgba(17, 24, 39, 0.72));
  cursor: pointer;
}

.player-cover[hidden] {
  display: none;
}

.player-cover span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.3);
}

.player-cover strong {
  font-size: clamp(22px, 4vw, 38px);
}

.detail-content {
  display: grid;
  gap: 24px;
}

.content-card {
  padding: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--gray-800);
}

.content-card p {
  margin: 0;
  color: var(--gray-700);
  line-height: 2;
}

.adjacent-links {
  margin-top: 0;
}

.empty-state {
  margin: 30px 0 0;
  padding: 20px;
  text-align: center;
  color: var(--gray-600);
  border-radius: 16px;
  background: var(--gray-100);
}

.site-footer {
  color: var(--gray-300);
  background: var(--gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 56px 0 36px;
}

.footer-brand {
  margin-bottom: 16px;
  color: #fff;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fff;
}

.site-footer p {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.8;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0;
  color: var(--gray-500);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slider {
    min-height: auto;
  }

  .hero-poster {
    height: 380px;
  }

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

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

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

  .brand {
    font-size: 20px;
  }

  .hero-inner {
    padding: 52px 0 40px;
  }

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

  .hero-poster,
  .detail-poster {
    height: 330px;
  }

  .hero-actions,
  .detail-actions,
  .section-head,
  .category-overview-head,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    flex-wrap: wrap;
  }

  .search-box input {
    flex-basis: calc(100% - 52px);
  }

  .search-box button {
    width: 100%;
  }

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

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

  .wide-poster {
    min-height: 260px;
  }

  .section {
    padding: 52px 0;
  }
}
