* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-soft: #eff6ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.32);
  --card: rgba(255, 255, 255, 0.86);
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --cyan: #06b6d4;
  --indigo: #4f46e5;
  --rose: #f43f5e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 28px rgba(37, 99, 235, 0.12);
  --radius: 22px;
}

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

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: 80;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 212px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow-soft);
}

.brand-text strong,
.brand-text em {
  display: block;
}

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

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

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

.nav-link,
.nav-dropdown > button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #334155;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-dropdown > button:hover {
  color: var(--blue-deep);
  background: rgba(37, 99, 235, 0.1);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 180px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #334155;
}

.dropdown-panel a:hover {
  background: #eff6ff;
  color: var(--blue-deep);
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #e0f2fe;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: #0369a1;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.mobile-nav a {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease, visibility 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(14, 165, 233, 0.42), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.3)),
    linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.92));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 110px;
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(280px, 360px);
  gap: 42px;
  align-items: end;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
  color: #dbeafe;
  font-size: 14px;
}

.hero h1 {
  max-width: 720px;
  margin: 20px 0 16px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 690px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 21px);
}

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

.btn-primary,
.btn-soft,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  padding: 11px 19px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-soft {
  color: #e0f2fe;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.btn-ghost {
  color: var(--blue-deep);
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: #ffffff;
}

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

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.hero-panel strong,
.hero-panel span {
  display: block;
}

.hero-panel strong {
  margin-bottom: 10px;
  font-size: 20px;
}

.hero-panel span {
  color: #bfdbfe;
}

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

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

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

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 76px;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-deep);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.page-head h1,
.section-title h2,
.detail-title h1 {
  margin: 0;
  color: #111827;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.page-head h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.page-head p,
.section-title p,
.detail-lead {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section {
  margin-top: 58px;
}

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

.section-title h2 {
  font-size: clamp(26px, 3vw, 36px);
}

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

.category-card {
  min-height: 160px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.82)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 38%);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 9px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.filter-bar {
  position: sticky;
  top: 86px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px;
  gap: 12px;
  padding: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.46);
  border-radius: 16px;
  padding: 12px 14px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #dbeafe;
}

.movie-card.wide .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.duration,
.play-badge {
  position: absolute;
  z-index: 2;
}

.duration {
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.82);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.4);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-body p {
  display: -webkit-box;
  min-height: 45px;
  margin: 8px 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.meta-row span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 9px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
}

.tag-row span,
.detail-meta span.accent {
  color: #1d4ed8;
  background: #dbeafe;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-num {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rose), var(--blue));
}

.rank-item img {
  width: 76px;
  height: 94px;
  border-radius: 15px;
  object-fit: cover;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--blue-deep);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

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

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.36);
  cursor: pointer;
}

.play-cover.is-hidden {
  display: none;
}

.play-cover span {
  display: block;
  font-weight: 900;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.4);
}

.detail-side {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.detail-side img {
  width: 100%;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-title {
  margin-top: 26px;
}

.detail-title h1 {
  font-size: clamp(32px, 4vw, 54px);
}

.detail-lead {
  font-size: 18px;
}

.detail-meta {
  margin: 18px 0;
}

.content-card {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 16px;
}

.content-card p + p {
  margin-top: 14px;
}

.empty-card {
  display: none;
  padding: 36px;
  border: 1px dashed rgba(148, 163, 184, 0.72);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.74);
}

.empty-card.visible {
  display: block;
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

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

.footer-inner p {
  margin: 6px 0 0;
}

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

.footer-links a {
  color: #e0f2fe;
}

.copyright {
  grid-column: 1 / -1;
  color: #94a3b8;
  font-size: 13px;
}

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

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

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-side {
    max-width: 420px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 78px;
  }

  .hero-panel {
    display: none;
  }

  .page-head,
  .section-title {
    display: block;
  }

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

  .filter-bar {
    position: static;
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 520px) {
  .header-inner,
  .mobile-nav,
  .page-shell,
  .footer-inner,
  .hero-content {
    width: min(100% - 22px, 1240px);
  }

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 78vh;
  }

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

  .category-grid,
  .movie-grid,
  .movie-grid.compact,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 40px 68px minmax(0, 1fr);
  }

  .rank-item img {
    width: 68px;
    height: 84px;
  }

  .content-card,
  .detail-side {
    padding: 20px;
    border-radius: 22px;
  }
}
