:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --card: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #06b6d4;
  --blue: #2563eb;
  --gold: #f59e0b;
  --danger: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.12), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.15), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(51, 65, 85, 0.82);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(16px);
}

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

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

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.28);
}

.brand-text {
  font-size: 1.34rem;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--soft);
  font-weight: 650;
}

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

.nav-links a:hover {
  color: var(--cyan);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--soft);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.hero-track {
  position: relative;
  min-height: 650px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.06);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18) 0%, rgba(2, 6, 23, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 48px;
  align-items: center;
  padding: 70px 0 82px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #bff5ff;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-size: 0.85rem;
  font-weight: 750;
}

.hero h1,
.hero h2 {
  margin: 20px 0 16px;
  font-size: clamp(2.4rem, 5.2vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: var(--soft);
  font-size: 1.08rem;
}

.hero-meta,
.detail-meta,
.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span,
.page-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--soft);
  font-size: 0.9rem;
}

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

.btn-primary,
.btn-ghost,
.search-box button,
.player-start {
  border: 0;
  cursor: pointer;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.26);
}

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

.btn-ghost {
  color: var(--soft);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.hero-panel {
  position: relative;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.56));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  padding: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: -20% auto auto -20%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.16);
  filter: blur(14px);
}

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

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.36);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
}

.main-wrap,
.page-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.section-block {
  padding: 72px 0 8px;
}

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

.section-title h2,
.page-title h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 3.4vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.section-title p,
.page-title p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
}

.search-panel {
  margin: 30px 0;
  padding: 18px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.17);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.18);
}

.search-label {
  display: block;
  color: var(--cyan);
  font-weight: 800;
  margin: 0 0 10px;
}

.search-box {
  display: flex;
  gap: 10px;
}

.search-box input {
  flex: 1;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text);
  background: rgba(2, 6, 23, 0.58);
  outline: none;
  padding: 0 16px;
}

.search-box input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.11);
}

.search-box button {
  border-radius: 16px;
  padding: 0 16px;
  color: #fff;
  font-weight: 750;
  background: rgba(51, 65, 85, 0.88);
}

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

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

.poster-link {
  display: block;
  height: 100%;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.poster-link:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.32);
  box-shadow: 0 22px 54px rgba(6, 182, 212, 0.14);
}

.poster-box {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.poster-link:hover .poster-box img {
  transform: scale(1.08);
}

.quality-badge,
.year-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.quality-badge {
  left: 10px;
  background: rgba(6, 182, 212, 0.86);
}

.year-badge {
  right: 10px;
}

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

.card-title {
  display: block;
  font-weight: 850;
  line-height: 1.25;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.card-meta {
  display: block;
  color: var(--soft);
  font-size: 0.82rem;
  margin-top: 10px;
}

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

.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  color: #bff5ff;
  background: rgba(6, 182, 212, 0.11);
  font-size: 0.72rem;
}

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

.category-card {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.82));
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.36);
}

.category-card strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 8px;
}

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

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

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

.rank-item a {
  display: grid;
  grid-template-columns: 54px 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 110px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item a:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.32);
}

.rank-no {
  display: inline-flex;
  justify-content: center;
  color: var(--cyan);
  font-size: 1.4rem;
  font-weight: 900;
}

.rank-item img {
  width: 78px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
}

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

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

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

.rank-copy em {
  color: var(--soft);
  font-size: 0.86rem;
  font-style: normal;
  margin: 3px 0;
}

.rank-copy small {
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  padding: 64px 0 18px;
}

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

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

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
  gap: 30px;
  align-items: start;
  padding: 46px 0 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  background:
    radial-gradient(circle at center, rgba(6, 182, 212, 0.24), rgba(2, 6, 23, 0.46) 38%, rgba(2, 6, 23, 0.68) 100%);
}

.player-start span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  box-shadow: 0 18px 50px rgba(6, 182, 212, 0.3);
  font-size: 2rem;
  padding-left: 5px;
}

.player-shell.is-playing .player-start {
  display: none;
}

.detail-side {
  border-radius: 28px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.detail-side img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: 18px;
}

.detail-side h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.1;
}

.detail-side p {
  color: var(--soft);
}

.detail-panel {
  margin: 36px 0;
  padding: 28px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
}

.detail-panel p {
  color: var(--soft);
  margin: 0 0 18px;
  white-space: pre-line;
}

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

.site-footer {
  margin-top: 80px;
  background: linear-gradient(135deg, #0f172a, #1e293b 48%, #0f172a);
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
}

.footer-brand p {
  color: var(--muted);
  max-width: 520px;
}

.footer-links h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-grid a {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.36);
  color: var(--soft);
}

.footer-copy {
  grid-column: 1 / -1;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 20px;
}

.hidden-by-search {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 24px;
  border-radius: 20px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.empty-state.is-visible {
  display: block;
}

@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) {
  .nav-wrap {
    min-height: 66px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 66px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
  }

  .hero,
  .hero-track,
  .hero-content {
    min-height: 720px;
  }

  .hero-content,
  .watch-layout,
  .footer-wrap {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 360px;
  }

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

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

@media (max-width: 640px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-desc {
    min-height: 40px;
    font-size: 0.84rem;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    min-height: 44px;
  }

  .rank-item a {
    grid-template-columns: 42px 66px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-item img {
    width: 66px;
    height: 82px;
  }

  .detail-panel {
    padding: 22px;
  }
}
