:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--white);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--slate-900), var(--blue-600));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.brand-text small {
  color: var(--slate-500);
  font-size: 12px;
  margin-top: 4px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  color: var(--slate-600);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: var(--slate-100);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--slate-800);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: var(--white);
  border-top: 1px solid var(--slate-200);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-weight: 650;
}

.mobile-link.active {
  color: var(--blue-700);
  background: var(--blue-50);
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.35), transparent 32%), linear-gradient(135deg, var(--slate-950), var(--slate-800) 45%, var(--slate-900));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.36;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.35));
}

.hero-inner {
  position: relative;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 48px;
  padding: 84px 0 96px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 7px 12px;
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 750;
}

.hero h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--slate-300);
  font-size: clamp(17px, 2vw, 22px);
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: var(--slate-600);
  background: var(--slate-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero .tag {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 780;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: var(--blue-600);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: var(--blue-700);
}

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

.btn-light {
  color: var(--blue-700);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(100%, 360px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.hero-card-float {
  position: absolute;
  left: -34px;
  bottom: 34px;
  max-width: 260px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.hero-card-float strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.hero-card-float span {
  color: var(--slate-300);
  font-size: 13px;
}

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

.hero-dot {
  width: 34px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--white);
}

.main-section {
  padding: 72px 0;
}

.main-section.compact {
  padding: 42px 0 72px;
}

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

.section-head h2,
.page-head h1,
.detail-title h1 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.section-head p,
.page-head p,
.detail-title p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--slate-600);
  font-size: 16px;
}

.section-more {
  flex: 0 0 auto;
  color: var(--blue-700);
  font-weight: 760;
}

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

.feature-card,
.category-tile,
.panel,
.filter-panel {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.feature-card {
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--blue-700);
  background: var(--blue-50);
  border-radius: 16px;
  font-size: 24px;
}

.feature-card h2,
.category-tile h2,
.panel h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.feature-card p,
.category-tile p,
.panel p {
  margin: 0;
  color: var(--slate-600);
}

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

.movie-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  overflow: hidden;
  display: block;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(2, 6, 23, 0.66));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.play-pill {
  right: 12px;
  bottom: 12px;
  height: 34px;
  padding: 0 12px;
  color: var(--white);
  background: rgba(37, 99, 235, 0.94);
  border-radius: 999px;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-pill {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  color: var(--white);
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.26);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

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

.card-body h2 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.card-body h2 a:hover {
  color: var(--blue-700);
}

.card-body p {
  flex: 1;
  margin: 0 0 14px;
  color: var(--slate-600);
  font-size: 14px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 68%);
}

.category-tile .tile-count {
  display: inline-flex;
  margin-top: 18px;
  padding: 7px 11px;
  color: var(--blue-700);
  background: var(--blue-50);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

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

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 15px;
  background: var(--white);
  transition: border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-link:hover {
  border-color: #bfdbfe;
  transform: translateX(4px);
  box-shadow: var(--shadow-soft);
}

.rank-link span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--blue-700);
  background: var(--blue-50);
  border-radius: 12px;
  font-weight: 850;
}

.rank-link strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-link em {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(160px, 0.6fr));
  gap: 14px;
}

.control {
  display: grid;
  gap: 7px;
}

.control label {
  color: var(--slate-700);
  font-size: 13px;
  font-weight: 780;
}

.control input,
.control select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--slate-900);
  border: 1px solid var(--slate-300);
  border-radius: 13px;
  background: var(--white);
  outline: none;
}

.control input:focus,
.control select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 18px;
  color: var(--slate-500);
  font-size: 14px;
}

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

.detail-hero {
  padding: 28px 0 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
  color: var(--white);
}

.detail-hero .breadcrumb {
  color: var(--slate-300);
}

.detail-title h1 {
  color: var(--white);
}

.detail-title p {
  color: var(--slate-300);
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.11);
  font-size: 13px;
  font-weight: 750;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--white);
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.74));
  cursor: pointer;
}

.play-cover span {
  display: block;
}

.play-cover .play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-600);
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.3);
  font-size: 28px;
}

.play-cover .play-text {
  font-size: 18px;
  font-weight: 850;
}

.player-shell.is-playing .play-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.panel {
  padding: 24px;
}

.panel h2 {
  margin-bottom: 14px;
}

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

.side-card {
  position: sticky;
  top: 96px;
  align-self: start;
}

.side-poster {
  overflow: hidden;
  border-radius: 20px;
  background: var(--slate-900);
  box-shadow: var(--shadow-soft);
}

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

.info-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.info-list div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--slate-200);
}

.info-list span {
  color: var(--slate-500);
}

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

.site-footer {
  margin-top: 72px;
  color: var(--slate-300);
  background: var(--slate-950);
}

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

.footer-brand {
  color: var(--white);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.site-footer p {
  max-width: 430px;
  color: var(--slate-400);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 7px 10px;
  color: var(--slate-300);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.footer-links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: var(--slate-500);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hidden-card {
  display: none !important;
}

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

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

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

  .side-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 70px 0 90px;
  }

  .hero-poster {
    justify-self: start;
    width: min(78vw, 330px);
  }

  .hero-card-float {
    left: 18px;
    right: 18px;
    bottom: 20px;
  }

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

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

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

  .nav-wrap {
    min-height: 66px;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .hero-slider,
  .hero-inner {
    min-height: 720px;
  }

  .hero-actions,
  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .movie-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body {
    padding: 14px;
  }

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

  .card-body p,
  .tag-row {
    display: none;
  }

  .panel {
    padding: 18px;
  }
}
