* {
  box-sizing: border-box;
}

:root {
  --page-bg: #f8fafc;
  --text-main: #111827;
  --text-soft: #4b5563;
  --text-muted: #6b7280;
  --line: #e5e7eb;
  --card-bg: #ffffff;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.26);
}

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

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

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

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--blue);
  background: #eff6ff;
}

.header-search {
  width: 300px;
  display: flex;
  padding: 5px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.06);
}

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
}

.header-search input {
  flex: 1;
  padding: 8px 12px;
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  cursor: pointer;
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #eff6ff;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--blue);
}

.mobile-nav {
  display: none;
  border-top: 1px solid #e2e8f0;
  padding: 14px 16px 20px;
  background: #ffffff;
}

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

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

.mobile-search input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 999px;
  background: #f1f5f9;
}

.mobile-category-strip,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mobile-category-strip a,
.footer-links a {
  color: #64748b;
  font-size: 14px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, #2563eb 0%, #06b6d4 48%, #14b8a6 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.25), transparent 24%),
    radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.38), rgba(15, 23, 42, 0.08));
}

.hero-inner {
  position: relative;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-slider {
  position: relative;
  min-height: 430px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.82fr);
  gap: 58px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy {
  max-width: 680px;
}

.hero-kicker,
.page-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cffafe;
}

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

.hero p {
  max-width: 630px;
  margin: 24px 0 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
  color: #ecfeff;
}

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

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

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

.btn.primary {
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.btn.glass {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.btn.text {
  color: #ecfeff;
}

.hero-poster {
  height: 360px;
  border-radius: 28px;
  box-shadow: 0 28px 65px rgba(15, 23, 42, 0.36);
  transform: perspective(900px) rotateY(-5deg);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(6, 182, 212, 0.8)),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.26), transparent 34%);
}

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

.poster-frame img.is-missing {
  opacity: 0;
}

.poster-frame:hover img {
  transform: scale(1.07);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.94);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.poster-play.large {
  width: 72px;
  height: 72px;
  font-size: 28px;
  opacity: 1;
}

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

.hero-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

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

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 28px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

.hero-dot.is-active {
  width: 28px;
  background: #ffffff;
}

.hero-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-category-row a {
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.content-section {
  padding: 58px 0;
}

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

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

.section-kicker {
  color: var(--blue);
  margin-bottom: 8px;
}

.section-more {
  color: var(--blue);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card .poster-frame {
  height: 230px;
}

.movie-card.compact .poster-frame {
  height: 178px;
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 42px;
  font-weight: 850;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
  color: var(--blue);
}

.movie-card-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 42px;
  margin: 10px 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

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

.movie-meta span,
.movie-meta a,
.tag-row span,
.detail-tags a {
  padding: 5px 9px;
  border-radius: 999px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 750;
}

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

.page-hero {
  padding: 92px 0;
  color: #ffffff;
  background: linear-gradient(120deg, #2563eb, #06b6d4, #14b8a6);
}

.page-hero.cyan {
  background: linear-gradient(120deg, #0891b2, #2563eb);
}

.page-hero.compact-hero {
  padding: 56px 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: -0.05em;
}

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

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

.category-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  min-height: 180px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 26px;
}

.category-card-body span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.category-card-body h2 {
  margin: 8px 0 10px;
  font-size: 28px;
}

.category-card-body p {
  color: var(--text-soft);
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 150px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--text-main);
}

.empty-state {
  display: none;
  padding: 32px;
  margin: 28px 0 0;
  border-radius: 18px;
  text-align: center;
  color: var(--text-soft);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

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

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 64px 104px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.rank-num {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 900;
}

.rank-cover {
  height: 78px;
  border-radius: 14px;
}

.rank-info a {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 850;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--text-soft);
  line-height: 1.6;
}

.search-page-form {
  display: flex;
  gap: 12px;
  max-width: 780px;
  margin-top: 28px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
}

.search-page-form input {
  flex: 1;
  padding: 0 18px;
  color: var(--text-main);
}

.search-page-form button {
  min-width: 112px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #dbeafe;
  font-size: 14px;
}

.breadcrumbs a {
  color: #ffffff;
  font-weight: 750;
}

.breadcrumbs:not(.light) {
  color: #bfdbfe;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  filter: blur(10px) saturate(1.15);
  transform: scale(1.05);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.46));
}

.detail-hero-inner {
  position: relative;
  padding: 42px 0 70px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  height: 390px;
  border-radius: 28px;
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.35);
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-copy p {
  max-width: 760px;
  margin: 20px 0;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags a {
  color: #cffafe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-copy .btn {
  margin-top: 24px;
}

.player-section {
  padding: 58px 0 28px;
  background: #0f172a;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.38);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.78));
  cursor: pointer;
  font-weight: 850;
  font-size: 18px;
}

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

.player-button {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--blue);
  background: #ffffff;
  font-size: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.player-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: #bfdbfe;
}

.detail-content {
  padding: 58px 0;
}

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

.prose-card,
.info-card {
  border-radius: 24px;
  padding: 30px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.prose-card h2,
.info-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.prose-card p {
  margin: 0 0 28px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 2;
}

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

.info-card dt {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
}

.info-card dd {
  margin: -6px 0 8px;
  color: var(--text-main);
  font-weight: 750;
}

.related-section {
  padding-top: 20px;
}

.site-footer {
  color: #cbd5e1;
  background: #111827;
  padding-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr;
  gap: 36px;
}

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

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

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

.footer-links {
  flex-direction: column;
}

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

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  padding: 18px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

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

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

  .mobile-menu-button {
    display: block;
  }

  .hero,
  .hero-inner {
    min-height: 760px;
  }

  .hero-slider {
    min-height: 630px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
  }

  .hero-poster {
    height: 270px;
    transform: none;
  }

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

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

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

  .detail-poster {
    width: min(280px, 100%);
  }
}

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

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

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

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .movie-card .poster-frame,
  .movie-card.compact .poster-frame {
    height: 170px;
  }

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

  .movie-card-body p {
    display: none;
  }

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

  .category-thumbs {
    min-height: 150px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 46px 76px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-num {
    width: 40px;
    height: 40px;
  }

  .rank-cover {
    height: 74px;
  }

  .rank-info p {
    display: none;
  }

  .search-page-form {
    border-radius: 20px;
    flex-direction: column;
  }

  .detail-hero-inner {
    padding: 28px 0 48px;
  }

  .player-button {
    width: 68px;
    height: 68px;
  }
}
