:root {
  --bg: #f7fbff;
  --ink: #162033;
  --muted: #627089;
  --line: rgba(47, 70, 110, 0.14);
  --card: rgba(255, 255, 255, 0.92);
  --blue: #2563eb;
  --cyan: #06b6d4;
  --deep: #0f172a;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.2), transparent 30%), var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

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

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

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #0f172a;
  background: #edf5ff;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

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

.mobile-link {
  padding: 12px 14px;
}

.mobile-link:hover,
.mobile-link.is-active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4 58%, #14b8a6);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
  pointer-events: none;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 15, 35, 0.95) 0%, rgba(7, 15, 35, 0.68) 42%, rgba(7, 15, 35, 0.26) 100%),
    radial-gradient(circle at 18% 26%, rgba(6, 182, 212, 0.35), transparent 30%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1200px) / 2));
  padding: 60px 0;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #0ea5e9;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero .eyebrow {
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}

.hero h1,
.hero h2 {
  margin: 18px 0 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero h2 {
  font-size: clamp(28px, 4vw, 52px);
}

.hero p {
  width: min(620px, 100%);
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-list span,
.detail-labels span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.3);
}

.primary-button:hover,
.secondary-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.primary-button.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.secondary-button.dark {
  color: #0f172a;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: max(16px, calc((100vw - 1200px) / 2));
  bottom: 42px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.section,
.page-main {
  padding: 54px 0;
}

.section-heading,
.category-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-heading h2,
.category-overview-head h2,
.page-hero h1,
.content-card h2 {
  margin: 12px 0 0;
  color: var(--ink);
  line-height: 1.15;
}

.section-heading h2,
.category-overview-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.text-link {
  color: var(--blue);
  font-weight: 900;
  transition: transform 0.2s ease;
}

.search-panel,
.toolbar-card {
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.toolbar-card {
  grid-template-columns: 1fr 180px 180px 180px;
}

.search-panel input,
.search-panel select,
.toolbar-card input,
.toolbar-card select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(47, 70, 110, 0.16);
  border-radius: 16px;
  color: #0f172a;
  background: #fff;
  padding: 0 14px;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus,
.toolbar-card input:focus,
.toolbar-card select:focus {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

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

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

.compact-grid,
.mini-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card,
.mini-card {
  overflow: hidden;
  border: 1px solid rgba(47, 70, 110, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.mini-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow);
}

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

.poster-link img {
  transition: transform 0.5s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, 0.72));
}

.play-mark,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
}

.play-mark {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.28);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
  color: rgba(98, 112, 137, 0.58);
}

.movie-card h3,
.mini-card h3 {
  margin: 8px 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h3 a:hover,
.mini-card h3 a:hover {
  color: var(--blue);
}

.movie-card p,
.mini-card p {
  min-height: 54px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.tag-list span,
.detail-labels span {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

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

.category-tile {
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.category-tile a:first-child {
  display: grid;
  gap: 8px;
}

.category-tile span {
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong {
  color: #334155;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-samples a {
  color: #475569;
  background: rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.highlighted-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(219, 234, 254, 0.5), rgba(255, 255, 255, 0));
}

.page-main {
  padding-top: 34px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 240px;
  margin-bottom: 34px;
  padding: 34px;
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #1d4ed8, #06b6d4);
  box-shadow: var(--shadow);
}

.page-hero .section-kicker {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(34px, 4vw, 54px);
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.category-overview-block {
  margin-bottom: 46px;
}

.detail-main {
  background: #f8fbff;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.04);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.62));
}

.detail-shell {
  position: relative;
  z-index: 2;
  padding: 34px 0 54px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 700;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 34px;
  align-items: center;
  margin-top: 30px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
  margin: 18px 0 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 780px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-content {
  padding: 44px 0 70px;
}

.player-card,
.content-card {
  overflow: hidden;
  border: 1px solid rgba(47, 70, 110, 0.12);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.68));
  cursor: pointer;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.38);
  font-size: 34px;
}

.player-cover strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.content-card {
  margin-top: 26px;
  padding: 30px;
}

.content-card h2 {
  font-size: 26px;
}

.content-card p {
  color: #334155;
  font-size: 17px;
}

.detail-labels {
  margin-top: 22px;
}

.related-section {
  padding-bottom: 0;
}

.empty-state {
  display: none;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  border-radius: 22px;
  background: #fff;
}

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

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
  padding: 50px 0 24px;
}

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

.footer-brand {
  color: #fff;
  font-size: 24px;
}

.site-footer p {
  max-width: 560px;
  color: #94a3b8;
}

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

.site-footer a:not(.footer-brand) {
  display: block;
  color: #cbd5e1;
  margin: 8px 0;
}

.site-footer a:hover {
  color: #38bdf8;
}

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 20px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

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

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

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

  .hero {
    min-height: 600px;
  }

  .hero-content {
    margin: 0 auto;
    padding-top: 86px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(7, 15, 35, 0.88), rgba(7, 15, 35, 0.72));
  }

  .hero-controls {
    left: 16px;
  }

  .section-heading,
  .category-overview-head,
  .page-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-panel,
  .toolbar-card,
  .footer-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

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

  .movie-card h3,
  .mini-card h3 {
    font-size: 16px;
  }

  .movie-card p,
  .mini-card p {
    min-height: 0;
    font-size: 13px;
  }

  .page-hero {
    padding: 24px;
  }

  .detail-poster {
    width: min(260px, 78vw);
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 68px;
  }

  .brand-text small {
    display: none;
  }

  .movie-grid,
  .listing-grid,
  .compact-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

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

  .content-card {
    padding: 22px;
  }
}
