:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --blue: #38bdf8;
  --blue-strong: #2563eb;
  --purple: #a855f7;
  --green: #22c55e;
  --gold: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 22px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 36rem),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.20), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
}

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-weight: 700;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-search {
  width: min(320px, 30vw);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  padding: 6px 6px 6px 16px;
}

.nav-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input::placeholder {
  color: var(--subtle);
}

.nav-search button,
.primary-btn,
.ghost-btn,
.tag-link {
  border: 0;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-strong), var(--purple));
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.30);
}

.nav-search button {
  padding: 9px 14px;
  font-weight: 800;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  font-weight: 900;
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.ghost-btn:hover,
.nav-search button:hover {
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.75);
}

.mobile-panel {
  display: none;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.18) 100%),
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.24), transparent 30rem);
  z-index: 2;
}

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-inner {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.64fr);
  align-items: center;
  gap: 38px;
  padding: 92px 0 76px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(56, 189, 248, 0.30);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  font-size: 13px;
  font-weight: 900;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-lead,
.page-lead {
  margin: 22px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-feature {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.feature-pill {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.70);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.20);
}

.feature-pill span {
  display: block;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 900;
}

.feature-pill strong {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 72px 24px 24px;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.94) 52%, #020617 100%);
}

.hero-card-info h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.hero-card-info p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-dots {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
}

.hero-dot.is-active {
  background: #ffffff;
}

.section {
  padding: 58px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.section-desc {
  margin: 10px 0 0;
  max-width: 700px;
  color: var(--muted);
  line-height: 1.72;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 24px 70px rgba(14, 165, 233, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge,
.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  background: linear-gradient(135deg, var(--gold), #f97316);
}

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

.movie-card h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.3;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}

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

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

.category-card {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(168, 85, 247, 0.12)),
    rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.44);
}

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.category-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-link {
  display: inline-flex;
  padding: 7px 10px;
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: rgba(37, 99, 235, 0.13);
  font-size: 12px;
  font-weight: 900;
}

.page-hero {
  padding: 72px 0 28px;
}

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

.breadcrumb a {
  color: #bae6fd;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px 180px;
  gap: 12px;
  margin: 24px 0 28px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

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

.filter-bar option {
  color: #0f172a;
}

.no-result {
  display: none;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.70);
  text-align: center;
}

.no-result.is-visible {
  display: block;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.42);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.rank-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.rank-content h3 {
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.rank-content p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 60px 0 44px;
  border-bottom: 1px solid var(--line);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.92) 42%, rgba(2, 6, 23, 0.42) 100%);
  z-index: 1;
}

.detail-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.12);
  opacity: 0.42;
  transform: scale(1.08);
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-title p {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.78;
}

.player-section {
  padding: 50px 0 26px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle, rgba(37, 99, 235, 0.16), rgba(2, 6, 23, 0.78)),
    rgba(2, 6, 23, 0.35);
}

.play-mask.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-strong), var(--purple));
  box-shadow: 0 18px 54px rgba(37, 99, 235, 0.45);
  font-size: 32px;
}

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

.content-panel {
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.content-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.88;
}

.content-panel p + p {
  margin-top: 14px;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--subtle);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a:hover {
  color: #ffffff;
}

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

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

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

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

  .detail-inner {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-panel {
    position: fixed;
    inset: 72px 0 auto 0;
    z-index: 45;
    display: block;
    padding: 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
    transform: translateY(-120%);
    transition: transform 0.24s ease;
  }

  .mobile-panel.is-open {
    transform: translateY(0);
  }

  .mobile-panel a {
    display: block;
    padding: 13px 0;
    color: var(--muted);
    font-weight: 900;
  }

  .mobile-panel form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }

  .mobile-panel input {
    min-width: 0;
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.8);
    padding: 12px 14px;
  }

  .mobile-panel button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue-strong), var(--purple));
    padding: 0 16px;
    font-weight: 900;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 68px;
  }

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

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    max-width: 250px;
  }
}

@media (max-width: 640px) {
  .container,
  .navbar,
  .hero-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .logo {
    font-size: 19px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: 38px;
  }

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

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

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

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

  .movie-card h3 {
    font-size: 15px;
  }

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

  .content-panel {
    padding: 20px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
