:root {
  --bg: #f8fbff;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.84);
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.25);
  --blue: #2563eb;
  --cyan: #06b6d4;
  --deep: #0f172a;
  --shadow: 0 20px 55px rgba(37, 99, 235, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34rem),
    linear-gradient(135deg, #f8fafc 0%, #eff6ff 54%, #ecfeff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(16px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.top-nav {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 14px;
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  background: #eff6ff;
  transform: translateY(-1px);
}

.nav-chips {
  display: flex;
  gap: 8px;
}

.nav-chip {
  padding: 8px 12px;
  border-radius: 999px;
  color: #2563eb;
  background: rgba(219, 234, 254, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 4px;
  border-radius: 999px;
  background: #1d4ed8;
}

.mobile-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.mobile-link {
  display: block;
  padding: 13px 16px;
  border-radius: 16px;
  color: #334155;
  font-weight: 700;
}

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

.page-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 92px 24px 64px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 36px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a 55%, #0891b2);
  box-shadow: var(--shadow);
}

.hero-slides {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 38px;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.2;
}

.hero-backdrop img {
  height: 100%;
  object-fit: cover;
  filter: blur(10px) saturate(1.12);
  transform: scale(1.08);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.2));
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(191, 219, 254, 0.24);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-content h1,
.page-hero h1,
.detail-title-block h1 {
  margin: 0;
  line-height: 1.08;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero-content p,
.page-hero p,
.detail-title-block p {
  max-width: 680px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.hero-poster {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 3 / 4;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

.hero-poster img,
.poster-link img,
.detail-poster,
.category-cover img,
.category-card img,
.player-cover img {
  height: 100%;
  object-fit: cover;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

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

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

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

.primary-button,
.ghost-button,
.site-search button,
.text-link,
.hero-mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 16px;
  border: 0;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.site-search button {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.3);
}

.ghost-button,
.hero-mini-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary-button:hover,
.ghost-button:hover,
.site-search button:hover,
.text-link:hover,
.hero-mini-link:hover {
  transform: translateY(-2px);
}

.hero-control-bar {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
}

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

.search-hero-panel,
.content-section,
.page-hero,
.detail-content,
.breadcrumb {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.search-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 28px;
  align-items: center;
  padding: 28px;
}

.search-hero-panel h2,
.section-heading h2,
.panel-title h2,
.site-footer h2,
.detail-content h2 {
  margin: 0;
  color: var(--deep);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.search-hero-panel p,
.section-heading p,
.category-overview-card p,
.detail-content p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.site-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.14);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.1);
}

.site-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 14px;
  color: var(--text);
  background: transparent;
}

.content-section {
  padding: 28px;
}

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

.section-more,
.panel-title a,
.text-link {
  color: var(--blue);
  font-weight: 850;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.18);
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
  display: block;
}

.category-card strong {
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
}

.category-card em {
  max-width: 78%;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-style: normal;
  line-height: 1.7;
}

.category-card img {
  position: absolute;
  right: -22px;
  bottom: -32px;
  width: 46%;
  height: 76%;
  border-radius: 22px;
  opacity: 0.48;
  transform: rotate(8deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.category-glow {
  position: absolute;
  inset: -40% -10% auto auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(37, 99, 235, 0.25);
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.14);
}

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

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

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

.play-mark,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
}

.play-mark {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.9);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 42px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.card-meta,
.detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.card-meta span,
.detail-meta-list span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-card h2 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

.movie-card p {
  min-height: 66px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #fff;
  transform: translateX(3px);
}

.rank-row span {
  grid-row: span 2;
  color: #2563eb;
  font-weight: 950;
}

.rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 46px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.35), transparent 24rem),
    linear-gradient(135deg, #0f172a, #1d4ed8 58%, #0891b2);
}

.page-hero.small-hero,
.page-hero.category-hero,
.page-hero.ranking-hero,
.page-hero.search-hero {
  min-height: 260px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 15px;
  outline: 0;
  color: var(--text);
  background: #fff;
}

.filter-panel input:focus,
.filter-panel select:focus,
.site-search input:focus {
  border-color: rgba(37, 99, 235, 0.45);
}

.filter-empty,
.search-empty {
  padding: 28px;
  border-radius: 18px;
  color: #64748b;
  background: #f8fafc;
  text-align: center;
  font-weight: 750;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.category-cover {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
}

.category-overview-card h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.category-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 750;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 15px 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #2563eb;
  font-weight: 750;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  margin-top: 24px;
}

.player-column,
.detail-card {
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  color: #fff;
  background: #000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.66));
}

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

.player-start {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.35);
  transform: translate(-50%, -50%);
  font-size: 28px;
}

.detail-card {
  padding: 18px;
}

.detail-poster {
  border-radius: 22px;
  aspect-ratio: 3 / 4;
}

.detail-meta-list {
  margin-top: 14px;
}

.detail-content {
  padding: 30px;
}

.detail-title-block .hero-kicker {
  color: #2563eb;
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.12);
}

.detail-title-block h1 {
  color: var(--deep);
}

.detail-title-block p {
  color: #475569;
}

.detail-tags {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.soft-tags span {
  color: #0f766e;
  background: #ccfbf1;
}

.detail-content section {
  margin-top: 24px;
}

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

.related-section {
  margin-top: 30px;
}

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

.search-page-form {
  min-width: min(460px, 100%);
}

.search-fallback.is-hidden {
  display: none;
}

.site-footer {
  color: #e5e7eb;
  background: linear-gradient(135deg, #111827, #1e3a8a);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: #fff;
}

.footer-main p {
  max-width: 620px;
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer h2 {
  color: #fff;
  font-size: 18px;
}

.site-footer ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(226, 232, 240, 0.12);
  padding: 18px 24px 24px;
  color: #cbd5e1;
  text-align: center;
}

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .top-nav {
    height: 64px;
    padding: 0 18px;
  }

  .page-main {
    padding: 82px 16px 48px;
  }

  .hero-carousel,
  .hero-slides {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 38px 22px 86px;
  }

  .hero-poster {
    max-width: 240px;
    margin: 0 auto;
    transform: rotate(0deg);
  }

  .search-hero-panel,
  .page-hero,
  .section-heading,
  .panel-title,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

  .page-hero {
    padding: 32px 22px;
  }

  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 560px) {
  .brand-name {
    font-size: 18px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-title-block h1 {
    font-size: 34px;
  }

  .hero-content p,
  .page-hero p,
  .detail-title-block p {
    font-size: 16px;
  }

  .site-search {
    flex-direction: column;
  }

  .site-search input,
  .site-search button {
    min-height: 46px;
  }

  .content-section,
  .detail-content,
  .search-hero-panel {
    padding: 20px;
  }

  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .category-cover {
    max-height: 240px;
  }
}
