:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-950: #172554;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 28px rgba(37, 99, 235, 0.15);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--slate-50), #ffffff 420px);
  color: var(--slate-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-700), var(--blue-800));
  box-shadow: 0 12px 30px rgba(30, 64, 175, 0.25);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}

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

.brand-name {
  font-size: 20px;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link,
.mobile-nav-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.header-search input {
  width: 210px;
  height: 38px;
  border: 0;
  outline: none;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--slate-900);
}

.header-search button,
.hero-search button,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  color: var(--blue-700);
  background: var(--white);
  font-weight: 800;
  cursor: pointer;
}

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

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: var(--white);
  background: var(--blue-950);
}

.hero-viewport {
  min-height: 680px;
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: 48px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 82px 0 118px;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg,
.hero-shade {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.hero-bg {
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.42;
}

.hero-shade {
  z-index: -1;
  background:
    radial-gradient(circle at 78% 20%, rgba(96, 165, 250, 0.38), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.82) 55%, rgba(15, 23, 42, 0.88));
}

.hero-content {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.compact-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 680px;
  margin: 22px 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

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

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

.btn-primary {
  color: var(--blue-700);
  background: var(--white);
  box-shadow: 0 16px 28px rgba(255, 255, 255, 0.18);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.btn-ghost.dark {
  color: var(--blue-700);
  background: var(--blue-50);
  box-shadow: inset 0 0 0 1px var(--blue-100);
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.18));
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 78px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

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

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  font-size: 32px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
  width: 28px;
  background: var(--white);
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 11;
  display: flex;
  width: min(720px, calc(100% - 32px));
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  transform: translateX(-50%);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  color: var(--white);
  background: transparent;
  padding: 0 16px;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 24px;
}

.page-top {
  padding-top: 34px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--slate-500);
}

.section-heading a {
  color: var(--blue-700);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 46px rgba(37, 99, 235, 0.22);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.54));
  opacity: 0.8;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28);
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(37, 99, 235, 0.88);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.35;
}

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

.card-meta,
.card-desc {
  margin: 0;
  color: var(--slate-500);
  font-size: 13px;
}

.card-desc {
  min-height: 42px;
  margin: 8px 0 12px;
  color: var(--slate-700);
}

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

.category-panel,
.category-overview-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.category-panel {
  min-height: 210px;
  background:
    radial-gradient(circle at 92% 10%, rgba(59, 130, 246, 0.16), transparent 28%),
    var(--white);
}

.category-panel span,
.category-overview-head span {
  color: var(--blue-700);
  font-weight: 900;
}

.category-panel strong {
  font-size: 34px;
  line-height: 1;
}

.category-panel small,
.category-overview-card p {
  color: var(--slate-500);
}

.category-panel em {
  display: grid;
  gap: 5px;
  font-style: normal;
  font-size: 13px;
}

.category-panel em a:hover {
  color: var(--blue-700);
}

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

.compact-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.compact-card img {
  width: 72px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--blue-50);
}

.compact-info {
  min-width: 0;
}

.compact-info strong,
.compact-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-info em {
  color: var(--slate-500);
  font-style: normal;
  font-size: 12px;
}

.compact-rank {
  color: var(--blue-700);
  font-weight: 900;
}

.compact-hero,
.detail-hero {
  border-radius: var(--radius-xl);
  padding: 38px;
  background:
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.22), transparent 32%),
    linear-gradient(135deg, var(--slate-900), var(--blue-800));
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.compact-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  max-width: 720px;
  margin-top: 24px;
}

.filter-bar-wide {
  grid-template-columns: 1fr 170px 170px;
  max-width: 900px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 46px;
  border: 0;
  outline: none;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--slate-900);
  background: rgba(255, 255, 255, 0.95);
}

.result-count {
  margin: 24px 0 18px;
  color: var(--slate-500);
  font-weight: 800;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.mini-movie-list a {
  display: grid;
  padding: 10px 0;
  border-top: 1px solid var(--slate-100);
  font-weight: 800;
}

.mini-movie-list small {
  color: var(--slate-500);
  font-weight: 500;
}

.full-ranking-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.full-ranking-list a {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.full-ranking-list span {
  color: var(--blue-700);
  font-weight: 900;
}

.full-ranking-list em {
  color: var(--slate-500);
  font-style: normal;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.28);
}

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

.detail-one-line {
  max-width: 760px;
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.detail-meta div {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.detail-meta dt {
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: var(--white);
}

.player-section,
.detail-content,
.detail-page section:last-child {
  margin-top: 32px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #020617;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(2, 6, 23, 0.52));
  cursor: pointer;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--white);
  font-size: 34px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.play-overlay strong {
  font-size: 20px;
}

.player-shell.is-playing .play-overlay {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.detail-content article {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-content h2 {
  margin-top: 0;
}

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

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 38px;
}

.site-footer h2,
.site-footer h3 {
  margin-top: 0;
  color: var(--white);
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

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

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

  .movie-grid,
  .category-panels,
  .category-overview,
  .compact-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .mobile-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .hero-carousel,
  .hero-viewport {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 58px;
  }

  .hero-poster {
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-search,
  .filter-bar,
  .filter-bar-wide {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .hero-search {
    display: grid;
  }

  .hero-search button {
    min-height: 44px;
  }

  .movie-grid,
  .featured-grid,
  .category-panels,
  .category-overview,
  .compact-strip,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .full-ranking-list a {
    grid-template-columns: 58px 1fr;
  }

  .full-ranking-list em {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 22px, 1180px);
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-carousel,
  .hero-viewport {
    min-height: 720px;
  }

  .hero-content h1,
  .compact-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-summary,
  .detail-one-line {
    font-size: 16px;
  }

  .movie-grid,
  .featured-grid,
  .category-panels,
  .category-overview,
  .compact-strip,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .compact-card img {
    width: 86px;
    height: 64px;
  }

  .compact-hero,
  .detail-hero {
    padding: 28px 22px;
  }

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

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