:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --yellow: #facc15;
  --red: #ef4444;
  --green: #10b981;
  --slate: #0f172a;
  --muted: #64748b;
  --text: #1e293b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #ecfeff 48%, #f1f5f9 100%);
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #1e40af;
  background: #fef08a;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

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

.nav-link,
.mobile-link {
  font-weight: 700;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fef08a;
  opacity: 1;
}

.search-form,
.mobile-search,
.inline-search {
  display: flex;
  align-items: stretch;
}

.search-form input,
.mobile-search input,
.inline-search input {
  min-width: 190px;
  border: 0;
  outline: 0;
  padding: 11px 14px;
  border-radius: 999px 0 0 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.95);
}

.search-form button,
.mobile-search button,
.inline-search button {
  border: 0;
  padding: 0 16px;
  border-radius: 0 999px 999px 0;
  font-weight: 800;
  color: #1e3a8a;
  background: var(--yellow);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px auto;
  border-radius: 4px;
  background: #ffffff;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.9s ease;
  background-image: linear-gradient(110deg, rgba(15, 23, 42, 0.94), rgba(14, 116, 144, 0.62), rgba(20, 184, 166, 0.25)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.34), transparent 28%),
    radial-gradient(circle at 85% 82%, rgba(250, 204, 21, 0.28), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.45));
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-copy {
  width: min(720px, 100%);
  padding: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.46);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.36);
  backdrop-filter: blur(16px);
}

.hero-tags,
.detail-meta,
.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags span {
  padding: 8px 13px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.14);
}

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

.hero p {
  margin: 0;
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.text-btn,
.soft-link,
.load-more,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #0f172a;
  background: #facc15;
  box-shadow: 0 14px 30px rgba(250, 204, 21, 0.28);
}

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

.text-btn {
  color: #bfdbfe;
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover,
.soft-link:hover,
.load-more:hover,
.back-link:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-controls button {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 28px;
  height: 8px;
  border-radius: 999px;
  opacity: 0.58;
}

.hero-dot.is-active {
  opacity: 1;
  background: #facc15;
}

.section-space {
  padding: 70px 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
}

.section-heading p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.featured-grid,
.movie-grid,
.category-grid,
.category-overview-grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

.featured-card,
.movie-card,
.category-tile,
.category-overview-card,
.content-card,
.faq-list article,
.detail-card,
.related-panel,
.player-card {
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.featured-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.featured-card:hover,
.movie-card:hover,
.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}

.featured-card figure,
.poster-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #0891b2, #0f766e);
}

.featured-card figure {
  height: 410px;
}

.featured-card img,
.poster-frame img,
.compact-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.is-missing {
  opacity: 0;
}

.featured-card figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 26px;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.featured-card h3,
.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 22px;
  line-height: 1.28;
}

.featured-card p,
.movie-card p {
  margin: 0;
  line-height: 1.65;
}

.pill,
.card-meta span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill.red {
  background: var(--red);
}

.pill.blue {
  background: var(--blue);
}

.pill.green {
  background: var(--green);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-frame {
  aspect-ratio: 16 / 10;
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.78);
}

.year-badge {
  top: 12px;
  right: 12px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.play-float {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 28px;
  opacity: 0;
  background: rgba(15, 23, 42, 0.34);
  transition: opacity 0.2s ease;
}

.play-float::before {
  content: "";
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
}

.play-float {
  isolation: isolate;
}

.movie-card:hover .play-float {
  opacity: 1;
}

.card-body {
  padding: 18px;
}

.card-meta span {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.movie-card p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  color: #475569;
  background: #f1f5f9;
}

.tag-row.large span {
  min-height: 32px;
  padding: 5px 12px;
}

.warm-band {
  background: linear-gradient(90deg, #ffedd5, #fee2e2);
}

.green-band {
  background: linear-gradient(90deg, #dcfce7, #ccfbf1);
}

.cool-band {
  background: linear-gradient(90deg, #e0f2fe, #ede9fe);
}

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

.category-tile,
.category-overview-card {
  display: grid;
  min-height: 150px;
  align-content: space-between;
  padding: 24px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after,
.category-overview-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -32px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(6, 182, 212, 0.16));
}

.category-tile strong,
.category-overview-card span {
  font-size: 24px;
  font-weight: 900;
}

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

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

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.inline-search input {
  min-width: min(460px, 62vw);
  border: 1px solid var(--line);
}

.soft-link,
.load-more,
.back-link {
  color: #0f172a;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.no-results {
  display: none;
  padding: 42px;
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.no-results.is-visible {
  display: block;
}

.movie-card.is-hidden {
  display: none;
}

.page-hero {
  color: #ffffff;
  padding: 92px 0;
  background:
    radial-gradient(circle at 15% 18%, rgba(34, 211, 238, 0.36), transparent 26%),
    linear-gradient(120deg, #0f172a, #1d4ed8 48%, #0891b2);
}

.page-hero.slim {
  padding: 72px 0;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fef08a;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
}

.page-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

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

.compact-card {
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.1);
}

.compact-card a {
  display: flex;
  gap: 14px;
  padding: 12px;
}

.compact-poster {
  position: relative;
  flex: 0 0 120px;
  height: 78px;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.compact-body {
  min-width: 0;
}

.compact-body h3 {
  margin: 4px 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.compact-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.article-page {
  padding: 70px 0;
}

.content-card,
.faq-list article {
  padding: 34px;
}

.content-card h2,
.faq-list h2,
.detail-card h2 {
  margin: 26px 0 12px;
  font-size: 25px;
}

.content-card h2:first-child,
.faq-list h2:first-child,
.detail-card h2:first-child {
  margin-top: 0;
}

.content-card p,
.faq-list p,
.detail-card p {
  color: #475569;
  line-height: 1.9;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature-list div,
.faq-list article {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.feature-list div {
  padding: 20px;
}

.feature-list strong,
.feature-list span {
  display: block;
}

.feature-list span {
  margin-top: 8px;
  color: var(--muted);
}

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

.detail-top {
  position: sticky;
  top: 68px;
  z-index: 25;
  padding: 14px 0;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a, #1e293b);
}

.back-link {
  min-height: 38px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 28px;
  padding: 34px 0 76px;
}

.detail-main {
  min-width: 0;
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
  background: #020617;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: #020617;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.cover-bg,
.cover-mask {
  position: absolute;
  inset: 0;
}

.cover-bg {
  background-image: var(--cover-image), linear-gradient(135deg, #1e3a8a, #0891b2);
  background-size: cover;
  background-position: center;
  opacity: 0.58;
}

.cover-mask {
  background:
    radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.15), transparent 35%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.76));
}

.cover-play {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  color: #1d4ed8;
  font-size: 38px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.38);
}

.detail-card,
.related-panel {
  padding: 28px;
}

.detail-meta span {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.detail-card h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
}

.lead-text {
  font-size: 19px;
  color: #334155 !important;
}

.related-panel {
  align-self: start;
  position: sticky;
  top: 104px;
}

.related-panel h2 {
  margin: 0 0 18px;
}

.related-list {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding-right: 4px;
}

.site-footer {
  color: #e2e8f0;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 34px;
  padding: 52px 0 36px;
}

.site-footer h2,
.site-footer h3 {
  color: #67e8f9;
  margin: 0 0 16px;
}

.site-footer p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  padding: 18px 0 28px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 610px;
  }

  .hero-copy {
    padding: 30px;
  }

  .featured-grid,
  .movie-grid,
  .three-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .compact-list,
  .feature-list,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr 1fr;
  }

  .detail-layout {
    display: block;
  }

  .related-panel {
    position: static;
    margin-top: 24px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1200px);
  }

  .site-logo {
    font-size: 20px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-copy {
    padding: 24px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-actions,
  .library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-search input {
    min-width: 0;
    width: 100%;
  }

  .featured-grid,
  .movie-grid,
  .three-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .compact-list,
  .feature-list,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .section-heading > div {
    grid-template-columns: 1fr;
  }

  .section-heading p {
    grid-column: auto;
  }

  .compact-card a {
    align-items: center;
  }

  .detail-card,
  .related-panel,
  .content-card,
  .faq-list article {
    padding: 22px;
  }
}
