:root {
  --night-950: #071927;
  --night-900: #102a43;
  --night-850: #183652;
  --night-800: #243b53;
  --night-700: #334e68;
  --night-600: #486581;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-soft: rgba(51, 78, 104, 0.78);
  --card-bg: rgba(36, 59, 83, 0.72);
  --hero-gradient: linear-gradient(to bottom, rgba(16, 42, 67, 0.95), rgba(36, 59, 83, 0.80));
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 34rem),
    radial-gradient(circle at top right, rgba(90, 77, 126, 0.24), transparent 28rem),
    var(--night-900);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background: linear-gradient(135deg, #071927 0%, #102a43 46%, #243b53 100%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 76%);
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(36, 59, 83, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

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

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.34);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  color: #d1d5db;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-400);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  background: rgba(16, 42, 67, 0.62);
  border: 1px solid rgba(51, 78, 104, 0.88);
  border-radius: 12px;
}

.header-search input,
.mobile-search input {
  width: 220px;
  min-width: 0;
  padding: 9px 12px;
  color: var(--text-main);
  background: transparent;
  border: 0;
  outline: none;
}

.header-search button,
.mobile-search button {
  height: 40px;
  padding: 0 14px;
  color: #111827;
  cursor: pointer;
  background: var(--amber-500);
  border: 0;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  color: var(--text-main);
  cursor: pointer;
  background: transparent;
  border: 0;
  font-size: 25px;
}

.mobile-menu {
  border-top: 1px solid var(--border-soft);
  background: rgba(16, 42, 67, 0.96);
}

.mobile-menu-inner {
  display: grid;
  gap: 14px;
  padding: 18px 0;
}

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

.mobile-category-link {
  padding: 10px 12px;
  color: #d1d5db;
  background: rgba(36, 59, 83, 0.76);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.hero-slide.active .hero-bg {
  transform: scale(1.10);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 25, 39, 0.92) 0%, rgba(16, 42, 67, 0.72) 43%, rgba(16, 42, 67, 0.28) 100%),
    linear-gradient(to bottom, rgba(16, 42, 67, 0.10), rgba(16, 42, 67, 0.96));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 24px;
  width: min(720px, 100%);
  padding: 110px 0 96px;
  animation: fadeIn 0.65s ease both;
}

.eyebrow {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  color: var(--amber-400);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  font-size: 14px;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.hero-copy {
  max-width: 650px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.filter-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.27);
  border-radius: 999px;
  font-size: 13px;
  font-style: normal;
}

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

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
  background: var(--amber-500);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.25);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--amber-400);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.34);
}

.button.ghost {
  color: #f3f4f6;
  background: rgba(36, 59, 83, 0.72);
  border: 1px solid rgba(156, 163, 175, 0.28);
  box-shadow: none;
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  background: var(--amber-500);
}

.quick-search-panel {
  position: relative;
  z-index: 5;
  margin-top: -42px;
}

.quick-search-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
  background: rgba(36, 59, 83, 0.84);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.quick-search-card input {
  width: 100%;
  padding: 15px 16px;
  color: var(--text-main);
  background: rgba(16, 42, 67, 0.72);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  outline: none;
}

.quick-filter-links {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-filter-links a {
  padding: 8px 12px;
  color: #d1d5db;
  background: rgba(16, 42, 67, 0.62);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.quick-filter-links a:hover {
  color: var(--amber-400);
  border-color: rgba(245, 158, 11, 0.40);
}

.content-section {
  padding: 56px 0;
}

.content-section.tight {
  padding-top: 28px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

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

.section-more {
  color: var(--amber-400);
  font-weight: 700;
}

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: grid;
  gap: 10px;
  height: 100%;
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(16, 42, 67, 0.74);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.20);
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
}

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #111827;
  background: rgba(245, 158, 11, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-badge {
  position: absolute;
  top: 10px;
  padding: 4px 8px;
  font-size: 12px;
  color: #fff;
  background: rgba(16, 42, 67, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.year-badge {
  left: 10px;
}

.type-badge {
  right: 10px;
  color: #111827;
  background: rgba(245, 158, 11, 0.92);
}

.movie-card:hover .poster-frame img {
  transform: scale(1.08);
  filter: saturate(1.12);
}

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

.movie-card-body {
  display: grid;
  gap: 4px;
}

.movie-card-body strong {
  display: -webkit-box;
  overflow: hidden;
  color: #e5e7eb;
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-card-body strong {
  color: var(--amber-400);
}

.movie-card-body em,
.movie-card-body small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag-row span {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 11px;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
  gap: 28px;
}

.rank-panel,
.category-card,
.info-panel,
.player-panel,
.detail-card,
.search-panel {
  background: rgba(36, 59, 83, 0.72);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.rank-panel {
  padding: 18px;
}

.rank-panel h2,
.info-panel h2,
.player-panel h2,
.detail-card h2,
.search-panel h2 {
  margin: 0 0 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 38px 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: rgba(16, 42, 67, 0.50);
  border: 1px solid rgba(51, 78, 104, 0.66);
  border-radius: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.38);
}

.rank-number {
  color: var(--amber-400);
  font-size: 19px;
  font-weight: 900;
}

.rank-item img {
  width: 52px;
  height: 72px;
  object-fit: cover;
  background: rgba(16, 42, 67, 0.72);
  border-radius: 10px;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy small {
  color: var(--text-muted);
}

.rank-score {
  color: #fde68a;
  font-weight: 800;
}

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

.category-card {
  display: grid;
  min-height: 164px;
  padding: 20px;
  overflow: hidden;
  position: relative;
}

.category-card::after {
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 120px;
  height: 120px;
  content: "";
  background: radial-gradient(circle, rgba(245, 158, 11, 0.30), transparent 70%);
}

.category-card strong {
  font-size: 20px;
}

.category-card small,
.category-card p {
  color: var(--text-muted);
}

.category-card p {
  margin: 8px 0 0;
}

.page-hero {
  padding: 72px 0 38px;
  background:
    radial-gradient(circle at 16% 20%, rgba(245, 158, 11, 0.12), transparent 24rem),
    linear-gradient(135deg, rgba(16, 42, 67, 0.95), rgba(36, 59, 83, 0.74));
  border-bottom: 1px solid var(--border-soft);
}

.page-hero p {
  max-width: 820px;
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 17px;
}

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

.breadcrumbs a {
  color: var(--amber-400);
}

.pagination-note {
  margin: 22px 0 0;
  color: var(--text-muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: blur(4px) saturate(1.1);
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--hero-gradient);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  padding: 58px 0;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(16, 42, 67, 0.74);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.52);
}

.detail-intro {
  max-width: 820px;
  color: #d1d5db;
  font-size: 18px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 44px 0 64px;
}

.player-panel,
.detail-card,
.info-panel,
.search-panel {
  padding: 22px;
}

.video-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 18px;
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.20), transparent 32%),
    rgba(0, 0, 0, 0.44);
  border: 0;
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.player-overlay.is-hidden {
  display: none;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.source-button {
  padding: 10px 14px;
  color: #e5e7eb;
  cursor: pointer;
  background: rgba(16, 42, 67, 0.66);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

.source-button.active,
.source-button:hover {
  color: #111827;
  background: var(--amber-500);
  border-color: var(--amber-500);
}

.player-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--text-muted);
}

.detail-card + .detail-card {
  margin-top: 18px;
}

.detail-card p {
  color: #d1d5db;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(51, 78, 104, 0.52);
}

.info-list dt {
  color: var(--text-muted);
}

.info-list dd {
  margin: 0;
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: rgba(16, 42, 67, 0.50);
  border: 1px solid rgba(51, 78, 104, 0.64);
  border-radius: 14px;
}

.related-item img {
  width: 72px;
  height: 102px;
  object-fit: cover;
  background: rgba(16, 42, 67, 0.72);
  border-radius: 10px;
}

.related-item strong,
.related-item small {
  display: block;
}

.related-item small {
  color: var(--text-muted);
}

.search-panel {
  margin-top: 28px;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 160px auto;
  gap: 12px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  padding: 12px 14px;
  color: var(--text-main);
  background: rgba(16, 42, 67, 0.72);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  outline: none;
}

.search-summary {
  margin: 16px 0 0;
  color: var(--text-muted);
}

.search-results {
  margin-top: 24px;
}

.sitemap-list {
  columns: 4 220px;
  padding-left: 20px;
}

.sitemap-list li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.sitemap-list a {
  color: #d1d5db;
}

.sitemap-list a:hover {
  color: var(--amber-400);
}

.site-footer {
  padding: 44px 0 20px;
  background: rgba(7, 25, 39, 0.74);
  border-top: 1px solid var(--border-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
  gap: 28px;
}

.footer-about p,
.footer-bottom,
.site-footer li,
.site-footer a {
  color: var(--text-muted);
}

.site-footer h3 {
  margin: 0 0 10px;
}

.site-footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  padding-top: 24px;
  margin-top: 28px;
  border-top: 1px solid rgba(51, 78, 104, 0.52);
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

  .header-inner {
    gap: 12px;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    padding: 82px 0 86px;
  }

  .hero-dots {
    right: 24px;
    bottom: 24px;
  }

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

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

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

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

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

  .detail-poster {
    width: min(240px, 72vw);
  }

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

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

  .movie-grid {
    gap: 12px;
  }

  .poster-frame {
    border-radius: 13px;
  }

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

  .rank-score {
    display: none;
  }
}
