:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #1e293b;
  --bg-card-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --sky: #38bdf8;
  --sky-strong: #0284c7;
  --shadow: 0 24px 80px rgba(2, 132, 199, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.12), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.97), rgba(15, 23, 42, 0.97));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #0f172a;
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.28);
  font-size: 14px;
  padding-left: 2px;
}

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

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

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted-strong);
  font-size: 15px;
}

.nav-link,
.mobile-nav-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--text);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.top-search,
.mobile-search,
.search-panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.search-panel input {
  width: 230px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.search-panel input:focus {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.top-search button,
.mobile-search button,
.search-panel button {
  color: var(--text);
  background: var(--sky-strong);
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.search-panel button:hover {
  background: var(--sky);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 42px;
  height: 42px;
  gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

.mobile-nav-link {
  color: var(--muted-strong);
  padding: 6px 0;
}

.mobile-search input {
  width: 100%;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide img.is-missing,
.poster-wrap img.is-missing,
.rank-poster img.is-missing {
  display: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.84) 25%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.72), transparent 64%);
}

.hero-copy {
  position: absolute;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  max-width: var(--container);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: white;
  background: var(--sky-strong);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
  margin-bottom: 16px;
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.1;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 18px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-meta span,
.detail-meta a,
.card-meta span,
.card-meta a {
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

.detail-meta a,
.card-meta a {
  color: #e0f2fe;
  background: rgba(2, 132, 199, 0.28);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.primary-btn,
.ghost-btn,
.section-more,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border 0.2s ease;
}

.primary-btn {
  min-height: 46px;
  padding: 0 24px;
  color: #0f172a;
  background: #ffffff;
  font-weight: 700;
}

.primary-btn:hover {
  color: white;
  background: var(--sky-strong);
  transform: translateY(-2px);
}

.ghost-btn {
  min-height: 46px;
  padding: 0 22px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.25);
}

.ghost-btn:hover {
  border-color: var(--sky);
  background: rgba(56, 189, 248, 0.14);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  color: white;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  font-size: 32px;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.62);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.48);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: white;
}

.page-content {
  padding: 52px 0;
}

.content-section {
  margin-bottom: 64px;
}

.section-head,
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.list-heading {
  display: block;
}

.list-heading h1,
.narrow-content h1 {
  margin: 16px 0 10px;
  font-size: clamp(30px, 5vw, 46px);
}

.list-heading p {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.8;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title span {
  color: var(--sky);
  font-size: 24px;
}

.section-title h2 {
  margin: 0;
  font-size: 26px;
}

.section-more,
.back-link {
  color: var(--sky);
  font-size: 14px;
}

.section-more:hover,
.back-link:hover {
  color: #7dd3fc;
}

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

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

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

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

.masonry-grid {
  columns: 3 260px;
  column-gap: 22px;
}

.masonry-grid .movie-card {
  break-inside: avoid;
  margin-bottom: 22px;
}

.movie-card {
  overflow: hidden;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 45px rgba(2, 6, 23, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.48);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  height: 240px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.24), transparent 18rem),
    linear-gradient(135deg, #111827, #020617);
}

.movie-card-small .poster-wrap {
  height: 150px;
}

.movie-card-large .poster-wrap {
  height: 330px;
}

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

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

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.hover-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(2, 6, 23, 0.34);
  opacity: 0;
  font-size: 42px;
  transition: opacity 0.25s ease;
}

.movie-card:hover .hover-play {
  opacity: 1;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.45;
}

.card-body h3 a:hover {
  color: var(--sky);
}

.card-body p {
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.card-meta {
  gap: 7px;
  margin-bottom: 12px;
}

.card-meta span,
.card-meta a {
  padding: 4px 8px;
  font-size: 12px;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-pill {
  display: inline-flex;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-tile {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.94), rgba(14, 165, 233, 0.86));
  border-color: rgba(125, 211, 252, 0.7);
}

.category-tile span {
  font-size: 20px;
  font-weight: 700;
}

.category-tile small {
  color: var(--muted-strong);
}

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

.detail-main,
.detail-side,
.info-card,
.search-panel {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.18);
}

.detail-main {
  overflow: hidden;
}

.player-shell {
  background: #020617;
}

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

.video-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.video-overlay-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.52));
  border: 0;
  cursor: pointer;
}

.video-overlay-play span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding-left: 5px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.35);
  font-size: 34px;
}

.video-overlay-play.is-hidden {
  display: none;
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  margin: 0;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.86);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
}

.detail-copy {
  padding: 26px;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 44px);
}

.detail-copy blockquote {
  margin: 24px 0;
  color: var(--muted-strong);
  background: rgba(30, 41, 59, 0.58);
  border-left: 4px solid var(--sky);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 20px;
  font-size: 18px;
  line-height: 1.8;
}

.detail-panel {
  margin-top: 22px;
  padding: 22px;
  background: rgba(30, 41, 59, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.detail-panel h2,
.detail-side h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-panel p,
.info-card p {
  color: var(--muted-strong);
  line-height: 1.85;
}

.detail-panel strong {
  color: white;
  margin-left: 8px;
}

.detail-panel strong:first-child {
  margin-left: 0;
}

.detail-tags {
  margin-top: 22px;
}

.detail-side {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.side-list {
  display: grid;
  gap: 16px;
}

.side-list .movie-card-small .poster-wrap {
  height: 140px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 130px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: rgba(30, 41, 59, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rank-number {
  color: var(--sky);
  font-size: 28px;
  font-weight: 800;
  text-align: center;
}

.rank-poster {
  display: block;
  height: 86px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #020617);
  border-radius: var(--radius-sm);
}

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

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info h2 a:hover {
  color: var(--sky);
}

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

.search-panel {
  padding: 18px;
  margin-bottom: 22px;
}

.search-panel input {
  width: 100%;
  border-radius: 14px;
}

.search-panel button {
  min-width: 98px;
  border-radius: 14px;
}

.search-summary {
  color: var(--muted-strong);
  margin-bottom: 20px;
}

.narrow-content {
  max-width: 880px;
}

.info-card {
  margin-top: 22px;
  padding: 24px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
  padding: 46px 0;
}

.footer-grid h2 {
  margin: 0 0 16px;
  font-size: 17px;
}

.footer-grid p {
  max-width: 430px;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

  .top-search input {
    width: 180px;
  }

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

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

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: flex;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-copy {
    bottom: 72px;
  }

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

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .small-grid,
  .hot-grid,
  .archive-grid,
  .category-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-row {
    grid-template-columns: 44px 96px 1fr;
    gap: 12px;
  }
}

@media (max-width: 540px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

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

  .brand-copy small {
    display: none;
  }

  .hero-carousel {
    height: 520px;
  }

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

  .hero-copy h2 {
    font-size: 28px;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .movie-grid,
  .small-grid,
  .hot-grid,
  .archive-grid,
  .category-preview-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap,
  .movie-card-small .poster-wrap,
  .movie-card-large .poster-wrap {
    height: 230px;
  }

  .detail-copy,
  .detail-panel,
  .detail-side,
  .info-card {
    padding: 18px;
  }

  .rank-row {
    grid-template-columns: 1fr;
  }

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

  .rank-poster {
    height: 180px;
  }

  .search-panel {
    flex-direction: column;
    align-items: stretch;
  }
}
