:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #ecfeff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-2: #111827;
  --primary: #10b981;
  --primary-2: #06b6d4;
  --accent: #f59e0b;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.08);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.10), transparent 24rem),
    radial-gradient(circle at 90% 8%, rgba(6, 182, 212, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
}

.nav-wrap {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.32);
}

.brand-text,
.footer-logo {
  font-size: 22px;
  background: linear-gradient(90deg, #34d399, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  font-weight: 700;
}

.nav-links a {
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
  transform: scale(1.02);
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(16, 185, 129, 0.24), transparent 28rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.24) 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 190px;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 680px;
  margin: 0 auto;
  padding: 110px 24px 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 54px;
  align-items: center;
}

.hero-copy {
  max-width: 740px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(52, 211, 153, 0.32);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero h1 span {
  color: #34d399;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(241, 245, 249, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.30);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #047857;
  background: #d1fae5;
}

.hero-tags span {
  color: #ccfbf1;
  background: rgba(255, 255, 255, 0.14);
}

.hero-panel {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.44);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.32);
}

.hero-panel-text {
  padding: 18px 4px 2px;
  color: #ffffff;
}

.hero-panel-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.25;
}

.hero-panel-text em {
  display: block;
  margin-top: 6px;
  color: #a7f3d0;
  font-style: normal;
  font-weight: 800;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.main-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 68px 24px;
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 62px 24px 18px;
}

.page-hero-card {
  padding: clamp(32px, 5vw, 58px);
  border-radius: var(--radius-xl);
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(45, 212, 191, 0.28), transparent 22rem),
    linear-gradient(135deg, #0f172a, #164e63 58%, #065f46);
  box-shadow: var(--shadow);
}

.page-hero-card h1 {
  max-width: 840px;
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero-card p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.section {
  margin-bottom: 76px;
}

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

.section-title h2,
.section-title h1 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.more-link {
  color: #059669;
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(16, 185, 129, 0.38);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #0f766e);
}

.poster-link img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card.featured .poster-link img,
.movie-card.large .poster-link img {
  aspect-ratio: 16 / 9;
}

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

.poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.68));
  opacity: 0;
  transition: opacity 0.28s ease;
}

.play-dot {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 32px rgba(16, 185, 129, 0.42);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .poster-mask,
.movie-card:hover .play-dot {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.95);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

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

.card-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.card-body h2 a:hover {
  color: #059669;
}

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

.category-band {
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #ecfdf5, #ecfeff);
  box-shadow: var(--shadow-soft);
}

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

.category-tile {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.16);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 178px;
  object-fit: cover;
  opacity: 0.76;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  opacity: 0.94;
  transform: scale(1.06);
}

.category-tile-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.category-tile-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
}

.category-tile-content strong {
  display: block;
  font-size: 20px;
}

.category-tile-content em {
  color: #a7f3d0;
  font-style: normal;
  font-weight: 800;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 74px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-item:hover {
  transform: translateX(5px);
  border-color: rgba(16, 185, 129, 0.38);
}

.rank-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-weight: 900;
}

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

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

.rank-copy strong {
  line-height: 1.25;
}

.rank-copy em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-score {
  color: #f59e0b;
  font-weight: 900;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-panel select {
  min-height: 50px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  outline: none;
  background: #f8fafc;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 45%, rgba(16, 185, 129, 0.22), transparent 18rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 24px 50px rgba(16, 185, 129, 0.36);
  font-size: 30px;
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.86);
}

.player-frame.is-error .player-error {
  display: block;
}

.player-copy {
  padding: 24px;
}

.player-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 14px 0 0;
}

.info-pills span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #047857;
  background: #d1fae5;
  font-weight: 800;
  font-size: 13px;
}

.detail-card {
  padding: 28px;
  margin-top: 24px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.detail-card p {
  margin: 0;
  color: #334155;
}

.detail-card + .detail-card {
  margin-top: 18px;
}

.quote-box {
  border-left: 4px solid var(--primary);
  padding: 8px 0 8px 18px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.side-card {
  padding: 20px;
  position: sticky;
  top: 92px;
}

.side-poster {
  overflow: hidden;
  border-radius: 22px;
  margin-bottom: 18px;
}

.side-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.side-related a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
}

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

.side-related strong,
.side-related em {
  display: block;
}

.side-related strong {
  line-height: 1.25;
}

.side-related em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #059669;
  font-weight: 800;
}

.site-footer {
  margin-top: 60px;
  color: rgba(255, 255, 255, 0.74);
  background: linear-gradient(135deg, #020617, #0f172a 62%, #064e3b);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  max-width: 520px;
}

.footer-col h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 16px;
}

.footer-col a {
  display: block;
  margin-top: 8px;
}

.footer-col a:hover {
  color: #34d399;
}

.empty-result {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: #ffffff;
  text-align: center;
}

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    padding: 18px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: grid;
    gap: 12px;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 92px;
    gap: 28px;
  }

  .hero-panel {
    max-width: 340px;
  }

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

  .search-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .nav-wrap,
  .main-shell,
  .page-hero,
  .breadcrumb {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero h1 {
    font-size: 42px;
  }

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

  .rank-item {
    grid-template-columns: 36px 64px 1fr;
  }

  .rank-score {
    display: none;
  }
}
