:root {
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --blue: #1d4ed8;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --card: #ffffff;
  --dark: #0b1220;
  --gold: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f1f5f9;
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

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

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

.brand {
  font-size: 22px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 12px 26px rgba(2, 132, 199, 0.35);
  font-size: 14px;
}

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

.nav-links a,
.mobile-panel a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: var(--sky-dark);
  background: #e0f2fe;
}

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

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--sky-dark);
}

.mobile-panel {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 16px;
}

.page {
  min-height: 70vh;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.hero-stage {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.68), rgba(14, 165, 233, 0.28)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(0deg, #f1f5f9, rgba(241, 245, 249, 0));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  min-height: 620px;
  padding: 90px 20px 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.55fr);
  gap: 36px;
  align-items: center;
}

.hero-copy {
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(186, 230, 253, 0.35);
  color: #bae6fd;
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1,
.page-banner h1,
.detail-title h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 0 0 26px;
  max-width: 710px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

.hero-meta,
.detail-meta,
.movie-meta,
.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.page-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 800;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--sky-dark);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(255, 255, 255, 0.18);
}

.btn-blue {
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.25);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.hero-panel {
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-panel img {
  width: 100%;
  height: 370px;
  object-fit: cover;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-panel h2 {
  color: #ffffff;
  margin: 16px 0 8px;
  font-size: 22px;
}

.hero-panel p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.7;
}

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

.hero-dots button {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search {
  position: relative;
  z-index: 3;
  max-width: 980px;
  margin: -64px auto 0;
  padding: 0 20px;
}

.quick-search form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.85);
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

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

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

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  border-color: rgba(14, 165, 233, 0.38);
}

.movie-cover {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

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

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

.cover-chip,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.92);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.25);
}

.rank-badge {
  left: 12px;
  right: auto;
  background: rgba(245, 158, 11, 0.94);
}

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

.movie-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-meta span + span::before {
  content: "·";
  margin: 0 8px 0 0;
  color: #94a3b8;
}

.movie-card h3 {
  margin: 0;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 28px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #1d4ed8 52%, #312e81);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -60px;
  bottom: -60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 27px;
  z-index: 1;
}

.category-card p {
  position: relative;
  margin: 0 0 24px;
  max-width: 330px;
  color: #dbeafe;
  line-height: 1.8;
  z-index: 1;
}

.category-card span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, 0.8fr);
  gap: 28px;
  align-items: start;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 50px 66px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  border-color: rgba(14, 165, 233, 0.45);
}

.ranking-num {
  color: var(--gold);
  font-weight: 1000;
  font-size: 20px;
  text-align: center;
}

.ranking-item img {
  width: 66px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  background: #e2e8f0;
}

.ranking-copy {
  display: grid;
  gap: 6px;
}

.ranking-copy strong {
  font-size: 16px;
}

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

.page-banner {
  color: #ffffff;
  background: radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.38), transparent 28%), linear-gradient(135deg, #0f172a, #075985 52%, #1d4ed8);
  padding: 72px 0;
}

.page-banner h1 {
  margin-top: 0;
  max-width: 900px;
}

.page-banner p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
  margin: 0;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(140px, 0.5fr));
  gap: 12px;
}

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

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

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(2, 132, 199, 0.28)), var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.detail-wrap {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 20px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.08);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.detail-title h1 {
  margin-bottom: 18px;
}

.detail-title p {
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
  max-width: 790px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.panel-body {
  padding: 26px;
}

.panel h2,
.panel h3 {
  margin: 0 0 16px;
}

.panel p {
  color: #334155;
  line-height: 1.9;
  margin: 0 0 16px;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(15, 23, 42, 0.2));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sky-dark);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(255, 255, 255, 0.24);
  cursor: pointer;
  font-size: 28px;
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
}

.player-overlay strong {
  font-size: 18px;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.info-list dt {
  color: var(--muted);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

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

.related-mini a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.related-mini a:hover {
  background: #e0f2fe;
  transform: translateX(4px);
}

.related-mini img {
  width: 64px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
  background: #e2e8f0;
}

.related-mini strong {
  display: block;
  margin-bottom: 5px;
}

.related-mini span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

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

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-weight: 800;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  text-align: center;
  padding: 18px 20px;
  color: #94a3b8;
  font-size: 14px;
}

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

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

  .hero-panel {
    display: none;
  }

  .detail-wrap {
    grid-template-columns: 220px 1fr;
  }
}

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

  .nav-toggle {
    display: flex;
  }

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

  .hero-stage,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding-top: 72px;
    padding-bottom: 120px;
  }

  .quick-search form,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-wrap {
    grid-template-columns: 1fr;
    padding: 44px 20px;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-item {
    grid-template-columns: 42px 58px 1fr;
  }

  .ranking-item img {
    width: 58px;
    height: 76px;
  }
}
