:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(30, 41, 59, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --blue: #2563eb;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 32rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34rem),
    linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  min-height: 72px;
  margin: 0 auto;
  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: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.25);
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
}

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  font-weight: 700;
  font-size: 0.96rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan);
}

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

.header-search input,
.mobile-search input,
.wide-search input,
.filter-panel input {
  width: 230px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  background: rgba(30, 41, 59, 0.84);
  outline: none;
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-panel input:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.95);
}

.header-search button,
.mobile-search button,
.wide-search button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.82);
  color: white;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
  padding: 16px 24px 24px;
}

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

.mobile-link {
  display: block;
  padding: 8px 0;
}

.mobile-search {
  margin-top: 6px;
}

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

main {
  min-height: 68vh;
}

.hero-carousel {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.22) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 1) 0%, transparent 46%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 92px;
  max-width: 760px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(34, 211, 238, 0.18);
  color: #67e8f9;
  font-size: 0.9rem;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  color: white;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content .hero-movie-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  color: #e0f2fe;
}

.hero-content p {
  margin: 0 0 28px;
  max-width: 680px;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 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 18px 45px rgba(37, 99, 235, 0.34);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.44);
  color: white;
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

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

.search-panel {
  padding-top: 44px;
  padding-bottom: 24px;
}

.search-page-panel {
  padding-top: 32px;
}

.wide-search {
  width: 100%;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: var(--shadow);
}

.wide-search input {
  flex: 1;
  width: auto;
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 30px;
}

.compact-head {
  margin-bottom: 0;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-line {
  flex: 0 0 auto;
  width: 6px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.section-more {
  margin-left: auto;
  color: var(--cyan);
  font-weight: 900;
}

.glass-section {
  max-width: 1232px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(30, 41, 59, 0.34);
  box-shadow: var(--shadow);
}

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

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

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

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

.movie-card-link {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #020617;
}

.movie-card-large .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

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

.poster-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(34, 211, 238, 0.9);
  color: #082f49;
  font-size: 0.78rem;
  font-weight: 900;
}

.card-content {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.card-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.card-content h3 {
  margin: 0;
  color: white;
  font-size: 1.1rem;
  line-height: 1.36;
}

.movie-card-large .card-content h3 {
  font-size: 1.35rem;
}

.card-content p {
  margin: 0;
  min-height: 3.2em;
  color: var(--muted-strong);
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span,
.tag-chip {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-size: 0.78rem;
}

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

.category-card,
.category-overview-card a {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.68));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
}

.category-card strong,
.category-overview-card strong {
  display: block;
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
  color: white;
  font-size: 1.3rem;
}

.category-card small,
.category-overview-card small {
  position: relative;
  z-index: 1;
  color: var(--muted-strong);
  line-height: 1.7;
}

.category-glow {
  position: absolute;
  right: -44px;
  top: -44px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.2);
  filter: blur(4px);
}

.category-cover-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: -8px -8px 18px;
}

.category-cover-strip img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
}

.category-overview-body {
  display: block;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 34px;
  align-items: start;
}

.rank-box {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.rank-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.rank-title h2 {
  margin: 0;
  font-size: 1.3rem;
}

.rank-title a {
  color: var(--cyan);
  font-weight: 900;
}

.rank-list,
.rank-page-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.rank-link {
  display: grid;
  grid-template-columns: 44px 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.48);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.rank-link:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(30, 41, 59, 0.76);
}

.rank-no {
  color: var(--cyan);
  font-weight: 950;
  font-size: 1.05rem;
  text-align: center;
}

.rank-link img {
  width: 76px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-text strong,
.rank-text em,
.rank-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text strong {
  color: white;
}

.rank-text em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.rank-text span {
  color: var(--muted-strong);
  font-size: 0.88rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(30, 41, 59, 0.88));
}

.small-page-hero {
  padding: 76px 24px;
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.12rem;
  line-height: 1.8;
}

.filter-panel {
  padding-top: 34px;
  padding-bottom: 0;
}

.filter-panel label {
  display: grid;
  gap: 12px;
  max-width: 600px;
}

.filter-panel span {
  color: var(--muted-strong);
  font-weight: 800;
}

.filter-panel input {
  width: 100%;
  border-radius: 18px;
}

.empty-result {
  display: none;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 24px;
  padding: 38px;
  color: var(--muted);
  text-align: center;
}

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

.detail-wrap {
  padding-top: 36px;
  padding-bottom: 24px;
}

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

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

.detail-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-shell video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.15)),
    transparent;
  color: white;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.34);
  font-size: 2.15rem;
}

.play-title {
  max-width: 80%;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 900;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.detail-content {
  padding: 34px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
}

.detail-btn {
  flex: 0 0 auto;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.lead-text {
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: 1.15rem;
  line-height: 1.8;
}

.text-block,
.tag-area {
  margin-top: 30px;
}

.text-block h2,
.tag-area h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.text-block p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.tag-area div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-chip:hover {
  background: var(--cyan-soft);
  color: #67e8f9;
}

.related-section {
  padding-top: 34px;
}

.search-status {
  min-height: 28px;
  margin-bottom: 24px;
  color: var(--muted-strong);
  font-weight: 800;
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.94));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  gap: 26px;
}

.footer-brand p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
}

.brand.compact .brand-mark {
  width: 34px;
  height: 34px;
}

.brand.compact .brand-name {
  font-size: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.footer-links a {
  color: var(--muted-strong);
  font-weight: 700;
}

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

.footer-copy {
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--muted);
}

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

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

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

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .rank-box {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero-carousel {
    height: 74vh;
    min-height: 520px;
  }

  .hero-content {
    left: 20px;
    bottom: 88px;
  }

  .hero-arrow {
    top: auto;
    bottom: 28px;
    width: 42px;
    height: 42px;
  }

  .hero-prev {
    left: 20px;
  }

  .hero-next {
    right: 20px;
  }

  .hero-dots {
    bottom: 45px;
  }

  .content-section,
  .search-panel,
  .filter-panel,
  .detail-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

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

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

  .wide-search input,
  .wide-search button {
    width: 100%;
  }

  .detail-content {
    padding: 22px;
  }

  .detail-title-row {
    display: grid;
  }

  .detail-btn {
    justify-self: start;
  }

  .rank-link {
    grid-template-columns: 36px 66px minmax(0, 1fr);
  }

  .rank-link img {
    width: 66px;
    height: 48px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .large-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .btn {
    width: 100%;
  }

  .card-content p {
    min-height: 0;
  }

  .small-page-hero {
    padding: 56px 16px;
  }
}
