:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --cyan-500: #06b6d4;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow-soft: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.10);
  --radius-xl: 1.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-900);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eef7f3 50%, #ffffff 100%);
  -webkit-font-smoothing: antialiased;
}

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-800), var(--slate-950));
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo span:last-child {
  background: linear-gradient(90deg, var(--emerald-400), var(--cyan-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-950);
  font-size: 0.82rem;
  background: linear-gradient(135deg, var(--emerald-400), var(--cyan-500));
  box-shadow: 0 0 25px rgba(52, 211, 153, 0.45);
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 0.94rem;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(5, 150, 105, 0.95);
  transform: translateY(-1px);
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.local-search input {
  border: 0;
  outline: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(51, 65, 85, 0.9);
  padding: 11px 16px;
  width: 220px;
  transition: box-shadow 0.25s ease, width 0.25s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.local-search input:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.nav-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.section-more,
.rank-action {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--white);
  background: var(--emerald-600);
  font-weight: 800;
  padding: 10px 18px;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.section-more:hover,
.rank-action:hover {
  background: var(--emerald-700);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.24);
}

.secondary-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

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

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

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-950);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 35%, rgba(16, 185, 129, 0.36), transparent 30%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.52) 48%, rgba(2, 6, 23, 0.22));
}

.hero-copy {
  position: absolute;
  left: max(28px, calc((100vw - 1180px) / 2));
  right: max(28px, calc((100vw - 1180px) / 2));
  bottom: 80px;
  max-width: 760px;
  color: var(--white);
}

.hero-kicker,
.detail-kicker,
.page-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.hero-kicker span,
.detail-kicker span,
.page-kicker span,
.card-tags span,
.meta-pill,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--white);
  background: rgba(5, 150, 105, 0.92);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-kicker span:nth-child(2),
.detail-kicker span:nth-child(2),
.page-kicker span:nth-child(2) {
  color: var(--emerald-400);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(52, 211, 153, 0.28);
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.45rem, 5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(1rem, 1.65vw, 1.25rem);
  line-height: 1.8;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--white);
  background: rgba(2, 6, 23, 0.62);
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.82);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--emerald-400);
}

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

.main-stack {
  padding: 56px 0 72px;
  display: grid;
  gap: 66px;
}

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

.section-head h2,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  letter-spacing: -0.04em;
  color: var(--slate-900);
}

.section-head p,
.page-title p,
.detail-copy p {
  margin: 9px 0 0;
  color: var(--slate-500);
  line-height: 1.8;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--emerald-700));
}

.movie-card.large .poster-wrap {
  height: 330px;
}

.movie-card.small .poster-wrap {
  height: 210px;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 58%);
  transition: opacity 0.3s ease;
}

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

.card-region,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  background: var(--emerald-600);
  font-size: 0.76rem;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: rgba(2, 6, 23, 0.76);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-950);
  border-radius: 50%;
  opacity: 0;
  background: linear-gradient(135deg, var(--emerald-400), var(--cyan-500));
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  min-height: 2.7em;
  color: var(--slate-900);
  font-size: 1.02rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--slate-500);
  font-size: 0.86rem;
}

.card-meta span:first-child {
  color: #b45309;
  font-weight: 800;
}

.card-line {
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.6;
}

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

.card-tags span {
  color: var(--emerald-700);
  background: #ecfdf5;
  padding: 5px 8px;
}

.feature-box {
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ecfdf5, #ecfeff);
}

.scroller {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scrollbar-width: none;
}

.scroller::-webkit-scrollbar {
  display: none;
}

.scroller .movie-card {
  flex: 0 0 250px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--emerald-700));
  box-shadow: var(--shadow-card);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -54px;
  top: -54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.category-card span {
  position: relative;
  z-index: 1;
  font-weight: 800;
  color: var(--emerald-400);
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--white);
  background: var(--slate-900);
  font-weight: 900;
}

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

.rank-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.rank-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy small {
  color: var(--slate-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero,
.detail-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-700), var(--cyan-500));
}

.page-hero .page-wrap,
.detail-hero .page-wrap {
  padding: 58px 0;
}

.page-title h1,
.page-title p,
.detail-copy h1,
.detail-copy p {
  color: var(--white);
}

.page-title p,
.detail-copy p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

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

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.local-search {
  display: grid;
  gap: 8px;
  color: var(--slate-700);
  font-weight: 800;
}

.local-search input {
  width: 100%;
  color: var(--slate-900);
  background: var(--slate-100);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--slate-700);
  background: #ecfdf5;
  padding: 9px 14px;
  font-weight: 800;
  transition: background 0.25s ease, color 0.25s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: var(--white);
  background: var(--emerald-600);
}

.page-content {
  padding: 48px 0 72px;
}

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

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  border-radius: 22px;
  color: var(--slate-500);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.empty-state.is-visible {
  display: block;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 30px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.32);
}

.video-player {
  position: relative;
  background: #000000;
}

.video-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: contain;
  background: #000000;
}

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

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

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--emerald-400), var(--cyan-500));
  box-shadow: 0 0 35px rgba(52, 211, 153, 0.48);
  font-size: 1.35rem;
}

.play-overlay strong {
  font-size: 1.05rem;
}

.player-message {
  display: none;
  padding: 14px 18px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.86);
}

.player-message.is-visible {
  display: block;
}

.content-card {
  padding: 28px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.content-card h2 {
  margin: 0 0 16px;
  color: var(--slate-900);
  font-size: 1.42rem;
}

.content-card p {
  color: #475569;
  line-height: 1.9;
}

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

.meta-pill {
  justify-content: space-between;
  color: var(--slate-800);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.meta-pill b {
  color: var(--emerald-700);
}

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

.related-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.25s ease, transform 0.25s ease;
}

.related-item:hover {
  background: #ecfdf5;
  transform: translateY(-2px);
}

.related-item img {
  width: 76px;
  height: 98px;
  object-fit: cover;
  border-radius: 12px;
}

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

.related-item small {
  display: block;
  margin-top: 6px;
  color: var(--slate-500);
}

.detail-main {
  padding: 40px 0 72px;
}

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

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

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 1rem;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
  transition: color 0.25s ease;
}

.footer-grid a:hover {
  color: var(--emerald-400);
}

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

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

  .mobile-toggle {
    display: inline-flex;
  }

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

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

@media (max-width: 760px) {
  .hero-carousel {
    height: 74vh;
    min-height: 520px;
  }

  .hero-copy {
    bottom: 58px;
  }

  .hero-arrow {
    display: none;
  }

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

  .poster-wrap,
  .movie-card.large .poster-wrap,
  .movie-card.small .poster-wrap {
    height: 230px;
  }

  .section-head {
    display: block;
  }

  .section-more {
    margin-top: 14px;
    display: inline-flex;
  }

  .rank-row {
    grid-template-columns: 38px 58px minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }

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

@media (max-width: 520px) {
  .nav-shell {
    width: min(100% - 24px, 1180px);
  }

  .logo span:last-child {
    font-size: 1rem;
  }

  .hero-copy h1 {
    font-size: 2.3rem;
  }

  .mobile-panel nav,
  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .movie-meta-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap,
  .movie-card.large .poster-wrap,
  .movie-card.small .poster-wrap {
    height: 320px;
  }

  .content-card,
  .feature-box {
    padding: 22px;
  }
}
