:root {
  color-scheme: light;
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --cyan-50: #ecfeff;
  --blue-50: #eff6ff;
  --blue-500: #3b82f6;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --panel: #ffffff;
  --shadow: 0 18px 45px rgba(14, 116, 144, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--sky-50) 48%, var(--cyan-50) 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(224, 242, 254, 0.92), rgba(239, 246, 255, 0.94), rgba(236, 254, 255, 0.92));
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.12);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(186, 230, 253, 0.8);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 178px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sky-500), var(--blue-500));
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.35);
}

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

.brand-text strong {
  font-size: 20px;
  color: var(--sky-700);
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 3px;
  font-size: 12px;
  color: var(--sky-500);
}

.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.main-nav a {
  padding: 9px 13px;
  border-radius: 12px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--sky-700);
  background: rgba(186, 230, 253, 0.65);
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 248px;
}

.top-search input,
.search-panel input {
  width: 100%;
  border: 1px solid var(--sky-200);
  border-radius: 999px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  color: var(--text);
  transition: box-shadow 0.2s ease, border 0.2s ease;
}

.top-search input:focus,
.search-panel input:focus {
  border-color: var(--sky-400);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.top-search button,
.btn,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--sky-500), var(--blue-500));
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.btn:hover,
.search-panel button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(14, 165, 233, 0.32);
}

.btn-light {
  color: var(--sky-700);
  background: rgba(255, 255, 255, 0.92);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--sky-700);
  background: rgba(255, 255, 255, 0.85);
  font-size: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: 72px 0 90px;
  color: #ffffff;
  background: linear-gradient(120deg, rgba(14, 165, 233, 0.96), rgba(59, 130, 246, 0.94), rgba(6, 182, 212, 0.95));
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0.14;
  transform: scale(1.04);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(0deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

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

.hero-copy h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 26px rgba(15, 23, 42, 0.25);
}

.hero-copy p {
  margin: 20px 0 0;
  max-width: 720px;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.75;
  color: rgba(240, 249, 255, 0.95);
}

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

.hero-stats {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-stats span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 14px;
  font-weight: 700;
}

.hero-feature {
  position: relative;
  min-height: 420px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-card {
  height: 100%;
  display: grid;
  grid-template-rows: 260px 1fr;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(14px);
}

.hero-card figure {
  margin: 0;
  position: relative;
  overflow: hidden;
}

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

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

.hero-card-content {
  padding: 24px;
}

.hero-card-content h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.22;
}

.hero-card-content p {
  margin: 0 0 18px;
  color: rgba(240, 249, 255, 0.92);
  line-height: 1.75;
}

.hero-tag-row {
  position: absolute;
  left: 18px;
  top: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-tag-row span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--sky-700);
  font-size: 12px;
  font-weight: 800;
}

.hero-tag-row span {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.82);
}

.hero-dots {
  position: absolute;
  right: 20px;
  bottom: -42px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
}

.hero-dots button.is-active {
  width: 28px;
  background: #ffffff;
}

.page-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 70px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-more {
  color: var(--sky-600);
  font-weight: 800;
}

.content-section {
  margin-top: 52px;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link,
.category-card,
.info-panel,
.search-panel,
.detail-card,
.rank-list,
.movie-card-featured {
  background: var(--panel);
  border: 1px solid rgba(186, 230, 253, 0.75);
  box-shadow: var(--shadow);
}

.movie-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.95);
  box-shadow: 0 24px 54px rgba(14, 116, 144, 0.2);
}

.movie-cover {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky-100), var(--blue-50));
}

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

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0) 55%);
  opacity: 0.9;
}

.cover-badge,
.card-rank {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: var(--sky-500);
  font-size: 12px;
  font-weight: 800;
}

.card-rank {
  left: auto;
  right: 12px;
  min-width: 34px;
  text-align: center;
  background: #f59e0b;
}

.cover-play {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.88);
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.36);
}

.movie-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.movie-card-body h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card-link:hover h3 {
  color: var(--sky-600);
}

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

.movie-meta-row {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta-row span {
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--sky-50);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

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

.category-card {
  display: block;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, var(--sky-50));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 24px 50px rgba(14, 116, 144, 0.18);
}

.category-card strong {
  display: block;
  font-size: 24px;
  color: var(--sky-700);
}

.category-card small {
  display: inline-flex;
  margin: 12px 0;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--sky-700);
  background: var(--sky-100);
  font-weight: 800;
}

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

.page-hero {
  padding: 58px 0;
  color: #ffffff;
  background: linear-gradient(120deg, var(--sky-500), var(--blue-500), #06b6d4);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 22% 10%, rgba(255, 255, 255, 0.3), transparent 32%), radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.18), transparent 34%);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(240, 249, 255, 0.9);
  font-size: 14px;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.page-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.75;
  color: rgba(240, 249, 255, 0.95);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  margin-bottom: 28px;
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.rank-list {
  display: grid;
  gap: 10px;
  border-radius: 24px;
  padding: 18px;
}

.rank-row {
  border-radius: 16px;
}

.rank-link {
  display: grid;
  grid-template-columns: 50px 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.rank-link:hover {
  background: var(--sky-50);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--sky-100);
  color: var(--sky-700);
  font-weight: 900;
}

.rank-row:nth-child(1) .rank-number {
  color: #ffffff;
  background: #f59e0b;
}

.rank-row:nth-child(2) .rank-number {
  color: #ffffff;
  background: #94a3b8;
}

.rank-row:nth-child(3) .rank-number {
  color: #ffffff;
  background: #b45309;
}

.rank-link img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-content {
  min-width: 0;
}

.rank-content strong,
.rank-content em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-content strong {
  font-size: 16px;
}

.rank-content em {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-action {
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--sky-500);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 65px rgba(15, 23, 42, 0.24);
}

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

.player-start {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: #020617;
}

.player-start img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.player-start:hover img {
  transform: scale(1.04);
  opacity: 0.62;
}

.player-start::after {
  content: "▶";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: #ffffff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--sky-500), var(--blue-500));
  box-shadow: 0 18px 45px rgba(2, 132, 199, 0.45);
}

.player-start.is-hidden {
  display: none;
}

.detail-card {
  margin-top: 24px;
  border-radius: 24px;
  padding: 26px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-card p {
  color: #334155;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--sky-700);
  background: var(--sky-100);
  font-weight: 800;
  font-size: 13px;
}

.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.side-card {
  margin-bottom: 22px;
  padding: 20px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(186, 230, 253, 0.75);
  box-shadow: var(--shadow);
}

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

.related-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: var(--sky-50);
}

.related-item img {
  width: 76px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.related-item strong,
.related-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-item small {
  margin-top: 5px;
  color: var(--muted);
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  color: var(--sky-700);
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--sky-600);
}

@media (max-width: 980px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    order: 4;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 8px;
  }

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

  .top-search {
    flex: 1 1 100%;
    order: 5;
    min-width: 0;
  }

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

  .hero-feature {
    min-height: 440px;
  }

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

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

@media (max-width: 620px) {
  .hero {
    padding-top: 48px;
  }

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

  .hero-card {
    grid-template-rows: 220px 1fr;
  }

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

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

  .rank-link {
    grid-template-columns: 38px 60px minmax(0, 1fr);
  }

  .rank-link img {
    width: 60px;
    height: 60px;
  }

  .rank-action {
    display: none;
  }

  .brand-text small {
    display: none;
  }
}
