* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e5e7eb;
  --emerald: #059669;
  --emerald-dark: #047857;
  --emerald-light: #d1fae5;
  --blue: #2563eb;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #f8fafc 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #2563eb);
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.28);
}

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

.nav-link,
.mobile-link {
  color: #475569;
  font-weight: 650;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 4px;
  background: #334155;
}

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

.hero {
  position: relative;
  min-height: 520px;
  height: 72vh;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 1.1s ease;
  pointer-events: none;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(16, 185, 129, 0.32), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.75) 42%, rgba(15, 23, 42, 0.35) 74%, rgba(15, 23, 42, 0.78) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.05) 55%, rgba(15, 23, 42, 0.35) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  align-items: center;
  gap: 46px;
}

.hero-copy {
  max-width: 720px;
}

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-pill,
.poster-badge,
.tag,
.detail-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-pill {
  padding: 7px 12px;
  font-size: 13px;
  background: var(--emerald);
}

.hero-year {
  color: #cbd5e1;
  font-weight: 650;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.98;
  margin: 0 0 22px;
  letter-spacing: -0.045em;
}

.hero p {
  margin: 0 0 30px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
  color: #e2e8f0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 780;
  border: 1px solid transparent;
  transition: 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--emerald);
  color: #fff;
  box-shadow: 0 20px 36px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
  background: var(--emerald-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-card {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-card-copy {
  padding: 20px;
}

.hero-card-copy strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

.hero-card-copy span {
  display: block;
  color: #cbd5e1;
  line-height: 1.55;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: 0.2s ease;
}

.hero-dot.active {
  width: 32px;
  background: #fff;
}

main {
  display: block;
}

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

.content-wrap {
  padding: 70px 0;
}

.page-wrap {
  padding: 46px 0 76px;
}

.section-block {
  margin-bottom: 76px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading h2,
.page-title h1 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  font-size: clamp(27px, 4vw, 36px);
}

.section-heading span {
  flex: 1;
  height: 4px;
  min-width: 40px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.72), transparent);
}

.section-link {
  color: var(--emerald);
  font-weight: 780;
}

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

.movie-card {
  display: block;
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.85);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(16, 185, 129, 0.35);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover img,
.rank-card:hover img,
.related-card:hover img {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  font-size: 12px;
  color: #fff;
  background: rgba(5, 150, 105, 0.92);
  backdrop-filter: blur(8px);
}

.movie-info {
  display: block;
  padding: 17px;
}

.movie-info strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 7px;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-info strong {
  color: var(--emerald);
}

.movie-meta,
.movie-desc {
  display: block;
  color: var(--muted);
  line-height: 1.55;
}

.movie-meta {
  font-size: 13px;
  margin-bottom: 8px;
}

.movie-desc {
  font-size: 14px;
}

.feature-panel {
  border-radius: 32px;
  padding: 34px;
  background:
    radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.18), transparent 32%),
    linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

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

.category-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-radius: 24px;
  color: #0f172a;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-soft);
  transition: 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: var(--shadow);
}

.category-card strong {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.category-card p {
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.65;
}

.category-card span {
  color: var(--emerald);
  font-weight: 780;
}

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

.rank-card {
  display: flex;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-soft);
  transition: 0.2s ease;
}

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

.rank-cover {
  flex: 0 0 108px;
  height: 128px;
  border-radius: 16px;
  overflow: hidden;
  background: #e2e8f0;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rank-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rank-copy strong {
  font-size: 18px;
  line-height: 1.35;
  color: #0f172a;
  margin-bottom: 7px;
}

.rank-copy span,
.rank-copy em {
  color: var(--muted);
  line-height: 1.55;
}

.rank-copy span {
  font-size: 13px;
  margin-bottom: 8px;
}

.rank-copy em {
  font-size: 14px;
  font-style: normal;
}

.page-hero {
  border-radius: 34px;
  padding: 44px;
  margin-bottom: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.38), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #064e3b 100%);
  box-shadow: var(--shadow);
}

.page-title h1 {
  font-size: clamp(34px, 6vw, 54px);
  margin-bottom: 12px;
}

.page-title p {
  margin: 0;
  color: #dbeafe;
  max-width: 760px;
  line-height: 1.75;
  font-size: 17px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-soft);
}

.search-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 0 14px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: 0.2s ease;
}

.search-input:focus,
.filter-select:focus {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.empty-state {
  display: none;
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
  border-radius: 22px;
  background: #fff;
  border: 1px dashed #cbd5e1;
}

.detail-hero {
  position: relative;
  min-height: 420px;
  color: #fff;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.3)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.08));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  min-height: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
}

.detail-hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 0 0 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-pill {
  padding: 7px 11px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-hero p {
  max-width: 760px;
  margin: 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.75;
}

.detail-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 76px;
}

.player-card,
.detail-card {
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.9);
  overflow: hidden;
}

.video-box {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(16, 185, 129, 0.25), transparent 32%),
    rgba(0, 0, 0, 0.48);
  transition: opacity 0.2s ease;
}

.video-box.is-active .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-play {
  width: min(240px, 68vw);
  min-height: 62px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #2563eb);
  box-shadow: 0 24px 58px rgba(16, 185, 129, 0.34);
  font-size: 19px;
  font-weight: 850;
  cursor: pointer;
  transition: 0.2s ease;
}

.player-play:hover {
  transform: scale(1.04);
}

.player-status {
  min-height: 28px;
  padding: 14px 20px;
  color: var(--muted);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

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

.detail-card h2,
.related-section h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.detail-card p {
  color: #334155;
  line-height: 1.88;
  margin: 0 0 20px;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.tag {
  padding: 7px 11px;
  color: #047857;
  background: #d1fae5;
  font-size: 13px;
}

.related-section {
  margin-top: 46px;
}

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

.related-card {
  display: block;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.related-card span:first-child {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-card strong {
  display: block;
  padding: 14px 14px 4px;
  color: #0f172a;
  line-height: 1.35;
}

.related-card em {
  display: block;
  padding: 0 14px 14px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
  padding: 54px 0 36px;
}

.footer-logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand p {
  max-width: 420px;
  margin: 0;
  color: #94a3b8;
  line-height: 1.72;
}

.site-footer h2 {
  font-size: 18px;
  margin: 0 0 16px;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
  transition: 0.2s ease;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
  color: #94a3b8;
}

@media (max-width: 1040px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-card {
    display: none;
  }

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

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

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

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

  .mobile-nav.open {
    display: block;
  }

  .hero {
    min-height: 620px;
    height: auto;
  }

  .hero-inner {
    min-height: 620px;
    padding: 52px 0 80px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .content-wrap,
  .page-wrap,
  .detail-layout,
  .detail-hero-inner,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 28px, 1180px);
  }

  .content-wrap {
    padding: 44px 0;
  }

  .page-hero {
    padding: 32px 24px;
    border-radius: 26px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-heading span {
    width: 100%;
    flex: none;
  }

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

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

  .detail-card {
    padding: 22px;
  }

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

@media (max-width: 460px) {
  .movie-grid {
    gap: 16px;
  }

  .rank-card {
    flex-direction: column;
  }

  .rank-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    flex-basis: auto;
  }
}
