:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #3b82f6;
  --teal: #14b8a6;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--teal));
  color: #ffffff;
  font-size: 16px;
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.34);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  position: relative;
  color: #334155;
  font-weight: 650;
  transition: color 0.25s ease;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 24px;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 24%, rgba(20, 184, 166, 0.26), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.7) 42%, rgba(8, 145, 178, 0.34) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 44%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  align-items: center;
  gap: 56px;
  padding-top: 80px;
}

.hero-copy {
  max-width: 850px;
  color: #ffffff;
  animation: slideUp 0.75s ease both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #cffafe;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 42px rgba(0, 0, 0, 0.35);
}

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

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan-dark);
  font-size: 13px;
  font-weight: 700;
}

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

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

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--teal));
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(6, 182, 212, 0.34);
}

.btn-secondary {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.btn-secondary.light {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-primary.slim {
  min-height: 40px;
  padding: 9px 16px;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.hero-poster span {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 38px;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

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

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

.quick-search {
  position: relative;
  z-index: 4;
  margin-top: -38px;
}

.search-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel label {
  color: #0f172a;
  font-weight: 850;
}

.search-panel input,
.page-search {
  width: 100%;
  min-height: 48px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-panel input:focus,
.page-search:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.stats-strip {
  padding: 52px 0 18px;
}

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

.stats-grid div {
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  text-align: center;
}

.stats-grid strong {
  display: block;
  color: var(--cyan-dark);
  font-size: 30px;
  font-weight: 900;
}

.stats-grid span {
  color: var(--muted);
  font-weight: 700;
}

.section-block {
  padding: 72px 0;
}

.soft-bg {
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-title {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.88));
}

.year-badge,
.play-chip {
  position: absolute;
  top: 14px;
  padding: 7px 10px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  right: 14px;
  background: #ef4444;
}

.play-chip {
  left: 14px;
  background: rgba(6, 182, 212, 0.92);
}

.movie-card-body {
  padding: 18px;
}

.movie-title,
.ranking-title {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 850;
  transition: color 0.25s ease;
}

.movie-title:hover,
.ranking-title:hover {
  color: var(--cyan-dark);
}

.movie-card-body p,
.ranking-copy p,
.story-card p {
  color: var(--muted);
  line-height: 1.78;
}

.movie-card-body p {
  min-height: 84px;
  margin: 0 0 14px;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-meta span,
.detail-meta span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
}

.tag-row {
  margin-top: 12px;
}

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

.category-card,
.category-overview-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.category-card {
  padding: 18px;
}

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

.category-thumbs img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.category-card em,
.category-overview-card p {
  color: var(--muted);
  font-style: normal;
  line-height: 1.72;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: start;
  gap: 42px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list a {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-list span,
.ranking-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  font-weight: 900;
}

.rank-list strong {
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.page-hero .container-custom {
  position: relative;
  z-index: 2;
  padding-top: 86px;
  padding-bottom: 76px;
}

.compact-hero {
  background:
    radial-gradient(circle at 75% 12%, rgba(20, 184, 166, 0.35), transparent 34%),
    linear-gradient(135deg, #020617, #0f766e 55%, #0891b2);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}

.breadcrumb a {
  color: #ecfeff;
}

.page-search {
  max-width: 440px;
}

.category-overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  padding: 22px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

.mini-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
}

.mini-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.mini-card-title {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.ranking-page-list {
  display: grid;
  gap: 18px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 64px 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.ranking-poster {
  overflow: hidden;
  border-radius: 18px;
}

.ranking-poster img {
  width: 120px;
  height: 156px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.detail-hero {
  min-height: 600px;
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  align-items: center;
  gap: 52px;
  padding-top: 86px;
  padding-bottom: 70px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

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

.detail-copy h1 {
  font-size: clamp(38px, 5vw, 70px);
}

.detail-meta span {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.13);
  color: #ecfeff;
}

.player-section {
  padding-top: 44px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-icon {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.45);
  font-size: 34px;
}

.player-cover strong {
  max-width: 86%;
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 900;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.story-card,
.side-card {
  border: 1px solid #e2e8f0;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.story-card {
  padding: 30px;
}

.story-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 900;
}

.story-card p + h2 {
  margin-top: 28px;
}

.side-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px;
}

.side-card a {
  padding: 13px 14px;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
  font-weight: 750;
  transition: background 0.25s ease, color 0.25s ease;
}

.side-card a:hover {
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan-dark);
}

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

.site-footer {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.2fr;
  gap: 40px;
  padding-top: 46px;
  padding-bottom: 36px;
}

.footer-logo {
  margin-bottom: 14px;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

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

.footer-bottom {
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.34);
  font-size: 22px;
  font-weight: 900;
}

.back-top.show {
  display: block;
}

[data-card].hide {
  display: none;
}

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .hero-poster img {
    height: 440px;
  }
}

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

  .nav-links {
    position: absolute;
    top: 72px;
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

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

  .nav-link::after {
    display: none;
  }

  .hero {
    min-height: 820px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .detail-poster {
    max-width: 320px;
  }

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

  .ranking-row .btn-primary {
    grid-column: 2 / -1;
  }
}

@media (max-width: 560px) {
  .site-logo {
    font-size: 20px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }

  .hero,
  .page-hero,
  .detail-hero {
    min-height: auto;
  }

  .hero-content {
    position: relative;
    padding-top: 112px;
    padding-bottom: 112px;
  }

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

  .hero p,
  .page-hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .section-block {
    padding: 52px 0;
  }

  .stats-grid,
  .featured-grid,
  .movie-grid,
  .all-grid,
  .related-grid,
  .category-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .category-overview-head,
  .rank-list a {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .ranking-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .ranking-poster {
    grid-column: 1 / -1;
  }

  .ranking-poster img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .ranking-copy,
  .ranking-row .btn-primary {
    grid-column: 1 / -1;
  }

  .player-play-icon {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
