:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.86);
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #0891b2;
  --cyan-strong: #0e7490;
  --blue: #2563eb;
  --orange: #f97316;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

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

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

.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(--cyan), var(--blue));
  box-shadow: 0 10px 24px rgba(8, 145, 178, 0.28);
  font-size: 14px;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 6px;
}

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
  margin-left: auto;
  width: min(300px, 30vw);
}

.header-search input,
.hero-search input,
.library-search {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  padding: 12px 18px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.hero-search input:focus,
.library-search:focus {
  border-color: rgba(8, 145, 178, 0.45);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  background: #f1f5f9;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #334155;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.is-active {
  color: var(--cyan);
  background: #f1f5f9;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background:
    radial-gradient(circle at 15% 25%, rgba(6, 182, 212, 0.22), transparent 30%),
    radial-gradient(circle at 86% 10%, rgba(37, 99, 235, 0.2), transparent 28%),
    linear-gradient(135deg, #eefcff 0%, #f8fbff 50%, #eef4ff 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.72) 45%, rgba(248, 250, 252, 0.25)),
    repeating-linear-gradient(90deg, rgba(8, 145, 178, 0.08) 0 1px, transparent 1px 80px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 34px;
  padding: 58px 0;
}

.hero-track {
  position: relative;
  min-height: 475px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: center;
  gap: 42px;
  opacity: 0;
  transform: translateX(24px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-strong);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0 18px;
  color: #0f172a;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.lead-text {
  max-width: 650px;
  margin: 0;
  color: #475569;
  font-size: 18px;
}

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

.hero-tags {
  margin: 22px 0 26px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.1);
  color: var(--cyan-strong);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.hero-actions,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.hero-search button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button,
.hero-search button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 28px rgba(8, 145, 178, 0.24);
  padding: 13px 22px;
}

.primary-button:hover,
.hero-search button:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(8, 145, 178, 0.28);
}

.ghost-button,
.section-more {
  color: var(--cyan-strong);
  background: #ffffff;
  border: 1px solid rgba(8, 145, 178, 0.18);
  padding: 12px 20px;
}

.ghost-button:hover {
  color: #ffffff;
  background: var(--cyan);
}

.ghost-button.slim {
  padding: 10px 16px;
}

.hero-art {
  position: relative;
  display: block;
  width: 100%;
  max-width: 350px;
  margin-left: auto;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-art::before {
  content: "";
  display: block;
  aspect-ratio: 3 / 4;
}

.hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.hero-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px);
}

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

.hero-mini-links,
.hero-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-mini-links a {
  flex: 1;
  min-width: 96px;
  text-align: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: #334155;
  padding: 12px 10px;
  font-weight: 750;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.hero-mini-links a:hover {
  color: var(--cyan-strong);
}

.hero-controls {
  justify-content: center;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-controls button,
.hero-dot {
  cursor: pointer;
  border: 0;
}

.hero-controls > button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--cyan-strong);
  background: #ffffff;
  font-size: 24px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.hero-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: #cbd5e1;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(8, 145, 178, 0.25);
}

.category-card {
  min-height: 210px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-images {
  position: absolute;
  inset: 14px 14px auto 14px;
  display: flex;
  height: 112px;
  gap: 8px;
  opacity: 0.92;
}

.category-images img {
  flex: 1;
  min-width: 0;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
}

.category-name {
  position: relative;
  margin-top: 120px;
  font-size: 20px;
  font-weight: 850;
}

.category-desc {
  position: relative;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
}

.poster-link::before {
  content: "";
  display: block;
  aspect-ratio: 3 / 4;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.68), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
}

.play-chip {
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--cyan-strong);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.75);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 30px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28);
}

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info h3 a:hover {
  color: var(--cyan-strong);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 6px;
  color: #cbd5e1;
}

.tag-row span {
  font-size: 12px;
  padding: 4px 8px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
}

.movie-card-compact .poster-link::before {
  aspect-ratio: 3 / 4;
}

.movie-card-compact .movie-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.13), rgba(37, 99, 235, 0.12)),
    #ffffff;
  box-shadow: var(--soft-shadow);
}

.small-hero {
  padding: 54px;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 170px;
}

.overview-cover {
  position: relative;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
}

.overview-cover img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
}

.overview-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.overview-body strong {
  font-size: 23px;
}

.overview-body em {
  color: var(--muted);
  font-style: normal;
}

.library-section {
  padding-top: 32px;
}

.filter-bar {
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.library-search {
  flex: 1;
  min-width: 240px;
}

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

.detail-breadcrumb {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.detail-breadcrumb a:hover,
.breadcrumb:hover {
  color: var(--cyan-strong);
}

.player-section {
  margin-bottom: 28px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: var(--shadow);
}

.video-frame::before {
  content: "";
  display: block;
  aspect-ratio: 16 / 9;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
  z-index: 1;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.24));
  cursor: pointer;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--cyan-strong);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  font-size: 28px;
  padding-left: 4px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 30px;
  padding: 28px;
  border-radius: 32px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
  box-shadow: var(--soft-shadow);
}

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

.detail-info h1 {
  margin-top: 12px;
  font-size: clamp(32px, 4vw, 56px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 12px;
}

.detail-tags {
  margin-bottom: 22px;
}

.detail-content {
  margin-top: 28px;
  padding: 32px;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-content p {
  margin: 0 0 22px;
  color: #334155;
  font-size: 17px;
}

.related-section {
  width: 100%;
  padding-top: 42px;
}

.site-footer {
  margin-top: 58px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.footer-logo .brand-text {
  color: #ffffff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-brand p {
  max-width: 420px;
  margin: 16px 0 0;
  color: #94a3b8;
}

.footer-column h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

  .hero-panel {
    align-self: auto;
  }
}

@media (max-width: 860px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 34px 0;
  }

  .hero-track {
    min-height: 760px;
  }

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

  .hero-art {
    max-width: 320px;
    margin: 0 auto;
  }

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

  .rank-list,
  .overview-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 620px) {
  .header-inner,
  .mobile-nav,
  .content-section,
  .page-hero,
  .detail-shell,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

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

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

  .hero-track {
    min-height: 700px;
  }

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

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

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

  .movie-info {
    padding: 12px;
  }

  .small-hero,
  .detail-content,
  .detail-hero {
    padding: 22px;
    border-radius: 24px;
  }

  .category-overview-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .overview-cover img {
    min-height: 150px;
  }

  .movie-card-compact {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}
