:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(51, 65, 85, 0.64);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --shadow: 0 24px 60px rgba(8, 145, 178, 0.16);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "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;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid rgba(51, 65, 85, 0.56);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #08111f;
  background: linear-gradient(135deg, #22d3ee, #2563eb);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.36);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #cbd5e1;
  font-size: 14px;
  white-space: nowrap;
}

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

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

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

.search-box {
  position: relative;
  width: 238px;
}

.search-box input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  outline: none;
  padding: 10px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 88vw);
  display: none;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.search-results.open {
  display: block;
}

.search-result-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.48);
}

.search-result-item:last-child {
  border-bottom: 0;
}

.search-result-item img {
  width: 48px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #0f172a;
}

.search-result-item strong {
  display: block;
  color: #f8fafc;
  line-height: 1.35;
}

.search-result-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(51, 65, 85, 0.68);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 16px;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
}

main {
  padding-top: 64px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.7) 43%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 70%, rgba(34, 211, 238, 0.24), transparent 28%), radial-gradient(circle at 78% 34%, rgba(37, 99, 235, 0.22), transparent 26%);
  mix-blend-mode: screen;
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1280px) / 2 + 16px));
  right: 32px;
  bottom: clamp(42px, 9vh, 96px);
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(42px, 6.5vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 42px rgba(0, 0, 0, 0.42);
}

.hero-copy {
  max-width: 680px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.44);
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.14);
  color: #67e8f9;
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  color: #fff;
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.22);
}

.secondary-button {
  border: 1px solid rgba(148, 163, 184, 0.36);
  background: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 52px rgba(34, 211, 238, 0.32);
  border-color: rgba(34, 211, 238, 0.6);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.52);
  color: white;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(15, 23, 42, 0.84);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.7);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: #22d3ee;
}

.section {
  padding: 72px 0;
}

.section.band,
.page-hero.band {
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(10px);
}

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

.section-title span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
}

.section-title h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-lead,
.page-hero p,
.detail-title p {
  color: #cbd5e1;
  max-width: 860px;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.52);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.56);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.62));
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.play-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.9);
  color: #04111d;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #22d3ee, #2563eb);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.36);
}

.card-body {
  display: block;
  padding: 14px;
}

.card-body strong {
  display: block;
  min-height: 2.8em;
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.38;
}

.card-meta,
.card-desc {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.card-meta {
  margin-top: 8px;
}

.card-desc {
  min-height: 3.1em;
  margin: 8px 0 12px;
  color: #cbd5e1;
}

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

.category-card {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.58);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.category-card:hover img {
  transform: scale(1.06);
  opacity: 0.56;
}

.category-card span {
  position: relative;
  z-index: 1;
  display: block;
  height: 100%;
  padding: 24px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12));
}

.category-card strong {
  display: block;
  margin-top: 74px;
  color: #fff;
  font-size: 22px;
}

.category-card em {
  display: block;
  color: #cbd5e1;
  font-style: normal;
  font-size: 13px;
  margin-top: 8px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.rank-panel,
.info-panel,
.text-panel {
  border: 1px solid rgba(51, 65, 85, 0.58);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.55);
  padding: 22px;
}

.rank-row {
  display: grid;
  grid-template-columns: auto 56px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.48);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  font-weight: 900;
}

.rank-row img {
  width: 56px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.rank-row strong,
.rank-row em {
  display: block;
}

.rank-row strong {
  color: #f8fafc;
}

.rank-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 4px;
}

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

.year-box {
  border: 1px solid rgba(51, 65, 85, 0.58);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.56);
  padding: 18px;
}

.year-box h3 {
  margin: 0 0 12px;
  color: #fff;
}

.year-box a {
  display: block;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.year-box a:hover {
  color: var(--cyan);
}

.page-hero {
  padding: 116px 0 50px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  margin: 30px 0;
}

.empty-state {
  display: none;
  border: 1px solid rgba(51, 65, 85, 0.58);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  color: #cbd5e1;
  padding: 26px;
  text-align: center;
}

.empty-state.show {
  display: block;
}

.detail-shell {
  padding: 104px 0 72px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 30px;
  align-items: start;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.18));
  color: #fff;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button-core {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22d3ee, #2563eb);
  box-shadow: 0 0 46px rgba(34, 211, 238, 0.45);
  color: #fff;
  font-size: 32px;
  transform: translateZ(0);
  transition: transform 0.2s ease;
}

.play-overlay:hover .play-button-core {
  transform: scale(1.08);
}

.detail-title {
  margin-top: 24px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.meta-pill {
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  padding: 7px 12px;
  font-size: 13px;
}

.info-panel img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  margin-bottom: 18px;
  background: #0f172a;
}

.info-list {
  display: grid;
  gap: 12px;
  color: #cbd5e1;
  font-size: 14px;
}

.info-list strong {
  color: #fff;
  margin-right: 8px;
}

.text-panel {
  margin-top: 24px;
}

.text-panel h2 {
  margin: 0 0 12px;
  color: #fff;
}

.text-panel p {
  margin: 0 0 14px;
  color: #cbd5e1;
}

.related-grid {
  margin-top: 36px;
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.54);
  background: #020617;
}

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

.site-footer h3 {
  margin: 0 0 14px;
  color: #67e8f9;
}

.site-footer p,
.footer-links a {
  color: #94a3b8;
  font-size: 14px;
}

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

.footer-links a:hover {
  color: var(--cyan);
}

.footer-bottom {
  border-top: 1px solid rgba(51, 65, 85, 0.44);
  color: #64748b;
  text-align: center;
  padding: 18px 16px;
  font-size: 13px;
}

@media (min-width: 900px) {
  .hero {
    height: 80vh;
  }
}

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

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

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

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .search-box {
    width: min(48vw, 240px);
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

@media (max-width: 640px) {
  .container,
  .nav-wrap,
  .mobile-nav {
    width: min(100% - 24px, 1280px);
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .header-actions {
    gap: 6px;
  }

  .search-box {
    width: 42vw;
  }

  .search-box input {
    padding: 8px 12px;
  }

  .hero {
    min-height: 560px;
  }

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

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-desc {
    display: none;
  }

  .page-hero {
    padding-top: 96px;
  }

  .detail-shell {
    padding-top: 90px;
  }
}
