:root {
  color-scheme: light;
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --teal: #0d9488;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.10);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  padding: 0 24px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  transition: transform 0.28s ease;
}

.brand:hover .brand-mark {
  transform: rotate(12deg) scale(1.05);
}

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

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

.nav-link {
  font-weight: 650;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #dffaff;
  transform: translateY(-1px);
}

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

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

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

.mobile-link {
  font-weight: 650;
  color: rgba(255, 255, 255, 0.94);
}

.page-shell,
.section-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
}

.hero {
  position: relative;
  height: 60vh;
  min-height: 430px;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.02));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #fff;
}

.hero-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--cyan);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 650px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  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(--cyan);
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.35);
}

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

.btn-light {
  color: var(--slate-800);
  background: rgba(255, 255, 255, 0.92);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 18px;
  transform: translateY(-50%);
}

.hero-next {
  right: 18px;
  transform: translateY(-50%);
}

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

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

.hero-dot.active {
  width: 34px;
  background: #fff;
}

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

.section-title h1,
.section-title h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.section-title p {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--slate-600);
  line-height: 1.75;
}

.slider-wrap {
  position: relative;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 220px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 22px;
  scroll-snap-type: x proximity;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--slate-200);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.card-body {
  padding: 14px;
}

.card-body h2,
.card-body h3 {
  min-height: 42px;
  margin: 0 0 8px;
  color: var(--slate-800);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-body p {
  min-height: 40px;
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta,
.tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-meta {
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 700;
  justify-content: space-between;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--cyan-dark);
  background: #ecfeff;
  font-size: 12px;
  font-weight: 750;
}

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

.category-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  color: var(--slate-800);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-covers img {
  aspect-ratio: 2 / 3;
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
  background: var(--slate-200);
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.category-card p {
  margin: 0 0 12px;
  color: var(--slate-600);
  line-height: 1.65;
}

.category-card span {
  color: var(--cyan);
  font-weight: 800;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 150px;
  gap: 14px;
  padding: 18px;
  margin-bottom: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-panel select {
  min-height: 46px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: var(--slate-800);
  outline: none;
  background: #fff;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-poster {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  aspect-ratio: 2 / 3;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h2,
.rank-info h3 {
  margin: 2px 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

.rank-info p {
  margin: 0 0 12px;
  color: var(--slate-600);
  line-height: 1.65;
}

.rank-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--slate-500);
  font-weight: 750;
  font-size: 13px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--slate-900);
  color: #fff;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.55;
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.82));
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  background: var(--slate-200);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumb {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-copy p {
  margin: 0 0 18px;
  color: #e5e7eb;
  font-size: 17px;
  line-height: 1.75;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  font-weight: 750;
}

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

.player-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 20px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border: 0;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.92);
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease;
}

.big-play:hover {
  transform: scale(1.06);
}

.detail-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px 44px;
  display: grid;
  gap: 24px;
}

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

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: var(--slate-800);
}

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

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

.site-footer {
  color: #fff;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 34px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #fff;
  font-size: 22px;
  font-weight: 850;
}

.footer-logo span {
  color: #22d3ee;
}

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

.site-footer p,
.site-footer a {
  display: block;
  margin: 0 0 10px;
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 14px;
}

.site-footer a:hover {
  color: #22d3ee;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 60px 20px;
  text-align: center;
  color: var(--slate-500);
}

@media (max-width: 1120px) {
  .grid-cards,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 500px;
  }

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

  .hero-control {
    display: none;
  }

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

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

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

  .detail-poster {
    max-width: 240px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .page-shell,
  .section-shell,
  .player-section,
  .detail-content {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .category-grid,
  .footer-grid,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .horizontal-row {
    grid-auto-columns: minmax(150px, 170px);
  }

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

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

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

  .player-box,
  .content-card {
    border-radius: 18px;
  }
}
