:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --cyan-400: #22d3ee;
  --shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.14);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--slate-50);
  color: var(--slate-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  color: white;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.24);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--emerald-500), var(--cyan-400));
  font-weight: 900;
  color: var(--slate-950);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.3);
}

.brand-text,
.footer-brand {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--emerald-400), var(--cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  padding: 8px 12px;
  border-radius: 10px;
  color: #d1d5db;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--emerald-600);
  color: white;
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.nav-search input {
  width: 180px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(51, 65, 85, 0.9);
  color: white;
  transition: width 0.25s ease, box-shadow 0.25s ease;
}

.nav-search input:focus {
  width: 230px;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.32);
}

.nav-search button,
.quick-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  background: var(--emerald-600);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: rgba(51, 65, 85, 0.9);
  color: white;
  border-radius: 10px;
  padding: 8px 10px;
}

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

.hero h1 {
  position: absolute;
  z-index: 4;
  left: max(24px, calc((100% - 1240px) / 2));
  top: 96px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(28px, 5vw, 58px);
  line-height: 1.08;
  max-width: 850px;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1s ease, transform 1.2s ease;
  pointer-events: none;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(16, 185, 129, 0.35), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.46), rgba(2, 6, 23, 0.72)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 55%);
}

.hero-content {
  position: absolute;
  z-index: 5;
  left: max(24px, calc((100% - 1240px) / 2));
  right: 24px;
  bottom: 78px;
  max-width: 760px;
  color: white;
}

.hero-kicker,
.detail-stats,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-kicker span,
.card-tags span,
.detail-tags a,
.detail-stats span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
}

.hero-content h2 {
  margin: 16px 0 14px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 650px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 21px);
}

.hero-actions,
.page-hero .button-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-primary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 13px;
  padding: 11px 22px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button-primary {
  background: var(--emerald-600);
  color: white;
  box-shadow: 0 15px 36px rgba(5, 150, 105, 0.28);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.button-primary:hover,
.button-ghost:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  z-index: 8;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: white;
  font-size: 34px;
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.quick-panel {
  margin-top: -40px;
  position: relative;
  z-index: 12;
  padding: 0 16px;
}

.quick-inner,
.page-shell,
.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-inner {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 22px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.quick-inner h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.quick-inner p {
  margin: 0;
  color: var(--slate-600);
}

.quick-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  width: 100%;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  padding: 12px 16px;
  background: white;
  outline: 0;
}

.category-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chips a,
.category-tile {
  border-radius: 999px;
  padding: 9px 14px;
  background: #ecfdf5;
  color: var(--emerald-700);
  font-weight: 800;
}

.page-shell {
  padding: 56px 0;
}

.top-space {
  padding-top: 42px;
}

.content-section {
  margin-bottom: 64px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.03em;
}

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

.section-head a {
  color: var(--emerald-700);
  font-weight: 900;
  white-space: nowrap;
}

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

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

.feature-band {
  margin-bottom: 64px;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ecfdf5, #ecfeff);
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.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-score,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.card-score {
  right: 10px;
  background: rgba(5, 150, 105, 0.92);
}

.rank-badge {
  left: 10px;
  background: rgba(2, 6, 23, 0.78);
}

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-weight: 900;
  font-size: 16px;
  line-height: 1.45;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  color: var(--slate-600);
  font-size: 13px;
}

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

.card-compact .card-body {
  padding: 12px;
}

.card-compact .card-title {
  min-height: 44px;
  font-size: 15px;
}

.card-compact .card-body p {
  display: none;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 56px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.rank-row img {
  width: 56px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-num {
  font-size: 20px;
  font-weight: 900;
  color: var(--emerald-600);
  text-align: center;
}

.rank-title {
  font-weight: 900;
}

.rank-meta {
  color: var(--slate-600);
  font-size: 13px;
}

.page-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 42px;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
  color: white;
  box-shadow: var(--shadow-soft);
}

.compact-hero {
  display: block;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 17px;
}

.page-hero img {
  width: 100%;
  max-height: 430px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--emerald-400);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.category-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.category-tile {
  display: block;
  border-radius: var(--radius-md);
  padding: 20px;
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.category-tile strong,
.category-tile span {
  display: block;
}

.category-tile strong {
  color: var(--slate-900);
  font-size: 20px;
}

.category-tile span {
  margin-top: 8px;
  color: var(--slate-600);
  font-weight: 500;
}

.filter-bar,
.search-stage {
  display: grid;
  grid-template-columns: 1fr 170px 170px 170px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.empty-state {
  display: none;
  padding: 40px;
  border-radius: var(--radius-md);
  background: white;
  color: var(--slate-600);
  text-align: center;
  font-weight: 800;
}

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

.search-stage {
  display: block;
}

.search-page-form {
  display: flex;
  gap: 12px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 30px;
  align-items: stretch;
  margin-bottom: 38px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border-radius: var(--radius-lg);
  background: var(--slate-950);
  box-shadow: var(--shadow-soft);
}

.main-video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.main-video {
  position: absolute;
  inset: 0;
  object-fit: contain;
  background: var(--slate-950);
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--slate-950);
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  filter: brightness(0.55);
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.92);
  color: white;
  font-size: 34px;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.32);
}

.detail-info {
  border-radius: var(--radius-lg);
  padding: 30px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.detail-line {
  margin: 0 0 18px;
  color: var(--slate-600);
  font-size: 18px;
}

.detail-tags {
  margin-bottom: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin-bottom: 54px;
}

.detail-text,
.detail-side {
  border-radius: var(--radius-lg);
  padding: 28px;
  background: white;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-text h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.detail-side dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  margin: 0;
}

.detail-side dt {
  color: var(--slate-600);
  font-weight: 800;
}

.detail-side dd {
  margin: 0;
  color: var(--slate-900);
}

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

.breadcrumb a {
  color: var(--emerald-700);
  font-weight: 800;
}

.site-footer {
  margin-top: 40px;
  padding: 42px 0 28px;
  background: var(--slate-950);
  color: #cbd5e1;
}

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

.site-footer p {
  max-width: 520px;
  margin: 12px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  color: #cbd5e1;
  font-weight: 700;
}

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

[hidden] {
  display: none !important;
}

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

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

  .nav-search {
    display: none;
  }

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

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .nav-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
  }

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

  .nav-link {
    padding: 11px 12px;
  }

  .hero {
    height: 76vh;
    min-height: 580px;
  }

  .hero h1 {
    top: 84px;
    right: 22px;
  }

  .hero-content {
    bottom: 72px;
  }

  .hero-control {
    display: none;
  }

  .quick-inner,
  .feature-band,
  .page-hero,
  .detail-info,
  .detail-text,
  .detail-side {
    padding: 22px;
  }

  .quick-search,
  .search-page-form {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .small-grid,
  .feature-grid,
  .ranking-grid,
  .category-tiles,
  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-row {
    grid-template-columns: 34px 44px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .player-panel {
    min-height: 260px;
    aspect-ratio: 16 / 9;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .small-grid,
  .feature-grid,
  .ranking-grid,
  .category-tiles,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-content h2 {
    font-size: 32px;
  }
}
