:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px);
}

.nav-shell {
  max-width: 1220px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

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

.brand-text {
  font-size: 21px;
  line-height: 1;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #334155;
  font-size: 14px;
  font-weight: 650;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--cyan-dark);
  background: #ecfeff;
}

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

.top-search input,
.mobile-search input,
.page-filter input,
.search-page-form input {
  width: 230px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  padding: 10px 14px;
  outline: none;
  transition: 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.page-filter input:focus,
.search-page-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.top-search button,
.mobile-search button,
.search-page-form button,
.filter-buttons button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.20);
}

.mobile-menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  color: var(--cyan-dark);
  background: #ecfeff;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  max-width: 1220px;
  margin: 26px auto 0;
  padding: 0 22px;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #0f172a, #0e7490 52%, #2563eb);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 36px;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(22px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  filter: blur(18px) saturate(1.2);
  transform: scale(1.08);
}

.hero-bg img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg:after,
.detail-backdrop:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(14, 116, 144, 0.65), rgba(37, 99, 235, 0.70));
}

.hero-copy,
.hero-poster,
.detail-layout {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy .eyebrow,
.detail-info .eyebrow {
  color: #a5f3fc;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 14px 0 18px;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.05;
  color: #ffffff;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-info p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--cyan-dark);
  background: #ecfeff;
  font-size: 12px;
  font-weight: 750;
}

.hero-copy .hero-tags span,
.detail-info .hero-tags span {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.25);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  width: min(360px, 100%);
  justify-self: end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.35);
  background: linear-gradient(135deg, #cffafe, #dbeafe);
}

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

.hero-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: 0.2s ease;
}

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

.hero-mini-rank {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #475569;
  font-size: 14px;
}

.hero-mini-rank a {
  color: var(--cyan-dark);
  font-weight: 800;
}

.content-section,
.overview-list,
.detail-content,
.player-section {
  max-width: 1220px;
  margin: 44px auto 0;
  padding: 0 22px;
}

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

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

.section-more {
  color: var(--cyan-dark);
  background: #ecfeff;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: radial-gradient(circle at top left, #cffafe, #dbeafe 45%, #ffffff);
}

.poster-frame img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.poster-frame img.is-missing,
.hero-bg img.is-missing,
.hero-poster img.is-missing,
.category-tile img.is-missing,
.category-cover img.is-missing,
.detail-backdrop img.is-missing {
  opacity: 0;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.05);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0));
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.32);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--cyan-dark);
}

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

.card-compact .card-body p {
  min-height: auto;
}

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

.category-tile {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 24px;
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #0891b2);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 1;
  display: block;
}

.category-tile span {
  font-size: 20px;
  font-weight: 850;
}

.category-tile small {
  max-width: 92%;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.55;
}

.page-hero,
.detail-hero {
  position: relative;
  max-width: 1220px;
  margin: 26px auto 0;
  overflow: hidden;
  border-radius: 34px;
  padding: 62px;
  background: linear-gradient(135deg, #0f172a, #0e7490 55%, #2563eb);
  box-shadow: var(--shadow);
}

.small-hero,
.search-hero,
.category-hero,
.rank-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.page-filter,
.search-page-form {
  display: grid;
  gap: 14px;
  min-width: min(420px, 100%);
}

.page-filter input,
.search-page-form input {
  width: 100%;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-buttons button {
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 26px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.category-cover {
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
}

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

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

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

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-links a {
  color: var(--cyan-dark);
  font-size: 14px;
  font-weight: 700;
}

.detail-hero {
  min-height: 540px;
  padding: 0;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  filter: blur(14px) saturate(1.08);
  transform: scale(1.05);
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 540px;
  padding: 54px;
}

.large-poster {
  border-radius: 28px;
  box-shadow: 0 26px 65px rgba(15, 23, 42, 0.4);
}

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

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.video-player {
  width: 100%;
  min-height: 520px;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.22), rgba(2, 6, 23, 0.48));
  cursor: pointer;
  transition: 0.2s ease;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 38px rgba(6, 182, 212, 0.35);
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

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

.detail-text-block,
.info-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.detail-text-block + .detail-text-block {
  margin-top: 20px;
}

.detail-text-block h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-text-block p {
  margin: 0;
  color: #334155;
  line-height: 2;
  white-space: pre-line;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
}

.info-panel dt {
  color: var(--muted);
}

.info-panel dd {
  margin: 0;
  font-weight: 700;
}

.site-footer {
  margin-top: 64px;
  padding: 42px 22px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

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

.site-footer p {
  max-width: 460px;
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

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

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

.is-filter-hidden,
.is-search-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

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

  .hero-poster {
    display: none;
  }

  .small-hero,
  .search-hero,
  .category-hero,
  .rank-hero {
    display: grid;
  }
}

@media (max-width: 720px) {
  .nav-shell {
    height: 62px;
    padding: 0 16px;
  }

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

  .hero-carousel,
  .content-section,
  .overview-list,
  .detail-content,
  .player-section {
    padding: 0 16px;
  }

  .hero-slider {
    min-height: 520px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 34px 24px;
  }

  .page-hero,
  .detail-hero {
    margin-left: 16px;
    margin-right: 16px;
    padding: 34px 24px;
    border-radius: 24px;
  }

  .detail-layout {
    padding: 24px;
  }

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

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

  .video-player {
    min-height: 300px;
  }
}

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

  .hero-control-row,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-search {
    display: grid;
  }

  .mobile-search input {
    width: 100%;
  }
}
