:root {
  --bg: #f7fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5edf5;
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

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

.brand-text,
.footer-brand {
  font-size: 24px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 26px rgba(8, 145, 178, 0.25);
}

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

.nav-link {
  position: relative;
  padding: 10px 14px;
  color: #334155;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan-dark);
  background: rgba(8, 145, 178, 0.08);
}

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

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

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 690px;
  background:
    radial-gradient(circle at 78% 18%, rgba(8, 145, 178, 0.26), transparent 34%),
    linear-gradient(135deg, #efffff 0%, #ffffff 46%, #ecf4ff 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(8, 145, 178, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 145, 178, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.hero-slider {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 590px;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: 48px;
  align-items: center;
  padding: 58px 0 94px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-backdrop {
  position: absolute;
  top: 46px;
  right: -120px;
  width: 640px;
  height: 430px;
  z-index: -1;
  border-radius: 40px;
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  filter: blur(32px) saturate(1.2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(8, 145, 178, 0.22);
  border-radius: 999px;
  color: var(--cyan-dark);
  background: rgba(8, 145, 178, 0.08);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #475569;
  font-size: 20px;
}

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

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

.hero-tags span,
.tag-row span,
.pill {
  padding: 7px 11px;
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 999px;
  color: var(--cyan-dark);
  background: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 700;
}

.pill.is-active,
.pill:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

.btn-primary,
.btn-secondary,
.section-link,
.rank-action,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  min-height: 50px;
  padding: 0 26px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 34px rgba(8, 145, 178, 0.24);
}

.btn-secondary {
  min-height: 50px;
  padding: 0 24px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-link:hover,
.rank-action:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.28), transparent 48%);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.08;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto;
  width: min(760px, calc(100% - 32px));
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
  transform: translateX(-50%);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  outline: none;
  background: #ffffff;
}

.hero-search input {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
}

.hero-search button {
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
}

.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -42px;
  position: relative;
  z-index: 6;
}

.stat-card,
.category-card,
.movie-card,
.category-overview-card,
.story-card,
.rank-row,
.filter-panel,
.page-hero,
.detail-hero,
.player-shell {
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.stat-card {
  padding: 24px;
  border-radius: 22px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

.stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

.content-section {
  padding: 64px 0;
}

.category-section {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 18%, #ffffff 100%);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link,
.text-link {
  color: var(--cyan-dark);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e2e8f0;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 2.85;
  object-fit: cover;
  transition: transform 0.38s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 19px;
  line-height: 1.32;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 13px;
  overflow: hidden;
  color: #475569;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.compact h3 {
  font-size: 17px;
}

.movie-card.compact p {
  min-height: 42px;
  font-size: 14px;
}

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.category-card span {
  display: block;
  padding: 18px 18px 0;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  padding: 0 18px 20px;
  color: var(--muted);
}

.page-main,
.detail-main {
  min-height: 70vh;
}

.page-hero {
  margin-top: 34px;
  padding: 42px;
  border-radius: 28px;
  background:
    radial-gradient(circle at right top, rgba(8, 145, 178, 0.16), transparent 36%),
    #ffffff;
}

.page-hero.slim {
  max-width: 960px;
  text-align: center;
}

.page-hero.slim .eyebrow {
  margin-left: auto;
  margin-right: auto;
}

.page-hero p {
  max-width: 780px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 18px;
}

.category-hero p {
  margin-left: 0;
}

.pill-row {
  margin-top: 24px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 190px 190px;
  gap: 16px;
  margin-top: 28px;
  padding: 18px;
  border-radius: 24px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
}

.filter-search {
  min-width: 0;
}

.empty-state {
  display: none;
  margin: 36px auto 0;
  padding: 28px;
  max-width: 520px;
  border: 1px dashed rgba(8, 145, 178, 0.35);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
}

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

.category-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 48px 0 70px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: 24px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 18px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 1 / 1.28;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 4px 0 8px;
  font-size: 24px;
}

.category-overview-card p {
  color: var(--muted);
}

.rank-list {
  display: grid;
  gap: 16px;
  padding: 42px 0 70px;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 22px;
}

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

.rank-cover img {
  width: 92px;
  aspect-ratio: 2 / 2.7;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 8px;
  color: #475569;
}

.rank-action {
  padding: 10px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a {
  color: var(--cyan-dark);
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 36px;
  margin-top: 20px;
  padding: 26px;
  border-radius: 30px;
  background:
    radial-gradient(circle at right top, rgba(37, 99, 235, 0.12), transparent 38%),
    #ffffff;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 2.86;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
  margin: 18px 0 22px;
  color: #475569;
  font-size: 19px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 680px;
}

.detail-meta-grid span {
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  border-radius: 16px;
  color: #334155;
  background: #f8fafc;
}

.detail-meta-grid b {
  color: #94a3b8;
  font-size: 12px;
}

.detail-tags {
  margin-top: 20px;
}

.player-section {
  margin-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: #020617;
  cursor: pointer;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: saturate(1.15);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.1), rgba(2, 6, 23, 0.72));
}

.player-cover strong,
.play-button-large {
  position: relative;
  z-index: 2;
}

.play-button-large {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 22px 42px rgba(8, 145, 178, 0.38);
  font-size: 34px;
  text-indent: 5px;
}

.player-shell.is-playing .player-cover {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 34px 0 0;
}

.story-card {
  padding: 26px;
  border-radius: 24px;
}

.story-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

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

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  padding: 36px 0;
}

.footer-grid p {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-weight: 800;
  color: #334155;
}

.footer-links a:hover {
  color: var(--cyan-dark);
}

.footer-bottom {
  padding: 18px 0 24px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid var(--line);
}

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

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

  .hero-slide {
    grid-template-columns: 1fr 330px;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

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

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

  .hero {
    min-height: 780px;
  }

  .hero-slider {
    min-height: 680px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 36px;
  }

  .hero-poster {
    max-width: 310px;
    margin: 0 auto;
  }

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .hero-search input,
  .hero-search button {
    border-radius: 18px;
  }

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

  .detail-hero,
  .detail-content,
  .category-overview,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 42px 76px 1fr;
  }

  .rank-action {
    grid-column: 2 / -1;
    width: fit-content;
  }
}

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

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

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

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

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

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

  .page-hero,
  .detail-hero,
  .story-card {
    padding: 22px;
    border-radius: 22px;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

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