:root {
  --bg: #f7fbff;
  --panel: #ffffff;
  --panel-soft: #f0f7ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --cyan: #0891b2;
  --gold: #f59e0b;
  --shadow: 0 18px 50px rgba(30, 64, 175, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.16), transparent 30rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #fff;
  background: linear-gradient(105deg, #2563eb 0%, #1d4ed8 45%, #06b6d4 100%);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 24px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  font-size: 13px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 9px 15px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 22px;
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.cover-img.is-missing {
  display: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18) 100%),
    radial-gradient(circle at 72% 38%, rgba(37, 99, 235, 0.36), transparent 24rem);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: 48px;
  color: #fff;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 6px 12px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy .eyebrow {
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.hero-tags span,
.detail-tags span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

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

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

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

.btn.primary {
  color: #fff;
  background: linear-gradient(105deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.3);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.btn.ghost.dark {
  color: var(--blue);
  background: #e0f2fe;
}

.hero-poster,
.detail-poster,
.poster-shell,
.rank-cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #1d4ed8, #06b6d4);
}

.hero-poster {
  width: 280px;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.hero-poster img,
.detail-poster img,
.poster-shell img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span,
.detail-poster span,
.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(245, 158, 11, 0.95);
  font-weight: 900;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  font-size: 34px;
  transform: translateY(-50%);
}

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

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

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

.section-block {
  margin-top: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.intro-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.section-heading h2,
.intro-panel h2,
.page-hero h1,
.player-section h2,
.detail-content h2 {
  margin: 10px 0 0;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.15;
}

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

.intro-panel p,
.page-hero p,
.detail-content p {
  color: var(--muted);
}

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

.category-card,
.category-wide {
  display: flex;
  min-height: 120px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(145deg, #eff6ff, #ffffff);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-wide:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(30, 64, 175, 0.16);
}

.category-card strong,
.category-wide span {
  color: var(--blue-deep);
  font-size: 18px;
  font-weight: 900;
}

.category-card span,
.category-wide p {
  color: var(--muted);
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link,
.poster-shell {
  display: block;
}

.poster-shell {
  aspect-ratio: 3 / 4;
  border-radius: 0 0 18px 18px;
}

.poster-title-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #fff;
  text-align: center;
  font-weight: 900;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.25), transparent 10rem),
    linear-gradient(145deg, #1d4ed8, #06b6d4);
}

.poster-shell img {
  position: relative;
  z-index: 2;
}

.poster-badge {
  z-index: 3;
  font-size: 13px;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #475569;
  font-size: 12px;
}

.card-meta span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #eff6ff;
}

.rank-preview {
  margin-bottom: 36px;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.rank-list b,
.rank-num {
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
}

.rank-list em {
  color: var(--blue);
  font-style: normal;
  font-weight: 800;
}

.page-main,
.detail-main {
  padding: 34px 0 48px;
}

.page-hero {
  border-radius: 28px;
  padding: 42px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 85% 30%, rgba(8, 145, 178, 0.2), transparent 20rem);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  max-width: 800px;
}

.compact-hero p {
  max-width: 860px;
  margin: 12px 0 0;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
}

.search-wrap span {
  color: var(--blue);
  font-weight: 900;
}

.search-wrap input {
  width: 100%;
  border: 0;
  border-radius: 14px;
  outline: none;
  padding: 13px 14px;
  background: #eff6ff;
  color: var(--text);
  font-size: 15px;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-filters button {
  border: 0;
  border-radius: 999px;
  padding: 10px 13px;
  color: var(--blue-deep);
  background: #dbeafe;
  font-weight: 800;
}

.empty-state {
  border-radius: 16px;
  padding: 18px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

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

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 64px 92px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px;
}

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

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  border-radius: 30px;
  padding: 28px;
  background:
    linear-gradient(135deg, #0f172a, #1e3a8a 58%, #0891b2);
  box-shadow: var(--shadow);
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.detail-copy {
  color: #fff;
}

.detail-copy h1 {
  margin: 14px 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.detail-copy .lead {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.player-section,
.detail-content {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-section h2 {
  margin: 0 0 18px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.22), transparent 18rem),
    rgba(2, 6, 23, 0.18);
}

.play-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.45);
  font-size: 36px;
}

.player-box.playing .play-overlay {
  display: none;
}

.detail-content {
  display: grid;
  gap: 22px;
}

.detail-content h2 {
  font-size: 26px;
}

.detail-content p {
  margin: 12px 0 0;
  font-size: 17px;
}

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

.site-footer {
  margin-top: 40px;
  padding: 34px 0;
  color: #dbeafe;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 24px;
}

.footer-logo {
  margin-bottom: 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: #93c5fd;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
}

.footer-links a {
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
}

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    border-radius: 18px;
    padding: 12px;
    background: #1d4ed8;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  }

  .site-header.is-open .site-nav {
    display: grid;
  }

  .hero-carousel {
    min-height: 680px;
  }

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

  .hero-poster {
    display: none;
  }

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

  .intro-panel,
  .section-heading,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .ranking-row {
    grid-template-columns: 42px 76px minmax(0, 1fr);
  }

  .rank-cover {
    width: 76px;
  }

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

@media (max-width: 520px) {
  .shell {
    width: min(100% - 22px, 1180px);
  }

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

  .brand-text em {
    display: none;
  }

  .section-block,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-content {
    padding: 18px;
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 14px;
  }

  .hero-arrow {
    display: none;
  }
}
