:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #0d9488;
  --cyan: #0891b2;
  --dark: #020617;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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

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

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 12px 22px rgba(13, 148, 136, 0.30);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong,
.text-gradient {
  font-size: 21px;
  font-weight: 900;
  background: linear-gradient(135deg, #0f766e, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #475569;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #0f766e;
  background: #ccfbf1;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #334155;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 8px 16px 16px;
  background: #ffffff;
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
  background: #f8fafc;
}

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

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(20, 184, 166, 0.34), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.86) 42%, rgba(15, 23, 42, 0.32) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  align-items: center;
  gap: 56px;
  padding-top: 40px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #5eead4;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 16px 0 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 900;
}

.hero p {
  margin: 18px 0 0;
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-meta {
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #0f766e;
  background: #ccfbf1;
}

.hero-meta span {
  color: #ccfbf1;
  background: rgba(15, 118, 110, 0.35);
  border: 1px solid rgba(94, 234, 212, 0.24);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.btn,
.btn-primary,
.btn-soft,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 900;
  border: 0;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 16px 26px rgba(13, 148, 136, 0.30);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(13, 148, 136, 0.40);
}

.btn-soft {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-soft:hover {
  background: rgba(255, 255, 255, 0.20);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 520px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.35), rgba(8, 145, 178, 0.20));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.40);
}

.hero-poster img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 54%);
}

.hero-poster-info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.hero-poster-info strong {
  display: block;
  font-size: 26px;
  line-height: 1.15;
}

.hero-poster-info span {
  display: block;
  margin-top: 8px;
  color: #cbd5e1;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  background: #2dd4bf;
}

.section {
  padding: 58px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  transition: 0.22s ease;
}

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

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

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

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

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

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f766e;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: 0.25s ease;
  font-size: 18px;
  padding-left: 3px;
}

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

.poster-rank {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(2, 6, 23, 0.72);
}

.card-body {
  padding: 18px;
}

.card-meta {
  gap: 6px;
}

.card-meta span {
  font-size: 12px;
  padding: 4px 8px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 900;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
  color: #0f766e;
}

.card-desc {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  min-height: 44px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag-row span,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.page-hero {
  padding: 64px 0 38px;
  color: #ffffff;
  background:
    radial-gradient(circle at 86% 12%, rgba(20, 184, 166, 0.32), transparent 32%),
    linear-gradient(135deg, #020617, #0f172a 58%, #134e4a);
}

.page-hero .container {
  display: grid;
  gap: 12px;
}

.page-hero p {
  color: #cbd5e1;
  max-width: 760px;
  font-size: 18px;
}

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

.category-card {
  position: relative;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  box-shadow: 0 18px 38px rgba(13, 148, 136, 0.20);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -48px;
  bottom: -48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 22px;
  font-weight: 950;
}

.category-card p,
.category-card span {
  position: relative;
  z-index: 2;
  margin: 8px 0 0;
  color: #ecfeff;
}

.filter-panel {
  margin: 0 0 26px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

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

.filter-search input {
  flex: 1;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: #f8fafc;
}

.filter-search input:focus {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.16);
}

.filter-search button,
.filter-chips button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #0f766e;
  font-weight: 900;
  background: #ccfbf1;
  cursor: pointer;
}

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

.filter-chips button {
  color: #475569;
  background: #f1f5f9;
}

.filter-chips button.active,
.filter-chips button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.empty-state {
  display: none;
  padding: 32px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid var(--line);
}

.empty-state.show {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 112px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.rank-cover {
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

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

.rank-index {
  font-size: 28px;
  font-weight: 950;
  color: #14b8a6;
}

.rank-info h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
}

.rank-info p {
  margin: 5px 0 8px;
  color: #64748b;
  font-size: 14px;
}

.rank-action {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #0f766e;
}

.detail-hero {
  padding: 36px 0 24px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.22);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.35);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.22), rgba(2, 6, 23, 0.72));
}

.play-button {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  font-size: 34px;
  padding-left: 5px;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 3;
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  font-size: 13px;
}

.detail-card,
.content-card,
.side-card {
  border-radius: 24px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.detail-card h1 {
  margin: 12px 0 16px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.detail-card .lead {
  margin: 0;
  color: #475569;
  font-size: 18px;
}

.detail-sections {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 950;
}

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 16px;
}

.side-card {
  position: sticky;
  top: 96px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 104px;
  height: 68px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

.related-item strong {
  display: block;
  line-height: 1.25;
}

.related-item span {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
}

.footer {
  margin-top: 50px;
  padding: 42px 0;
  color: #cbd5e1;
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
}

.footer p {
  margin: 14px 0 0;
  color: #94a3b8;
}

.footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.footer-links a {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #5eead4;
}

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

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

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

  .hero-poster {
    display: none;
  }

  .side-card {
    position: static;
  }
}

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

  .nav-toggle {
    display: block;
  }

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

  .hero-content {
    padding: 92px 0 82px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero h2 {
    font-size: 30px;
  }

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

  .poster {
    height: 220px;
  }

  .card-body {
    padding: 14px;
  }

  .section-head,
  .filter-search {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .rank-action {
    grid-column: 1 / -1;
  }

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .poster {
    height: 260px;
  }

  .detail-card,
  .content-card,
  .side-card {
    padding: 18px;
    border-radius: 20px;
  }
}
