:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --cyan-soft: rgba(34, 211, 238, 0.18);
  --shadow: 0 20px 60px rgba(8, 47, 73, 0.22);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(8, 145, 178, 0.22), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(37, 99, 235, 0.18), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background: #0f172a;
}

body::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 999px;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(2, 6, 23, 0.34);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.22);
}

.brand-text,
.footer-brand {
  font-size: 1.18rem;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  border-radius: 12px;
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 16px 16px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

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

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 68vh;
  align-items: flex-end;
  padding: 112px 0 84px;
}

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

.eyebrow,
.region-badge,
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.9);
  color: #00111a;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.eyebrow {
  padding: 8px 12px;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.58);
}

.hero p {
  max-width: 690px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  color: var(--soft);
}

.hero-meta span,
.tag-chip,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.hero-meta span {
  padding: 7px 11px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.25);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.72);
  border-color: var(--line);
  color: var(--soft);
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: white;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(34, 211, 238, 0.24);
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.46);
}

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

.main-section {
  padding: 52px 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
}

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

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

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

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

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover img,
.side-card:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.9));
}

.region-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 9px;
}

.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 32px;
  height: 32px;
  color: white;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 3.1em;
  overflow: hidden;
  color: white;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-meta,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #64748b;
  font-size: 0.82rem;
}

.card-tags span {
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  color: #cbd5e1;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.category-card div {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

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

.search-panel,
.content-panel,
.player-info,
.rank-list {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-panel {
  margin-bottom: 28px;
  padding: 18px;
}

.search-form {
  display: flex;
  gap: 12px;
}

.search-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.72);
  color: white;
  outline: none;
  padding: 14px 16px;
}

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

.empty-state {
  display: none;
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
}

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

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

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: black;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: black;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  background: #020617;
  color: white;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 0%, rgba(2, 6, 23, 0.64) 65%);
}

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

.play-pulse {
  position: relative;
  z-index: 2;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-size: 2rem;
  box-shadow: 0 0 0 16px rgba(34, 211, 238, 0.12);
}

.player-info {
  margin-top: 24px;
  padding: 26px;
}

.detail-title {
  margin: 14px 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.detail-meta span,
.tag-chip,
.filter-chip {
  padding: 7px 11px;
  color: var(--soft);
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
}

.tag-chip:hover,
.filter-chip:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.48);
}

.content-panel {
  margin-top: 22px;
  padding: 26px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.content-panel p {
  margin: 0;
  color: var(--soft);
}

.side-section {
  position: sticky;
  top: 94px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 18px;
}

.side-section h2 {
  margin: 0 0 16px;
  font-size: 1.16rem;
}

.side-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.side-card:hover {
  background: rgba(30, 41, 59, 0.72);
}

.side-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

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

.side-info strong {
  display: -webkit-box;
  overflow: hidden;
  color: white;
  font-size: 0.92rem;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-info em {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.rank-list {
  padding: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px 108px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
}

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

.rank-num {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-title {
  display: block;
  color: white;
  font-weight: 800;
}

.rank-desc {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.rank-watch {
  color: var(--cyan);
  font-weight: 800;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.66);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
  padding: 42px 0;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  color: #64748b;
  text-align: center;
}

[data-card][hidden] {
  display: none !important;
}

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

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

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

  .side-section {
    position: static;
  }
}

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

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

  .mobile-nav.is-open {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    padding: 90px 0 76px;
  }

  .hero-control {
    display: none;
  }

  .section-heading {
    display: block;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-summary {
    min-height: auto;
  }

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

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

  .rank-watch {
    display: none;
  }

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

@media (max-width: 460px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .hero h1 {
    font-size: 2.3rem;
  }
}
