:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --orange-600: #ea580c;
  --orange-500: #f97316;
  --orange-100: #ffedd5;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.13);
  --radius: 22px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
  color: var(--white);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.25);
}

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

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

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-500), #fb923c);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  color: #e2e8f0;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: #fb923c;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800));
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  opacity: 0.26;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 30%, rgba(249, 115, 22, 0.25), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.45));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 72px 0;
}

.hero-copy {
  max-width: 760px;
  color: var(--white);
}

.hero-badge,
.card-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 22px;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 30px;
  color: #dbe4ef;
  font-size: clamp(18px, 2.4vw, 24px);
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

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

.btn-primary {
  color: var(--white);
  background: var(--orange-500);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.btn-primary:hover {
  background: var(--orange-600);
}

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

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

.hero-dots button {
  width: 42px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dots button.is-active {
  background: var(--orange-500);
}

.section {
  padding: 72px 0;
}

.section-dark {
  background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
  color: var(--white);
}

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

.section-title span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--orange-500);
  font-weight: 800;
}

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

.section-dark .section-title h2,
.section-dark .section-title span {
  color: var(--white);
}

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

.section-dark .section-title p {
  color: #cbd5e1;
}

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.18);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.36), transparent 36%),
    linear-gradient(135deg, #0f172a, #334155);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(transparent, rgba(2, 6, 23, 0.75));
  pointer-events: none;
}

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

.poster-frame img.is-missing {
  opacity: 0;
}

.movie-card:hover .poster-frame img,
.rank-item:hover .poster-frame img {
  transform: scale(1.08);
}

.movie-card .poster-frame {
  aspect-ratio: 16 / 10;
}

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

.card-body strong {
  color: var(--slate-900);
  font-size: 19px;
  line-height: 1.3;
}

.card-line {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--slate-600);
  font-size: 13px;
}

.card-tags {
  justify-content: flex-start;
  color: var(--orange-600);
}

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

.category-card {
  display: block;
  padding: 28px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px) scale(1.01);
  background: var(--orange-500);
}

.category-card span {
  display: block;
  margin-bottom: 14px;
  font-size: 36px;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-card em {
  color: #e2e8f0;
  font-style: normal;
}

.rank-panel {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 112px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

.rank-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: var(--white);
  font-weight: 900;
}

.rank-thumb {
  height: 70px;
  border-radius: 12px;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  margin-bottom: 5px;
  color: var(--slate-900);
}

.rank-info em {
  color: var(--slate-600);
  font-size: 13px;
  font-style: normal;
}

.rank-score {
  color: var(--orange-600);
  font-weight: 900;
}

.page-hero {
  padding: 58px 0;
  background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
  color: var(--white);
}

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

.page-title p {
  color: #cbd5e1;
}

.list-page {
  padding: 42px 0 78px;
}

.list-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.search-box,
.sort-box {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--slate-600);
  font-weight: 700;
}

.search-box {
  flex: 1 1 360px;
}

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

.sort-box select {
  width: 160px;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  background-image: var(--detail-image);
  background-position: center;
  background-size: cover;
  opacity: 0.2;
  filter: blur(2px);
  transform: scale(1.04);
}

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

.detail-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
  min-height: 480px;
  padding: 56px 0;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  box-shadow: 0 26px 72px rgba(2, 6, 23, 0.42);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-header h1 {
  margin: 12px 0 18px;
  font-size: clamp(38px, 7vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: #dbe4ef;
  font-size: 19px;
}

.meta-pills,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pills span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-weight: 700;
}

.tag-row span {
  background: var(--orange-100);
  color: #9a3412;
}

.detail-page-body {
  padding: 58px 0 82px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

.detail-main,
.detail-side {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.detail-main {
  padding: 28px;
}

.detail-side {
  padding: 22px;
}

.detail-main h2,
.detail-side h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.detail-text {
  margin: 0 0 28px;
  color: var(--slate-700);
  font-size: 17px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin: 0 0 32px;
  border-radius: 24px;
  background: var(--slate-950);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.3);
  aspect-ratio: 16 / 9;
}

.player-video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 28px;
  background-image:
    linear-gradient(rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.9)),
    var(--player-image);
  background-position: center;
  background-size: cover;
  color: var(--white);
  text-align: center;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--orange-500);
  color: var(--white);
  font-size: 34px;
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.35);
}

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

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

.side-list a {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-list a:hover {
  background: #fff7ed;
  transform: translateX(3px);
}

.side-list .poster-frame {
  height: 58px;
  border-radius: 12px;
}

.side-list strong,
.side-list span {
  display: block;
}

.side-list strong {
  color: var(--slate-900);
  line-height: 1.3;
}

.side-list span {
  color: var(--slate-600);
  font-size: 13px;
}

.site-footer {
  background: var(--slate-900);
  color: #cbd5e1;
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 20px;
}

.site-footer p {
  margin: 0;
}

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

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

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

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

  .category-grid,
  .rank-panel,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-header {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 18px;
    background: var(--slate-900);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .section {
    padding: 52px 0;
  }

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

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

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

  .rank-item {
    grid-template-columns: 34px 80px 1fr;
  }

  .rank-score {
    display: none;
  }

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

  .detail-poster {
    width: 210px;
  }

  .detail-main {
    padding: 20px;
  }
}

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

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

  .list-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box,
  .sort-box {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .sort-box select {
    width: 100%;
  }
}
