:root {
  --blue: #2563eb;
  --cyan: #0891b2;
  --teal: #0d9488;
  --pink: #db2777;
  --purple: #7c3aed;
  --orange: #f97316;
  --red: #ef4444;
  --dark: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 22px 60px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--dark);
  background: #f9fafb;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: 0 12px 30px rgba(8, 145, 178, 0.26);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.logo-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fde047;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 14px;
  background: rgba(0, 0, 0, 0.13);
}

.mobile-link {
  display: inline-block;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 600;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #581c87 50%, #831843);
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(54px);
  opacity: 0.34;
  pointer-events: none;
}

.hero-orb.one {
  width: 320px;
  height: 320px;
  top: 70px;
  left: 5%;
  background: #3b82f6;
}

.hero-orb.two {
  width: 430px;
  height: 430px;
  right: 4%;
  bottom: 40px;
  background: #ec4899;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.95) 0%, rgba(17, 24, 39, 0.68) 46%, rgba(17, 24, 39, 0.15) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.78), rgba(17, 24, 39, 0.05));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1180px) / 2));
  padding: 96px 0 112px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h2 {
  font-size: clamp(34px, 5vw, 58px);
}

.hero p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-tags span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.btn-primary,
.btn-secondary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  box-shadow: 0 16px 34px rgba(219, 39, 119, 0.32);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

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

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
  width: 26px;
  border-radius: 999px;
  background: #fff;
}

.overlap-featured {
  position: relative;
  z-index: 4;
  margin-top: -72px;
  margin-bottom: 70px;
}

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

.page-section {
  margin: 0 0 72px;
}

.page-section.section-white {
  padding: 54px 0;
  background: #fff;
}

.page-section.section-soft {
  padding: 54px 0;
  background: linear-gradient(135deg, #eff6ff, #e0e7ff);
}

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

.section-head h2 {
  display: inline;
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  margin-right: 8px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

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

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

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

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

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

.card-image {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #831843);
}

.card-poster .card-image {
  aspect-ratio: 3 / 4;
}

.card-large .card-image,
.card-wide .card-image {
  aspect-ratio: 16 / 10;
}

.card-wide {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 150px;
}

.card-wide .card-image {
  height: 100%;
  aspect-ratio: auto;
}

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

.movie-card:hover .card-image img {
  transform: scale(1.06);
}

.image-shade,
.card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.25s ease;
}

.movie-card:hover .image-shade,
.movie-card:hover .card-image::after {
  opacity: 1;
}

.play-symbol {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(6px);
}

.play-large {
  width: 66px;
  height: 66px;
  font-size: 22px;
}

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

.corner-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: var(--blue);
}

.gradient-badge {
  background: linear-gradient(90deg, var(--pink), var(--purple));
}

.rank-badge {
  right: auto;
  left: 10px;
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.card-content {
  display: block;
  padding: 13px;
}

.card-title {
  display: -webkit-box;
  margin-bottom: 8px;
  overflow: hidden;
  color: #111827;
  font-weight: 800;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-large .card-title {
  font-size: 20px;
}

.card-desc {
  display: -webkit-box;
  margin-bottom: 13px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

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

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

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

.category-tile:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.page-hero {
  padding: 76px 0;
  color: #fff;
  background:
    radial-gradient(circle at 18% 15%, rgba(59, 130, 246, 0.48), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(236, 72, 153, 0.45), transparent 30%),
    linear-gradient(135deg, #1e3a8a, #581c87 54%, #831843);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.03em;
}

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

.content-wrap {
  padding: 48px 0 0;
}

.search-panel {
  margin: -32px 0 40px;
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: #374151;
  font-weight: 800;
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: #374151;
  background: #f3f4f6;
  cursor: pointer;
  font-weight: 800;
  transition: color 0.2s ease, background 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #fff;
  background: var(--blue);
}

.no-results {
  display: none;
  padding: 42px;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  box-shadow: var(--shadow);
}

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

.player-shell {
  padding: 28px 0 40px;
  background: #050816;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: #fff;
  font-weight: 800;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay strong {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 28px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  box-shadow: 0 18px 38px rgba(219, 39, 119, 0.34);
}

.player-overlay span {
  font-size: 20px;
  font-weight: 900;
}

.detail-shell {
  padding: 42px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.detail-card,
.side-card {
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-card {
  padding: 30px;
}

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.detail-meta .meta-chip {
  color: #1f2937;
  background: #eef2ff;
}

.detail-block {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

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

.detail-block p {
  margin: 0 0 14px;
  color: #374151;
  line-height: 1.9;
}

.review-box {
  padding: 20px;
  border-radius: 16px;
  background: #f9fafb;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  padding: 8px 13px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 700;
}

.side-card {
  position: sticky;
  top: 86px;
  padding: 20px;
}

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

.side-list .card-wide {
  grid-template-columns: 112px 1fr;
  min-height: 118px;
  box-shadow: none;
  border: 1px solid var(--line);
}

.side-list .card-desc {
  display: none;
}

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

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

.footer-logo {
  margin-bottom: 14px;
  color: #fff;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

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

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

.site-footer a:hover {
  color: #60a5fa;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid #1f2937;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

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

.hero-content,
.page-hero .container,
.movie-card,
.category-tile {
  animation: fadeIn 0.55s ease both;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav.is-open {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

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

  .movie-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;
  }

  .side-card {
    position: static;
  }

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

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

  .header-inner {
    height: 58px;
  }

  .logo-text {
    font-size: 18px;
  }

  .hero,
  .hero-slider,
  .hero-slide {
    min-height: 610px;
  }

  .hero-content {
    width: calc(100% - 28px);
    margin: 0 auto;
    padding: 72px 0 130px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 30px;
  }

  .overlap-featured {
    margin-top: -54px;
  }

  .feature-grid,
  .movie-grid.large-grid,
  .movie-grid.wide-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .page-hero {
    padding: 54px 0;
  }

  .search-panel {
    margin-top: -22px;
  }

  .detail-card {
    padding: 22px;
  }

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

@media (max-width: 430px) {
  .movie-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-content {
    padding: 10px;
  }

  .card-title {
    font-size: 14px;
  }

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