:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --slate: #334155;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

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);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #e2e8f0 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.95), rgba(239, 246, 255, 0.95), rgba(248, 250, 252, 0.95));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(191, 219, 254, 0.85);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 68px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

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

.brand-text strong {
  font-size: 22px;
  background: linear-gradient(90deg, #2563eb, #334155);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link {
  padding: 9px 13px;
  border-radius: 12px;
  color: #475569;
  font-size: 14px;
  transition: 0.25s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 3px;
  width: min(330px, 28vw);
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.header-search input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.hero-dot,
.player-start {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.header-search button,
.mobile-search button,
.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  border-radius: 999px;
  padding: 9px 16px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.secondary-button {
  color: #dbeafe;
  border: 1px solid rgba(219, 234, 254, 0.5);
  border-radius: 999px;
  padding: 9px 16px;
  background: rgba(15, 23, 42, 0.25);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  background: #dbeafe;
  color: var(--blue);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #dbeafe;
  padding: 14px 22px 18px;
  background: #ffffff;
}

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

.mobile-panel nav,
.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mobile-search {
  display: flex;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 4px;
}

.mobile-search input {
  flex: 1;
  padding: 10px 12px;
}

.page-shell,
.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 22px;
}

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

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: -28px;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(9px);
  transform: scale(1.08);
  opacity: 0.55;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.93), rgba(15, 23, 42, 0.84), rgba(30, 58, 138, 0.9));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 610px;
  margin: 0 auto;
  padding: 72px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 380px;
  align-items: center;
  gap: 48px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(147, 197, 253, 0.4);
  padding: 8px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-content h1,
.hero-content h2 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.04em;
}

.hero-content p {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
  margin: 0 0 24px;
}

.hero-actions,
.detail-actions,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-poster {
  border-radius: 28px;
  overflow: hidden;
  min-height: 500px;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.45);
  transition: 0.25s ease;
}

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

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

.section-title h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-title p,
.page-title p,
.detail-title p {
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.7;
}

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

.movie-card {
  min-width: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(191, 219, 254, 0.9);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster,
.mini-cover,
.rank-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #60a5fa, #1e3a8a 48%, #0f172a 100%);
}

.poster {
  aspect-ratio: 3 / 4;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

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

.movie-title {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 8px;
}

.movie-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 9px;
}

.movie-card p {
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span,
.detail-tags span,
.cat-pill {
  display: inline-flex;
  align-items: center;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-card {
  display: block;
  min-height: 178px;
  border-radius: 24px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #334155);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -42px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.65;
  position: relative;
  z-index: 2;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 84px minmax(0, 1fr) 180px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbeafe;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-num {
  font-weight: 900;
  color: #2563eb;
  font-size: 24px;
  text-align: center;
}

.rank-cover {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
}

.rank-main strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.rank-main p,
.rank-stat {
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
  font-size: 14px;
}

.filter-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbeafe;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  margin-bottom: 28px;
}

.filter-input,
.filter-select {
  border: 1px solid #bfdbfe;
  background: #ffffff;
  border-radius: 999px;
  padding: 12px 14px;
  min-width: 190px;
}

.filter-input {
  flex: 1;
  min-width: 240px;
}

.detail-hero {
  background: linear-gradient(120deg, #1e3a8a, #0f172a 62%, #1e293b);
  color: #ffffff;
}

.detail-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px;
  align-items: center;
}

.breadcrumb {
  color: #bfdbfe;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

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

.detail-title h1 {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
}

.detail-title p {
  color: #dbeafe;
  font-size: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

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

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid rgba(191, 219, 254, 0.35);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-meta-grid span {
  display: block;
  color: #bfdbfe;
  font-size: 12px;
  margin-bottom: 5px;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  min-height: 500px;
  background: radial-gradient(circle at 30% 20%, #60a5fa, #1e3a8a 48%, #0f172a 100%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.player-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 22px 16px;
}

.player-box {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.78));
}

.player-box.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
}

.player-start {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 34px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.44);
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 22px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 30px;
}

.content-panel,
.related-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbeafe;
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.content-panel h2,
.related-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.content-panel p {
  color: #334155;
  line-height: 1.95;
  font-size: 16px;
  margin: 0 0 24px;
}

.related-panel {
  position: sticky;
  top: 92px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.mini-cover {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
}

.mini-text strong {
  display: block;
  line-height: 1.45;
  color: #0f172a;
}

.mini-text em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  margin-top: 5px;
  line-height: 1.4;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(90deg, #0f172a, #1e3a8a, #0f172a);
  margin-top: 30px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
}

.footer-brand {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
}

.footer-inner p {
  color: #cbd5e1;
  line-height: 1.75;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  color: #dbeafe;
  border: 1px solid rgba(219, 234, 254, 0.22);
  border-radius: 999px;
  padding: 8px 13px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 22px 28px;
  border-top: 1px solid rgba(219, 234, 254, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

.empty-state {
  display: none;
  text-align: center;
  padding: 44px;
  color: var(--muted);
}

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

@media (max-width: 1100px) {
  .card-grid,
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-poster,
  .detail-poster {
    max-width: 420px;
  }
}

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

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

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

  .rank-row {
    grid-template-columns: 48px 70px minmax(0, 1fr);
  }

  .rank-stat {
    display: none;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

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

  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 42px;
    gap: 24px;
  }

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

  .hero-content p {
    font-size: 16px;
  }

  .hero-poster,
  .hero-poster img,
  .detail-poster,
  .detail-poster img {
    min-height: 0;
    height: auto;
  }

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

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

  .movie-title {
    font-size: 15px;
  }

  .section-title {
    display: block;
  }

  .page-shell,
  .section-inner,
  .detail-hero-inner,
  .player-wrap,
  .detail-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .rank-row {
    grid-template-columns: 44px 62px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .rank-main p {
    display: none;
  }

  .filter-input,
  .filter-select {
    width: 100%;
  }
}
