:root {
  color-scheme: dark;
  --bg-950: #020617;
  --bg-900: #0f172a;
  --bg-800: #1e293b;
  --bg-700: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --line: rgba(148, 163, 184, 0.22);
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --orange: #f97316;
  --rose: #f43f5e;
  --shadow-blue: 0 22px 55px rgba(59, 130, 246, 0.18);
  --radius: 18px;
}

* {
  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 30rem),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.12), transparent 28rem),
    linear-gradient(180deg, var(--bg-950), var(--bg-900) 42%, #000 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.45);
}

.brand-text {
  font-size: 1.18rem;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted-2);
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: #60a5fa;
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 250px;
}

.nav-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  color: white;
  padding: 10px 42px 10px 16px;
  outline: none;
}

.nav-search input:focus {
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.nav-search button {
  position: absolute;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.3rem;
}

.mobile-menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: white;
  font-size: 1.7rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
}

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

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 62px;
}

.full-bleed-main {
  width: 100%;
}

.hero {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(120deg, #2563eb, #0891b2 52%, #0f766e);
  box-shadow: var(--shadow-blue);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(255, 255, 255, 0.55) 2px, transparent 2px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 35%);
  background-size: 60px 60px, cover;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 34px;
  align-items: center;
  padding: 54px;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0 0 28px;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-actions,
.toolbar,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
  background: white;
  color: #2563eb;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.btn-primary:hover {
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.24);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.65);
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.btn-dark {
  background: rgba(51, 65, 85, 0.82);
  color: white;
  border-color: rgba(148, 163, 184, 0.22);
}

.hero-art {
  position: relative;
  z-index: 2;
  min-height: 330px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.38);
}

.hero-art img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
  opacity: 0.92;
}

.hero-art::after,
.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.78));
  pointer-events: none;
}

.hero-art.copy-fallback,
.card-poster.copy-fallback {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 16rem),
    linear-gradient(135deg, #1d4ed8, #0891b2 55%, #0f766e);
}

.hero-art.copy-fallback img,
.card-poster.copy-fallback img {
  opacity: 0;
}

.hero-art-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 3;
}

.hero-art-caption strong {
  display: block;
  font-size: 1.4rem;
}

.hero-dots {
  position: absolute;
  left: 54px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 58px;
  background: white;
}

.content-section {
  margin-top: 54px;
}

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

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.2;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}

.section-icon {
  font-size: 2rem;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card,
.category-card,
.info-panel,
.player-panel,
.search-panel,
.rank-item {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.22);
}

.movie-card {
  display: block;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: var(--shadow-blue);
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 190px 1fr;
}

.card-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.horizontal-poster {
  width: 190px;
  height: 100%;
  aspect-ratio: auto;
}

.large-poster {
  aspect-ratio: 16 / 9;
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.play-mark {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: white;
  font-size: 2.3rem;
  opacity: 0;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.55);
  transition: opacity 0.25s ease;
}

.play-mark.big {
  font-size: 3.3rem;
}

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

.duration,
.category-badge {
  position: absolute;
  z-index: 4;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
}

.duration {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.76);
}

.category-badge {
  left: 12px;
  top: 12px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 9px;
  color: white;
  font-size: 1.05rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0 0 14px;
  color: var(--muted-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover h3 {
  color: #60a5fa;
}

.horizontal-body {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  justify-content: space-between;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-meta.compact {
  font-size: 0.82rem;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  font-size: 0.78rem;
  font-weight: 700;
}

.category-card {
  position: relative;
  min-height: 150px;
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(96, 165, 250, 0.55);
}

.category-icon {
  font-size: 2.45rem;
}

.category-card h3 {
  margin: 10px 0 8px;
  font-size: 1.25rem;
}

.category-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.92rem;
}

.category-count {
  position: absolute;
  top: 18px;
  right: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.page-hero {
  padding: 36px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.24), transparent 24rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border: 1px solid var(--line);
  margin-bottom: 34px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted-2);
}

.toolbar {
  justify-content: space-between;
  margin: 22px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.toolbar input,
.toolbar select,
.search-panel input,
.search-panel select {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 11px 14px;
  outline: none;
}

.toolbar input {
  min-width: min(100%, 340px);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  min-width: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted-2);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

.pagination a.active,
.pagination a:hover {
  color: white;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-color: transparent;
}

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

.player-panel {
  padding: 0;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: black;
}

.video-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.64));
  transition: opacity 0.22s ease;
}

.video-player.playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  color: white;
  padding: 14px 24px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(59, 130, 246, 0.36);
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 6;
  color: #bfdbfe;
  font-size: 0.92rem;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(2, 6, 23, 0.92);
}

.player-controls button {
  border: 0;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.8);
  color: white;
  padding: 8px 12px;
  cursor: pointer;
}

.detail-content {
  padding: 24px;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.14;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--muted-2);
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.detail-content h2,
.detail-content h3 {
  margin: 24px 0 10px;
}

.detail-content p {
  color: var(--muted-2);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.sidebar {
  position: sticky;
  top: 92px;
}

.sidebar .info-panel {
  padding: 20px;
}

.related-list {
  display: grid;
  gap: 13px;
}

.related-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 9px;
  border-radius: 14px;
  transition: background 0.22s ease;
}

.related-item:hover {
  background: rgba(51, 65, 85, 0.62);
}

.related-item img {
  width: 110px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.related-item h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

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

.search-controls {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(140px, 0.55fr));
  gap: 12px;
}

.search-status {
  margin-top: 16px;
  color: var(--muted-2);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 180px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 1.25rem;
  font-weight: 900;
}

.rank-item img {
  width: 180px;
  height: 104px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.rank-copy h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.rank-copy p {
  margin: 0;
  color: var(--muted-2);
}

.empty-result {
  padding: 36px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  color: var(--muted-2);
  text-align: center;
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

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

  .hero-slide {
    padding: 34px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-dots {
    left: 34px;
  }

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

  .sidebar {
    position: static;
  }

  .search-controls {
    grid-template-columns: 1fr 1fr;
  }

  .rank-item {
    grid-template-columns: 54px 130px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }
}

@media (max-width: 680px) {
  main {
    width: min(100% - 22px, 1180px);
    padding-top: 22px;
  }

  .hero {
    border-radius: 20px;
    min-height: 720px;
  }

  .hero-slide {
    padding: 24px;
  }

  .hero-actions,
  .toolbar,
  .meta-row {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .btn,
  .toolbar input,
  .toolbar select {
    width: 100%;
  }

  .grid-6,
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal,
  .rank-item,
  .related-item {
    grid-template-columns: 1fr;
  }

  .horizontal-poster,
  .rank-item img,
  .related-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .search-controls {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-content {
    padding: 22px;
  }
}
