:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --orange-500: #f97316;
  --cyan-500: #06b6d4;
  --green-600: #16a34a;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(15, 23, 42, .16);
  --soft-shadow: 0 12px 32px rgba(15, 23, 42, .1);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.nav-open {
  overflow: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, .28);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--slate-900);
  font-weight: 900;
  letter-spacing: .02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 10px 24px rgba(245, 158, 11, .35);
}

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

.main-nav a {
  color: var(--slate-600);
  font-weight: 700;
  transition: color .25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--amber-600);
}

.top-search,
.hero-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  border: 0;
  outline: 0;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-800);
  padding: 12px 16px;
  min-width: 220px;
}

.top-search button,
.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--white);
  background: var(--amber-500);
  cursor: pointer;
  font-weight: 800;
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--slate-900);
  border-radius: 999px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease, transform .7s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  filter: saturate(1.05) contrast(1.04);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(245, 158, 11, .18), transparent 36%),
    linear-gradient(90deg, rgba(2, 6, 23, .96) 0%, rgba(15, 23, 42, .86) 43%, rgba(15, 23, 42, .34) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, .85), transparent 46%);
}

.hero-content {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: min(1180px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  max-width: 1180px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber-400);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 16px;
  max-width: 760px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -.04em;
}

.hero-content h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 42px);
  color: var(--amber-400);
}

.hero-text {
  max-width: 680px;
  margin: 0 0 20px;
  color: var(--slate-300);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 24px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, .88);
  font-weight: 700;
}

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

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

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

.btn.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 18px 38px rgba(245, 158, 11, .28);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .46);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--amber-400);
}

.hero-search {
  position: absolute;
  z-index: 12;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  width: min(600px, calc(100% - 48px));
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .18);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, .92);
}

.hero-cats {
  position: absolute;
  z-index: 11;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 90px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  width: 360px;
}

.hero-cats a {
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(14px);
  font-weight: 800;
  font-size: 13px;
}

.section {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0;
}

.soft-section,
.category-strip {
  width: 100%;
  padding-left: max(24px, calc((100vw - 1280px) / 2));
  padding-right: max(24px, calc((100vw - 1280px) / 2));
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

.section-head h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -.03em;
}

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

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

.category-tile,
.category-panel a {
  display: block;
  min-height: 150px;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

.category-tile:hover,
.category-panel a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile strong,
.category-panel strong {
  display: block;
  margin-bottom: 10px;
  color: var(--slate-900);
  font-size: 22px;
}

.category-tile span,
.category-panel p {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.category-panel div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-panel div span,
.card-tags span,
.tag-cloud a {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

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

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

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

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

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

.poster-link img {
  transition: transform .45s ease;
}

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

.card-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 20px;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, .82), transparent 56%);
  opacity: 0;
  transition: opacity .25s ease;
}

.movie-card:hover .card-mask {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--orange-500);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(249, 115, 22, .35);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body h3 a:hover {
  color: var(--amber-600);
}

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

.card-desc {
  min-height: 60px;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.ranking-section {
  width: 100%;
  padding-left: max(24px, calc((100vw - 1280px) / 2));
  padding-right: max(24px, calc((100vw - 1280px) / 2));
  background: linear-gradient(135deg, #f8fafc, #e0f2fe);
}

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

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

.media-row {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 18px;
  min-height: 172px;
  padding: 14px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

.row-thumb {
  border-radius: 18px;
  overflow: hidden;
}

.row-main {
  position: relative;
  padding-right: 48px;
}

.row-main h3 {
  margin: 4px 0 8px;
  color: var(--slate-900);
  font-size: 22px;
}

.row-main h3 a:hover {
  color: var(--orange-500);
}

.row-main p {
  margin: 0 0 12px;
  color: var(--slate-600);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-main span {
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 800;
}

.row-rank {
  position: absolute;
  right: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--orange-500);
}

.page-main {
  background: var(--slate-50);
}

.page-hero {
  min-height: 360px;
  padding: 110px max(24px, calc((100vw - 1180px) / 2)) 72px;
  color: var(--white);
  background-size: cover;
  background-position: center;
  background-color: var(--slate-900);
}

.page-hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -.04em;
}

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

.amber-hero {
  background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
}

.blue-hero {
  background: linear-gradient(135deg, #1d4ed8, var(--cyan-500));
}

.filter-bar {
  flex-wrap: wrap;
  padding: 18px;
  margin-bottom: 28px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.filter-bar input {
  flex: 1 1 280px;
}

.filter-bar select {
  min-width: 150px;
  cursor: pointer;
}

.movie-card.is-hidden,
.media-row.is-hidden {
  display: none;
}

.detail-main {
  background: var(--slate-50);
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.2);
  transform: scale(1.1);
  opacity: .38;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, .98), rgba(15, 23, 42, .82)), radial-gradient(circle at 80% 30%, rgba(245, 158, 11, .24), transparent 34%);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 116px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, .72);
  font-weight: 700;
}

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

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

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .42);
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.detail-line {
  max-width: 780px;
  color: var(--slate-300);
  font-size: 19px;
  line-height: 1.8;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 28px;
}

.player-shell {
  position: relative;
  width: min(1080px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 34px 80px rgba(15, 23, 42, .32);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, .82), rgba(2, 6, 23, .32));
  cursor: pointer;
  transition: opacity .24s ease, visibility .24s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-layer strong {
  font-size: clamp(18px, 3vw, 34px);
  text-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}

.play-icon {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 18px 44px rgba(245, 158, 11, .36);
}

.play-icon::before {
  content: "";
  margin-left: 7px;
  border-left: 24px solid var(--white);
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
}

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

.story-card {
  border-radius: 28px;
  padding: 32px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.story-card h2 {
  margin: 0 0 18px;
  color: var(--slate-900);
  font-size: 28px;
}

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

.site-footer {
  color: var(--slate-300);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-900));
}

.footer-inner {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px;
}

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

.footer-inner p {
  max-width: 620px;
  color: var(--slate-300);
  line-height: 1.8;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: flex-start;
  justify-content: flex-end;
}

.footer-inner nav a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.footer-inner nav a:hover {
  color: var(--amber-400);
}

.footer-bottom {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: var(--slate-500);
  font-size: 14px;
}

@media (max-width: 1180px) {
  .poster-grid,
  .compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-cats {
    display: none;
  }
}

@media (max-width: 900px) {
  .header-inner {
    min-height: 68px;
    padding: 0 18px;
  }

  .main-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  body.nav-open .main-nav {
    display: flex;
  }

  .main-nav a {
    padding: 14px 16px;
    border-radius: 16px;
  }

  .main-nav a:hover,
  .main-nav a.active {
    background: var(--slate-100);
  }

  .top-search {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .hero-carousel {
    min-height: 780px;
  }

  .hero-content {
    top: 42%;
  }

  .hero-search {
    bottom: 84px;
  }

  .row-grid,
  .row-grid.wide,
  .article-section,
  .footer-inner,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(310px, 86vw);
  }
}

@media (max-width: 720px) {
  .section,
  .detail-wrap,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 32px, 1280px);
  }

  .section,
  .soft-section,
  .category-strip,
  .ranking-section {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .poster-grid,
  .compact-grid,
  .category-grid,
  .category-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-desc,
  .card-tags {
    display: none;
  }

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

  .media-row {
    grid-template-columns: 98px 1fr;
    min-height: 146px;
  }

  .row-main h3 {
    font-size: 18px;
  }

  .row-main p {
    -webkit-line-clamp: 2;
    font-size: 14px;
  }

  .page-hero,
  .detail-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .player-shell {
    border-radius: 18px;
  }

  .story-card {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .hero-carousel {
    min-height: 740px;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 24px;
  }

  .hero-search input,
  .hero-search button {
    width: 100%;
  }

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

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

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

  .detail-info h1 {
    font-size: 34px;
  }
}
