:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --green: #10b981;
  --text: #f8fafc;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.52);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(20, 184, 166, 0.16), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 70%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.header-inner,
.mobile-panel,
.hero-content,
.section-inner,
.page-inner,
.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: white;
  font-weight: 900;
  box-shadow: 0 14px 38px rgba(6, 182, 212, 0.35);
}

.brand-text {
  display: grid;
  line-height: 1.08;
}

.brand-text strong {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.74rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.nav-link {
  color: #cbd5e1;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: color 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #22d3ee;
}

.header-search,
.mobile-search,
.search-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.search-toolbar input,
.search-toolbar select,
.local-filter {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.86);
  color: white;
  border-radius: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.header-search input {
  width: 210px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-toolbar input:focus,
.search-toolbar select:focus,
.local-filter:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.header-search button,
.mobile-search button,
.search-toolbar button,
.primary-button,
.secondary-button,
.player-start {
  border: 0;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(6, 182, 212, 0.24);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-toolbar button:hover,
.primary-button:hover,
.player-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(6, 182, 212, 0.34);
}

.secondary-button {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  padding: 9px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: #e2e8f0;
  margin: 5px 0;
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

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

.mobile-search input {
  flex: 1;
}

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

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-stage,
.hero-slide,
.hero-slide::after,
.hero-slide::before {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-slide::before {
  content: "";
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.9) 36%, rgba(2, 6, 23, 0.18) 100%);
  z-index: 1;
}

.hero-slide::after {
  content: "";
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.04) 38%, rgba(2, 6, 23, 0.22) 100%);
  z-index: 2;
}

.hero-content {
  min-height: 72vh;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  padding: 72px 0 96px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.2);
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.hero h1,
.page-title {
  margin: 22px 0 14px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p,
.page-lead {
  color: var(--soft);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-meta {
  margin: 24px 0 30px;
}

.pill,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.9rem;
}

.pill.hot {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  border-color: transparent;
}

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

.hero-arrows {
  position: absolute;
  z-index: 6;
  right: max(28px, calc((100% - 1180px) / 2));
  bottom: 64px;
  display: flex;
  gap: 12px;
}

.hero-arrow {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 1.2rem;
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: max(16px, calc((100% - 1180px) / 2));
  bottom: 40px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 30px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--cyan), var(--teal));
}

.section {
  padding: 72px 0;
}

.section.compact {
  padding-top: 38px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
}

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

.section-heading a {
  color: #22d3ee;
  font-weight: 700;
}

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

.movie-card {
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.18);
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(15, 23, 42, 0.92);
}

.poster-link,
.poster-wrap {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
  opacity: 0.75;
}

.play-pill,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.play-pill {
  left: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: white;
  background: rgba(6, 182, 212, 0.9);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.28s ease;
}

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

.rank-badge {
  top: 10px;
  right: 10px;
  padding: 7px 10px;
  color: white;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.card-title {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  color: white;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.22s ease;
}

.movie-card:hover .card-title {
  color: #22d3ee;
}

.card-meta,
.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-meta span:first-child,
.card-foot a {
  color: #22d3ee;
}

.card-body p {
  display: -webkit-box;
  min-height: 3.15em;
  overflow: hidden;
  margin: 12px 0 0;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}

.panel {
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.panel-body {
  padding: 22px;
}

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: background 0.22s ease, border-color 0.22s ease;
}

.compact-card:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(34, 211, 238, 0.32);
}

.compact-card img {
  width: 66px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

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

.compact-info strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-info small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  font-weight: 900;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  padding: 22px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.18), rgba(20, 184, 166, 0.08)), rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.16);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.12);
}

.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 1.35rem;
}

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

.category-card a {
  position: relative;
  color: #22d3ee;
  font-weight: 800;
}

.page-hero {
  padding: 72px 0 36px;
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.14), transparent);
}

.page-title {
  max-width: 900px;
}

.page-lead {
  max-width: 820px;
  color: var(--soft);
}

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

.breadcrumb a {
  color: #67e8f9;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 24px;
}

.local-filter {
  width: min(420px, 100%);
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  border: 1px solid rgba(34, 211, 238, 0.18);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.36));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-shell.started .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-start {
  min-width: 138px;
  min-height: 54px;
  font-size: 1.05rem;
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  text-align: center;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.detail-card p {
  color: var(--soft);
  line-height: 1.9;
  font-size: 1.03rem;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

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

.side-card {
  padding: 20px;
  margin-top: 18px;
}

.side-card:first-child {
  margin-top: 0;
}

.mini-link-list {
  display: grid;
  gap: 10px;
}

.mini-link-list a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.mini-link-list a:hover {
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.32);
}

.search-toolbar {
  align-items: stretch;
  margin: 24px 0;
}

.search-toolbar input {
  flex: 1;
  min-width: 180px;
}

.search-toolbar select {
  min-width: 160px;
}

.search-results {
  margin-top: 24px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 32px;
  padding: 38px 0;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 900;
  color: white;
}

.footer-inner p {
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  align-content: start;
  justify-content: end;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

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

  .detail-sidebar {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px;
  }
}

@media (max-width: 920px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .header-inner {
    height: 66px;
  }

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

  .hero-arrows {
    right: 16px;
    bottom: 34px;
  }

  .hero-dots {
    bottom: 22px;
  }

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

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

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

  .footer-links {
    justify-content: start;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .mobile-panel,
  .hero-content,
  .section-inner,
  .page-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero h1,
  .page-title {
    letter-spacing: -0.04em;
  }

  .hero-actions,
  .section-heading,
  .filter-bar,
  .search-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions a,
  .search-toolbar button,
  .search-toolbar select {
    width: 100%;
    text-align: center;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body p {
    display: none;
  }

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

  .compact-card {
    grid-template-columns: 56px 1fr auto;
  }

  .compact-card img {
    width: 56px;
    height: 76px;
  }

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

  .player-shell {
    border-radius: 18px;
  }
}

.hero-copy-item { display: none; }
.hero-copy-item.active { display: block; }
