:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --pink: #fb7185;
  --shadow: 0 25px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.18), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(96, 165, 250, 0.14), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.28);
  font-weight: 900;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-panel nav a {
  color: var(--soft);
  padding: 10px 14px;
  border-radius: 14px;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel nav a:hover,
.mobile-panel nav a.is-active {
  color: var(--cyan);
  background: rgba(51, 65, 85, 0.62);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.top-search input,
.mobile-search input,
.filter-bar input {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.68);
  color: var(--text);
  border-radius: 15px;
  outline: none;
  padding: 11px 14px;
  min-width: 240px;
  transition: 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.top-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.play-button,
.filter-bar button {
  border: 0;
  cursor: pointer;
  border-radius: 15px;
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 800;
  padding: 11px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.18);
}

.top-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.play-button:hover,
.filter-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.25);
}

.secondary-button {
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: none;
}

.menu-button {
  display: none;
  border: 0;
  color: var(--text);
  background: rgba(51, 65, 85, 0.72);
  border-radius: 14px;
  padding: 10px 13px;
  font-size: 20px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
  padding: 16px 24px 22px;
}

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

.mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-search input {
  min-width: 0;
  width: 100%;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.main-section,
.content-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.55));
}

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

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.55) 46%, rgba(2, 6, 23, 0.08) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.45) 48%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  padding: 120px 24px 88px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h1,
.hero h2 {
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.96;
}

.hero p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.meta-line span,
.tag-row span,
.detail-tags span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.68);
  color: var(--soft);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
}

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

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

.hero-dot {
  border: 0;
  width: 42px;
  height: 5px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(226, 232, 240, 0.28);
}

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

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

.section-title h2,
.section-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
}

.section-title p,
.page-hero p,
.detail-title p,
.prose p {
  color: var(--muted);
  line-height: 1.78;
}

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

.movie-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

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

.cover-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 24% 14%, rgba(34, 211, 238, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(2, 6, 23, 0.96));
  overflow: hidden;
}

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

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

.cover-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 22%, rgba(2, 6, 23, 0.82) 100%);
}

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.25);
}

.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, #facc15, #fb7185);
}

.card-body {
  padding: 18px;
}

.meta-line {
  font-size: 13px;
  gap: 7px;
}

.card-body h3 {
  margin: 13px 0 10px;
  color: #fff;
  font-size: 20px;
  line-height: 1.28;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

.card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background:
    radial-gradient(circle at 18% 12%, rgba(34, 211, 238, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.78));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 22px;
}

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

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

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 74px 24px 22px;
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 68px);
  margin: 0 0 16px;
  letter-spacing: -0.04em;
}

.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
}

.filter-bar input {
  width: 100%;
  min-width: 0;
}

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 70px 180px 1fr auto;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  background: var(--bg-card);
}

.rank-no {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #06111f;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
  font-size: 20px;
}

.rank-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.8);
}

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

.rank-copy h2 {
  margin: 0 0 9px;
  color: #fff;
  font-size: 24px;
}

.rank-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px 18px;
}

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

.player-shell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  background: rgba(2, 6, 23, 0.34);
}

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

.player-cover span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 30px;
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.32);
}

.detail-title {
  margin-top: 28px;
}

.detail-title h1 {
  font-size: clamp(34px, 5vw, 60px);
  margin-bottom: 16px;
}

.detail-side {
  position: sticky;
  top: 104px;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-card-strong);
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(30, 41, 59, 0.84);
}

.detail-side .side-body {
  padding: 22px;
}

.side-body dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 11px 16px;
  margin: 0;
}

.side-body dt {
  color: var(--muted);
}

.side-body dd {
  margin: 0;
  color: var(--text);
}

.prose {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}

.prose section {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 26px;
  background: rgba(15, 23, 42, 0.62);
}

.prose h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 26px;
}

.prose p {
  margin: 0;
}

.no-result {
  display: none;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.7);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.4), rgba(2, 6, 23, 0.96));
  margin-top: 40px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-grid h2 {
  color: #fff;
  margin: 0 0 16px;
  font-size: 20px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.78;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

@media (max-width: 1100px) {
  .top-search {
    display: none;
  }

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

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

  .detail-side {
    position: static;
  }
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .header-inner {
    min-height: 68px;
    padding: 0 16px;
  }

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

  .hero-content {
    padding: 100px 18px 80px;
  }

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

  .rank-item {
    grid-template-columns: 52px 1fr;
  }

  .rank-cover,
  .rank-item .primary-button {
    grid-column: 2;
  }

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

@media (max-width: 560px) {
  .brand-text strong {
    font-size: 18px;
  }

  .brand-text em {
    display: none;
  }

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

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

  .filter-bar,
  .mobile-search {
    flex-direction: column;
    align-items: stretch;
  }

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

  .rank-cover,
  .rank-item .primary-button {
    grid-column: auto;
  }
}
