:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #0891b2;
  --dark: #0f172a;
  --orange: #f97316;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 42%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

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

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

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  color: #334155;
  border-radius: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.header-search {
  margin-left: auto;
}

.header-search input,
.mobile-panel input,
.quick-search-card input,
.search-line input,
.filter-line select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  outline: none;
  background: #ffffff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 270px;
  padding: 11px 14px;
}

.header-search input:focus,
.mobile-panel input:focus,
.quick-search-card input:focus,
.search-line input:focus,
.filter-line select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

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

.mobile-panel input {
  padding: 12px 14px;
}

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

.hero-stage {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 4s ease;
}

.hero-slide.active img {
  transform: scale(1);
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(8, 145, 178, 0.36), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.62) 45%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 7vw, 82px);
  bottom: clamp(32px, 8vw, 92px);
  width: min(650px, calc(100% - 48px));
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #93c5fd;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-content h1 {
  margin: 16px 0;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-intro {
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags,
.detail-tags {
  margin-top: 18px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.card-tags span {
  padding: 5px 9px;
  color: #1d4ed8;
  background: #eff6ff;
}

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

.btn-primary,
.btn-ghost,
.btn-link,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.rank-action {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-link:hover,
.rank-action:hover {
  transform: translateY(-2px);
}

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

.btn-ghost.dark {
  color: #1e293b;
  border-color: #cbd5e1;
  background: #ffffff;
}

.btn-link {
  color: #dbeafe;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: clamp(24px, 7vw, 82px);
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 30px;
  height: 4px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
  background: #ffffff;
}

.section-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 54px auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  margin-top: -36px;
  position: relative;
  z-index: 5;
}

.quick-search-card,
.side-panel,
.filter-panel,
.category-overview-card,
.text-block,
.player-section,
.detail-side,
.detail-main {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.quick-search-card {
  padding: 26px;
}

.quick-search-card h2,
.side-panel h2,
.text-block h2,
.detail-side h2,
.section-heading h2,
.category-overview-card h2,
.ranking-info h2 {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.quick-search-card h2,
.side-panel h2,
.text-block h2,
.detail-side h2 {
  font-size: 24px;
}

.quick-search-card p,
.category-overview-card p,
.text-block p,
.ranking-info p,
.movie-card-body p,
.compact-card p {
  color: var(--muted);
  line-height: 1.75;
}

.quick-search-card input {
  margin-top: 16px;
  padding: 14px 16px;
}

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

.quick-links a {
  display: flex;
  align-items: center;
  padding: 20px;
  min-height: 96px;
  color: #ffffff;
  border-radius: 22px;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: var(--soft-shadow);
  font-weight: 900;
}

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

.section-heading h2 {
  margin-top: 8px;
  font-size: clamp(26px, 4vw, 42px);
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #ffffff;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--soft-shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.35s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 10%, rgba(15, 23, 42, 0.88) 100%);
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

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

.movie-card,
.compact-card,
.ranking-item {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.movie-card:hover,
.compact-card:hover,
.ranking-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

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

.poster-link img,
.compact-card img,
.ranking-poster img,
.detail-cover,
.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.poster-year,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.poster-year {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.66);
}

.poster-play {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.movie-title,
.compact-title,
.ranking-info h2 a {
  display: block;
  color: #0f172a;
  font-weight: 900;
}

.movie-title {
  font-size: 17px;
  line-height: 1.35;
}

.movie-card-body p {
  min-height: 56px;
  margin: 8px 0 12px;
  font-size: 14px;
}

.movie-meta {
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.card-tags {
  margin-top: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 24px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.rank-card strong {
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.rank-card img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-card span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.side-panel {
  padding: 22px;
}

.compact-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.compact-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
}

.compact-card img {
  height: 96px;
  border-radius: 14px;
  background: #dbeafe;
}

.compact-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-card p {
  margin: 5px 0;
  font-size: 13px;
}

.compact-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.page-hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  overflow: hidden;
  color: #ffffff;
  border-radius: 30px;
  background:
    radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.4), transparent 30%),
    linear-gradient(135deg, #0f172a, #1d4ed8 62%, #0891b2);
  box-shadow: var(--shadow);
}

.page-hero.slim {
  min-height: 300px;
  display: flex;
  align-items: center;
  padding: 54px;
}

.page-hero h1 {
  margin-bottom: 14px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
}

.category-cover {
  height: 220px;
  overflow: hidden;
  border-radius: 18px;
  background: #dbeafe;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.sample-links a {
  padding: 7px 10px;
  color: #1d4ed8;
  border-radius: 999px;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 800;
}

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

.search-line input,
.filter-line select {
  min-height: 48px;
  padding: 0 14px;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 70px 92px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.rank-number {
  color: var(--blue);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.ranking-poster {
  width: 92px;
  height: 122px;
  overflow: hidden;
  border-radius: 16px;
  background: #dbeafe;
}

.ranking-info p {
  margin: 8px 0 10px;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: blur(2px);
  transform: scale(1.04);
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
  color: #ffffff;
}

.detail-cover-wrap {
  padding: 10px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #bfdbfe;
  font-weight: 800;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.13);
}

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

.detail-main {
  padding: 18px;
}

.player-section {
  overflow: hidden;
  padding: 0;
  background: #020617;
}

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

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.74));
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 24px 44px rgba(37, 99, 235, 0.34);
  font-size: 30px;
}

.text-block {
  padding: 24px;
  margin-top: 18px;
}

.text-block p {
  margin: 14px 0 0;
  color: #334155;
  font-size: 16px;
}

.genre-tags span {
  color: #075985;
  background: #ecfeff;
  border-color: #bae6fd;
}

.detail-side {
  align-self: start;
  padding: 22px;
  position: sticky;
  top: 92px;
}

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

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

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

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

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

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

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

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.is-filtered-out {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

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

  .quick-panel,
  .split-section,
  .detail-layout,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    min-height: 64px;
  }

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

  .hero {
    width: min(100% - 20px, 1180px);
    margin-top: 14px;
  }

  .hero-stage {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-content {
    left: 20px;
    bottom: 72px;
    width: calc(100% - 40px);
  }

  .hero p,
  .page-hero p,
  .detail-intro {
    font-size: 15px;
  }

  .hero-control {
    top: auto;
    bottom: 18px;
    transform: none;
  }

  .hero-control.prev {
    left: auto;
    right: 74px;
  }

  .hero-control.next {
    right: 20px;
  }

  .hero-dots {
    left: 20px;
    bottom: 34px;
  }

  .section-shell,
  .page-hero {
    width: min(100% - 20px, 1180px);
  }

  .page-hero.slim {
    padding: 34px 24px;
  }

  .quick-panel {
    margin-top: 20px;
  }

  .quick-links,
  .category-overview,
  .rank-grid,
  .filter-panel,
  .filter-line,
  .ranking-item,
  .detail-shell {
    grid-template-columns: 1fr;
  }

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

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

  .category-cover {
    height: 260px;
  }

  .ranking-item {
    align-items: stretch;
  }

  .rank-number {
    text-align: left;
  }

  .ranking-poster {
    width: 100%;
    height: 260px;
  }

  .rank-action {
    width: 100%;
  }

  .detail-shell {
    padding: 30px 0;
    gap: 24px;
  }

  .detail-cover-wrap {
    width: min(260px, 80vw);
  }

  .footer-shell {
    padding: 36px 0;
  }
}

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

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

  .btn-primary,
  .btn-ghost,
  .btn-link {
    width: 100%;
  }
}
