:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c31;
  --card: #1e293b;
  --card-strong: #243449;
  --line: #334155;
  --text: #ffffff;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --dim: #64748b;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --red: #f87171;
  --blue: #60a5fa;
  --green: #34d399;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(96, 165, 250, 0.10), transparent 34rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.36);
}

.brand-text {
  font-size: 20px;
}

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

.site-nav a {
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--amber-light);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.96);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #ffffff;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: flex;
  align-items: center;
}

.hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.28;
  animation: pulseGlow 4s ease-in-out infinite;
}

.hero-glow-left {
  top: 12%;
  left: 8%;
  background: var(--amber);
}

.hero-glow-right {
  right: 8%;
  bottom: 12%;
  background: var(--blue);
  animation-delay: 1.4s;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.58fr);
  gap: 48px;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 14px;
  max-width: 820px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  color: var(--amber-light);
  font-size: clamp(24px, 3.2vw, 42px);
  line-height: 1.15;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
}

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

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

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
}

.btn-ghost {
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #fde68a;
  background: rgba(15, 23, 42, 0.64);
}

.hero-poster {
  position: relative;
  display: block;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(96, 165, 250, 0.14)),
    var(--card);
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.hero-poster span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 700;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.46);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 54px;
  background: var(--amber-light);
}

.quick-search-panel {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-top: -42px;
  padding: 18px;
  border: 1px solid rgba(51, 65, 85, 0.74);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.quick-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.quick-search label {
  color: var(--amber-light);
  font-weight: 800;
}

.quick-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid rgba(51, 65, 85, 0.88);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.68);
  outline: none;
}

.quick-search input {
  height: 44px;
  padding: 0 18px;
}

.quick-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(245, 158, 11, 0.9);
}

.quick-search button {
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: var(--amber-light);
  padding: 0 22px;
  font-weight: 800;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.quick-links a,
.category-pill-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.quick-links a:hover,
.category-pill-grid a:hover {
  background: rgba(245, 158, 11, 0.2);
  transform: translateY(-2px);
}

.page-section,
.page-main {
  padding: 64px 0;
}

.page-main {
  min-height: 70vh;
}

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

.section-head.slim {
  align-items: center;
  margin-bottom: 18px;
}

.section-head h2,
.page-title-block h1,
.text-panel h2 {
  margin: 0;
  color: #ffffff;
  line-height: 1.15;
}

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

.section-head p,
.page-title-block p {
  margin: 8px 0 0;
  color: var(--subtle);
}

.section-link {
  color: var(--amber-light);
  font-weight: 800;
  white-space: nowrap;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.20);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.52);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.poster-wrap,
.rank-thumb,
.detail-poster {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.20), rgba(96, 165, 250, 0.14)),
    #111827;
}

.poster-wrap {
  height: 250px;
}

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

.poster-wrap img,
.rank-thumb img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #111827;
  background: var(--amber-light);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--subtle);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--dim);
  font-size: 13px;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 34px;
}

.ranking-panel,
.text-panel,
.search-panel,
.category-card,
.rank-card,
.video-shell {
  border: 1px solid rgba(51, 65, 85, 0.74);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.ranking-panel {
  align-self: start;
  position: sticky;
  top: 86px;
  padding: 22px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 10px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.58);
  transition: background 0.2s ease, color 0.2s ease;
}

.ranking-row:hover {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.14);
}

.ranking-row b,
.rank-card b {
  color: var(--amber-light);
}

.ranking-row span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-row em {
  color: var(--dim);
  font-style: normal;
  font-size: 13px;
}

.category-pill-grid,
.category-overview {
  display: grid;
  gap: 16px;
}

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

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

.category-card {
  min-height: 132px;
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.54);
}

.category-card span {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--subtle);
}

.page-title-block {
  margin-bottom: 36px;
  padding: 36px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(96, 165, 250, 0.08)),
    rgba(15, 23, 42, 0.84);
}

.page-title-block h1 {
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(130px, 0.55fr));
  gap: 12px;
  padding: 18px;
  margin-bottom: 18px;
}

.search-panel input,
.search-panel select {
  min-height: 44px;
  padding: 0 16px;
}

.search-panel select {
  color: var(--muted);
}

.search-status {
  margin: 0 0 22px;
  color: var(--subtle);
}

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

.rank-card a {
  display: grid;
  grid-template-columns: 54px 88px minmax(0, 1fr) 60px;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
}

.rank-thumb {
  width: 88px;
  height: 112px;
  border-radius: 14px;
}

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

.rank-card p {
  margin: 0 0 8px;
  color: var(--subtle);
}

.rank-card span {
  color: var(--dim);
  font-size: 13px;
}

.rank-card em {
  color: var(--amber-light);
  font-size: 22px;
  font-weight: 900;
  font-style: normal;
  text-align: right;
}

.detail-main {
  padding: 30px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--subtle);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-light);
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-bottom: 38px;
}

.detail-poster {
  height: 480px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 19px;
}

.detail-tags {
  margin-bottom: 26px;
}

.player-section {
  margin-bottom: 36px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.18), transparent 35%),
    #000000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(15, 23, 42, 0.38));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  color: #111827;
  background: var(--amber-light);
  box-shadow: 0 0 42px rgba(245, 158, 11, 0.42);
  font-size: 30px;
}

.play-overlay strong {
  font-size: 20px;
}

.video-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  margin: 0;
  color: #fde68a;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

.text-panel {
  padding: 28px;
}

.text-panel h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: var(--muted);
  white-space: pre-line;
}

.detail-neighbor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 30px;
}

.detail-neighbor a {
  padding: 16px 18px;
  border: 1px solid rgba(51, 65, 85, 0.76);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.84);
}

.detail-neighbor a:hover {
  color: var(--amber-light);
  border-color: rgba(245, 158, 11, 0.42);
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(15, 23, 42, 0.76);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 42px;
  padding: 42px 0;
}

.site-footer p {
  max-width: 540px;
  color: var(--subtle);
}

.site-footer h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--subtle);
}

.site-footer a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
  color: var(--dim);
  text-align: center;
  font-size: 14px;
}

.is-missing::before {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.22), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(96, 165, 250, 0.18), transparent 35%),
    #111827;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.22;
  }

  50% {
    transform: scale(1.12);
    opacity: 0.35;
  }
}

@media (max-width: 1100px) {
  .featured-grid,
  .compact-grid,
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column-section,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px;
    border-radius: 12px;
  }

  .site-nav a:hover {
    background: rgba(245, 158, 11, 0.12);
  }

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-inner {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 44px;
    padding-bottom: 80px;
  }

  .hero-poster {
    min-height: 300px;
  }

  .hero-poster img {
    height: 300px;
  }

  .hero-dots {
    bottom: 24px;
  }

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

  .featured-grid,
  .compact-grid,
  .library-grid,
  .category-overview,
  .category-pill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-poster {
    height: 420px;
  }

  .rank-card a {
    grid-template-columns: 42px 76px minmax(0, 1fr);
  }

  .rank-card em {
    display: none;
  }
}

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

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

  .hero-copy p,
  .detail-one-line {
    font-size: 16px;
  }

  .featured-grid,
  .compact-grid,
  .library-grid,
  .category-overview,
  .category-pill-grid {
    grid-template-columns: 1fr;
  }

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

  .page-title-block {
    padding: 24px;
  }
}
