:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --amber-strong: #d97706;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.logo:hover {
  color: #fbbf24;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #ffffff;
  box-shadow: 0 10px 32px rgba(245, 158, 11, 0.28);
}

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

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

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-nav a:hover {
  color: #fbbf24;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-mini {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
}

.search-mini input {
  width: 190px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 0 10px 16px;
}

.search-mini input::placeholder {
  color: #64748b;
}

.search-mini button {
  border: 0;
  color: #ffffff;
  background: var(--amber);
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-mini button:hover {
  background: var(--amber-strong);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  padding: 8px 11px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.94);
}

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

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

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

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

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

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

.hero-slide.is-active .hero-image {
  animation: heroZoom 8s ease both;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.18), transparent 34%),
    linear-gradient(0deg, #020617 3%, rgba(15, 23, 42, 0.78) 42%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #fbbf24;
  font-weight: 800;
}

.hero h1,
.hero h2,
.page-title {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
}

.hero-text {
  max-width: 680px;
  margin: 18px 0 22px;
  color: #d1d5db;
  font-size: 18px;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #fbbf24;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 750;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: var(--amber);
  color: #ffffff;
  padding: 12px 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.22);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  background: var(--amber-strong);
  transform: translateY(-1px);
}

.button.ghost {
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(15, 23, 42, 0.62);
  color: #fbbf24;
  box-shadow: none;
}

.button.ghost:hover {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

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

.section {
  padding: 54px 0 0;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
  transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(30, 41, 59, 0.72);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

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

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

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

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-weight: 900;
}

.card-rating,
.card-duration {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 750;
}

.card-rating {
  left: 8px;
  bottom: 8px;
  color: #fbbf24;
}

.card-duration {
  right: 8px;
  top: 8px;
}

.card-body {
  padding: 13px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title,
.related-card:hover .card-title,
.rank-card:hover .rank-title {
  color: #fbbf24;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.tag {
  border-radius: 7px;
  background: rgba(51, 65, 85, 0.8);
  color: #fbbf24;
  padding: 2px 7px;
  font-size: 12px;
}

.card-meta {
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.62));
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card h3 {
  margin: 0 0 9px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.rank-card {
  display: flex;
  gap: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.56);
  padding: 12px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(30, 41, 59, 0.76);
}

.rank-index {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--amber-soft);
  color: #fbbf24;
  font-weight: 900;
}

.rank-cover {
  position: relative;
  flex: 0 0 128px;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.rank-body {
  min-width: 0;
  flex: 1;
}

.rank-title {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
  transition: color 0.2s ease;
}

.rank-desc {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 12% 30%, rgba(245, 158, 11, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.96));
  padding: 70px 0 44px;
}

.page-title {
  max-width: 900px;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 900;
}

.page-description {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
}

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

.breadcrumb a:hover {
  color: #fbbf24;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 160px 160px 160px;
  gap: 12px;
  margin: 28px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: rgba(2, 6, 23, 0.5);
  color: var(--text);
  padding: 11px 13px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.55);
}

.detail-wrap {
  padding: 42px 0 0;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.35);
  font-size: 32px;
  transform: translateX(2px);
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
  padding: 22px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  margin-bottom: 18px;
}

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

.detail-content {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.52);
  padding: 24px;
}

.detail-content h2,
.related-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-content p {
  margin: 0 0 18px;
  color: #d1d5db;
}

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

.related-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.52);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.38);
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  color: var(--muted);
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
  font-weight: 850;
}

.footer-nav {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted-strong);
}

.footer-copy {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: #64748b;
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

@keyframes heroZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

@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: 860px) {
  .desktop-nav,
  .header-actions .search-mini {
    display: none;
  }

  .menu-button {
    display: inline-grid;
  }

  .hero {
    height: 540px;
  }

  .hero-content {
    bottom: 64px;
  }

  .hero-control {
    display: none;
  }

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

  .rank-grid,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .header-inner {
    min-height: 64px;
  }

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }

  .hero {
    height: 520px;
  }

  .hero h1,
  .hero h2 {
    font-size: 34px;
  }

  .hero-text,
  .page-description {
    font-size: 16px;
  }

  .section {
    padding-top: 40px;
  }

  .section-header {
    display: block;
  }

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

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

  .rank-card {
    gap: 10px;
  }

  .rank-cover {
    flex-basis: 100px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .detail-content,
  .detail-panel {
    padding: 18px;
  }
}
