:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --cyan-400: #22d3ee;
  --white: #ffffff;
  --gold: #f59e0b;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-deep: 0 30px 80px rgba(2, 6, 23, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--slate-50), #ffffff 28%, #eef4ff);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-950), var(--slate-900) 52%, var(--slate-800));
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.24);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

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

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(59, 130, 246, 0.22);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

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

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

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

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.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-slide img,
.detail-bg,
.category-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 22%, rgba(37, 99, 235, 0.42), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.76) 42%, rgba(15, 23, 42, 0.24)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-bottom: 80px;
}

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

.eyebrow.dark {
  color: var(--blue-600);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(147, 197, 253, 0.28);
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  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(--white);
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-400));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.36);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
}

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

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

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

.hero-search {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 84px;
  width: min(760px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.hero-search input,
.inline-filter input {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--slate-900);
  border-radius: 999px;
  background: var(--white);
}

.hero-search input {
  padding: 14px 20px;
}

.hero-search button,
.inline-filter button {
  border: 0;
  color: var(--white);
  border-radius: 999px;
  background: var(--blue-600);
  font-weight: 900;
  cursor: pointer;
}

.hero-search button {
  padding: 0 26px;
}

.feature-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -42px auto 42px;
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-strip a {
  padding: 20px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-card);
}

.feature-strip strong,
.feature-strip span {
  display: block;
}

.feature-strip strong {
  margin-bottom: 6px;
  font-size: 18px;
}

.feature-strip span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

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

.section-title h2,
.panel-head h2,
.site-footer h2,
.detail-copy h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

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

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

.compact-grid,
.related-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.22s ease, box-shadow 0.22s ease;
}

.movie-card[hidden] {
  display: none;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--blue-600));
}

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

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

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 28px;
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.score {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--gold), #ef4444);
}

.card-content {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 800;
}

.card-content h2 {
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
}

.card-content h2 a:hover {
  color: var(--blue-600);
}

.card-content p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.7;
}

.tag-row span {
  color: var(--blue-700);
  background: #eff6ff;
  border-color: #dbeafe;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: var(--white);
  box-shadow: var(--shadow-card);
}

.category-tile img,
.category-overview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.08));
}

.category-title,
.category-desc {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-title {
  bottom: 50px;
  font-size: 22px;
  font-weight: 900;
}

.category-desc {
  bottom: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: start;
  gap: 28px;
}

.latest-panel {
  width: auto;
  margin: 0;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: linear-gradient(180deg, var(--slate-950), var(--slate-800));
  box-shadow: var(--shadow-deep);
}

.panel-head h2 {
  color: var(--white);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(59, 130, 246, 0.24);
  transform: translateX(3px);
}

.rank-row img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-number,
.rank-score {
  color: #bfdbfe;
  font-weight: 900;
}

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

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

.rank-info em {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 72px 16px;
  text-align: center;
}

.page-hero > div {
  position: relative;
  z-index: 2;
  width: min(900px, 100%);
}

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

.category-hero {
  min-height: 430px;
  text-align: left;
  place-items: center start;
}

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

.category-hero > img {
  position: absolute;
  inset: 0;
}

.inline-filter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(650px, 100%);
  margin-top: 24px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.inline-filter input {
  padding: 13px 18px;
}

.inline-filter button {
  padding: 0 22px;
}

.category-overview-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.category-overview-card a {
  position: relative;
  display: block;
  height: 210px;
  color: var(--white);
  background: var(--slate-900);
}

.category-overview-card a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 62%);
}

.category-overview-card span {
  position: absolute;
  z-index: 2;
  left: 18px;
  bottom: 18px;
  font-size: 24px;
  font-weight: 900;
}

.category-overview-card p {
  min-height: 84px;
  margin: 0;
  padding: 18px;
  color: var(--slate-600);
  line-height: 1.75;
}

.detail-hero {
  min-height: 680px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(2px) saturate(1.1);
  transform: scale(1.02);
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

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

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-deep);
}

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

.detail-info h1 {
  max-width: 820px;
}

.detail-one-line {
  max-width: 790px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
  line-height: 1.8;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.meta-list div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

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

.meta-list dd {
  margin: 6px 0 0;
  color: var(--white);
  font-weight: 800;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow-deep);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(0, 0, 0, 0.38));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-frame.playing .play-layer {
  opacity: 0;
  visibility: hidden;
}

.play-icon {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 28px solid var(--blue-600);
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-copy article {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-copy p {
  margin: 14px 0 0;
  color: var(--slate-700);
  font-size: 17px;
  line-height: 2;
}

.search-form {
  margin-left: auto;
  margin-right: auto;
}

.rank-grid .movie-card:nth-child(-n + 3) .rank-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.site-footer {
  color: #cbd5e1;
  background: var(--slate-950);
}

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

.footer-main p {
  max-width: 560px;
  color: #94a3b8;
  line-height: 1.8;
}

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

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

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

.footer-bottom {
  padding: 20px 16px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

  .feature-strip,
  .split-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-panel {
    position: static;
  }

  .detail-layout {
    grid-template-columns: 240px 1fr;
  }

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

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

  .menu-button {
    display: block;
  }

  .hero {
    height: 82vh;
    min-height: 640px;
  }

  .hero-content {
    justify-content: flex-start;
    padding-top: 86px;
    padding-bottom: 170px;
  }

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

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

  .feature-strip,
  .split-section,
  .detail-copy,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .compact-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

  .detail-poster {
    width: min(260px, 74vw);
  }

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

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

@media (max-width: 520px) {
  .movie-grid,
  .compact-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .nav-shell,
  .mobile-nav,
  .section-shell,
  .split-section,
  .detail-shell,
  .feature-strip {
    width: min(100% - 24px, 1180px);
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}
