:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --gold: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.24), transparent 28rem),
    radial-gradient(circle at 90% 18%, rgba(59, 130, 246, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.locked {
  overflow: hidden;
}

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: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 10px 32px rgba(56, 189, 248, 0.24);
  font-size: 15px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #cbd5e1;
  font-size: 15px;
}

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

.nav-links a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
  color: #fff;
}

.top-search,
.mobile-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
  color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 230px;
  padding: 10px 16px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.top-search button,
.mobile-search button,
.btn,
.hero-btn,
.play-link {
  border: 0;
  border-radius: 999px;
  color: #06111f;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.top-search button,
.mobile-search button {
  padding: 10px 16px;
}

.top-search button:hover,
.mobile-search button:hover,
.btn:hover,
.hero-btn:hover,
.play-link:hover {
  color: #fff;
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.24);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  color: #cbd5e1;
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.mobile-search {
  margin: 0;
}

.mobile-search input {
  width: 100%;
  padding: 12px 16px;
}

.hero {
  position: relative;
  height: min(74vh, 650px);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.62) 26%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 0 0 82px;
}

.hero-copy-inner {
  max-width: 720px;
}

.eyebrow,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.68);
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.18);
  font-size: 14px;
  font-weight: 700;
}

.eyebrow {
  padding: 7px 13px;
}

.chip {
  padding: 6px 11px;
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 640px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-btn,
.btn,
.play-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.62);
}

.btn-ghost:hover {
  background: rgba(30, 41, 59, 0.86);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.36);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(2, 6, 23, 0.62);
}

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

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

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #fff;
}

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

.home-shell {
  padding: 56px 0 72px;
}

.page-shell {
  padding: 42px 0 72px;
}

.section {
  margin: 0 0 64px;
}

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

.section-head h2,
.page-title-row h2,
.detail-section h2,
.player-panel h2,
.side-card h2,
.site-footer h2 {
  margin: 0;
  color: #fff;
}

.section-head h2,
.detail-section h2,
.player-panel h2 {
  font-size: clamp(24px, 3vw, 32px);
}

.section-head p,
.page-title-row p,
.filter-panel p,
.page-hero p,
.site-footer p,
.detail-section p,
.side-card p {
  color: var(--muted);
  line-height: 1.75;
}

.section-link {
  color: var(--accent);
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.64));
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.34);
  transform: translateY(-5px);
}

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

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.62);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.meta-row {
  display: flex;
  gap: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.card-title {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-title a:hover {
  color: var(--accent);
}

.card-desc {
  min-height: 52px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.76);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 85% 10%, rgba(56, 189, 248, 0.22), transparent 12rem),
    linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.82));
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

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

.category-card span {
  color: var(--accent);
  font-weight: 800;
}

.rank-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.rank-list,
.side-card,
.player-panel,
.detail-section,
.filter-panel,
.page-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rank-list {
  padding: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 72px minmax(0, 1fr) 54px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.64);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #07111f;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  font-weight: 900;
}

.rank-item img {
  width: 72px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

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

.rank-info strong {
  display: block;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.rank-score {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  text-align: right;
}

.side-card {
  padding: 24px;
}

.side-card .mini-link {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: #cbd5e1;
}

.side-card .mini-link:hover {
  color: #fff;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 44px;
  background:
    radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.2), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.86));
}

.page-hero h1 {
  max-width: 860px;
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  font-size: 18px;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
  padding: 22px;
}

.filter-panel strong {
  display: block;
  margin-bottom: 4px;
  font-size: 20px;
}

.filter-panel p {
  margin: 0;
}

.filter-controls {
  display: flex;
  gap: 12px;
  min-width: min(480px, 100%);
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  padding: 12px 16px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 28px;
  background: #020617;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--poster);
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.38;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.3)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding: 72px 0 48px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.5);
}

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

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

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

.detail-hero h1 {
  max-width: 850px;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.06;
}

.detail-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.76);
}

.detail-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.player-panel,
.detail-section {
  padding: 24px;
}

.video-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.16));
  cursor: pointer;
  text-align: center;
}

.player-cover.is-playing {
  display: none;
}

.play-button {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 999px;
  color: #06111f;
  background: #fff;
  box-shadow: 0 14px 44px rgba(2, 6, 23, 0.34);
  font-size: 28px;
}

.player-cover strong {
  display: block;
  font-size: 20px;
}

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

.detail-section p {
  font-size: 16px;
}

.info-table {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.info-table div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: #cbd5e1;
}

.info-table span:first-child {
  color: var(--muted);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.64), #020617);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0 28px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 14px;
}

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

  .top-search input {
    width: 190px;
  }

  .menu-toggle {
    display: block;
  }

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

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

@media (max-width: 780px) {
  .nav-wrap {
    height: 64px;
  }

  .brand-text small,
  .top-search {
    display: none;
  }

  .hero {
    min-height: 560px;
    height: 78vh;
  }

  .hero-copy {
    padding-bottom: 86px;
  }

  .hero-control {
    display: none;
  }

  .section-head,
  .page-title-row,
  .filter-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-controls {
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .recommend-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-hero-inner {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
  }

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

  .page-hero {
    padding: 30px;
  }
}

@media (max-width: 540px) {
  .movie-grid,
  .category-grid,
  .recommend-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-score {
    display: none;
  }

  .rank-item img {
    width: 58px;
    height: 78px;
  }

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

  .detail-poster {
    width: 160px;
  }

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